Thread: Staff Bundle
View Single Post
  #19  
Old 05-22-2010, 05:25 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
bewts.

PHP Code:
//#CLIENTSIDE

function onCreated() {
  
this.speed = 1;
  
createTaskBarButton();
}

function 
ChatBar.onAction() {
  if (
ChatBar.text.starts("/boots")) {
    
temp.newspeed = ChatBar.text.substring("/boots ".length());
    if (
temp.newspeed) {
      
this.speed = temp.newspeed;
    }
    
ChatBar.text = "";
    
initBoots();
  }
}

function 
createTaskBarButton() {
  
with (Serverlist_TaskBar) {
    new 
GuiButtonCtrl("Serverlist_TaskButton_Boots") {
      
profile = Serverlist_TaskButton_Server.profile;
      
width = 65;
      
x = 500 + 64 + 10;
      
text = "   Boots";
      
thiso.catchevent(name, "onAction", "initBoots");
    }
  }
}

function 
initBoots() {
  
this.boots = !this.boots;
  
setTimer(0.05);
}

function 
onTimeout() {
  if (
this.boots) {
    for (
temp.i = 0; temp.i < 4; temp.i++) {
      if (
keydown(temp.i)) {
        
player.x += this.speed * vecx(temp.i);
        
player.y += this.speed * vecy(temp.i);
      }
    }
    
setTimer(0.05);
  }
} 
__________________
Quote:
Reply With Quote