View Single Post
  #5  
Old 07-21-2013, 04:21 AM
baseman101 baseman101 is offline
Scripter
baseman101's Avatar
Join Date: Nov 2012
Location: Purcellville, VA
Posts: 76
baseman101 will become famous soon enough
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 View Post
KeyPress can be shortened, unless you plan to changing it from the number keys:

PHP Code:
function onKeyPressed(keycodekeyname) {
  
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
Reply With Quote