Hey,
Thanks for your help! I was wondering if there was a function to make a variable, thanks for pointing it out. Cheers! I'll post the whole script in the code gallery when I'm done
Quote:
Originally Posted by fowlplay4
KeyPress can be shortened, unless you plan to changing it from the number keys:
PHP Code:
function onKeyPressed(keycode, keyname) { temp.code = keycode - 49; if (temp.code < getTools().size()) { selectToolName(temp.code); } else if (keycode == 87) { //Activate selected staff tool with w triggerServer("gui", this.name, "staffbar", this.staffCode); } }
|
Yes, I had actually planned to change it in the future, but thanks for the snippet
