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 like2. 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)PHP Code:bind k "openscriptmenu keys key_K"
3. In menus.gsc make a new response likeThen... execute your script.PHP Code:if(menu == "-1" && response == "key_K")
Code untested, there might be an obvious to fix mistake but you should be able to fix it if any occurs.



Reply With Quote