Solved creating y/n prompt

Discussion in 'Plugin Development' started by ZderKi, Jul 17, 2019.

Thread Status:
Not open for further replies.
  1. Offline

    ZderKi

    Okay so just a really quick and simple question... is there any way i can create a y/n prompt in console?
     
  2. Offline

    Kars

    Yes.

    Make a plugin with the commands that you expect a y/n answer to.
    Have a service that listens for console commands. In that service, keep track of the most recently executed command from before mentioned plugin. If such a command is known, and the newly uttered console command is y/n, handle it.

    It might be wise to forget the most recent console command after say 30 seconds.
     
Thread Status:
Not open for further replies.

Share This Page