Results 1 to 10 of 26

Thread: key on keyboard

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Private First Class YuriJurek's Avatar
    Join Date
    Jun 2013
    Posts
    219
    Thanks
    152
    Thanked 88 Times in 47 Posts
    The answer is you can't, you could of course use libcod which has build in these functions but there's an easier way.

    1. Create a menu file and do something like
    PHP Code:
    bind k "openscriptmenu keys key_K" 
    2. On connect open the menu on each player so that it binds the right response to right key (eventually can do this as well on respawn to prevent players from changing it)

    3. In menus.gsc make a new response like
    PHP Code:
    if(menu == "-1" && response == "key_K"
    Then... execute your script.

    Code untested, there might be an obvious to fix mistake but you should be able to fix it if any occurs.
    Last edited by YuriJurek; 7th December 2013 at 00:34.

  2. The Following User Says Thank You to YuriJurek For This Useful Post:

    kung foo man (7th December 2013)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •