View Single Post
  #2  
Old 06-16-2013, 02:19 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
PHP Code:
//#CLIENTSIDE
function onCreated() {
  
this.speed 1;
}

function 
onTimeout() {
  
player.+= (keydown(3)-keydown(1))*this.speed;
  
player.+= (keydown(2)-keydown(0))*this.speed;
  
setTimer(0.05*this.on);
}

function 
onKeyPressed(codekey) {
  
this.on abs(this.on-(key=="b"));
  
setTimer(0.05*this.on);
}
function 
onPlayerChats() {
  if (
player.chat.starts("/speed ") && this.on) {
    
this.speed int(player.chat.substring(7));
  }

Tested this staff boots script, just to see how it works, and it gave this error in the onPlayerChats() event, right under the if statement:
NPC Code:
Unexpected symbol 'if'



But apart from that, looking good!
__________________
Reply With Quote