Thread: Speed Sandals
View Single Post
  #1  
Old 09-24-2011, 07:05 PM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
Speed Sandals

Just another staff boot script, but with a difference that I hope the users will find quite pleasant. It has an image / text display in the top right corner of your screen that shows your speed. You can increase speed by pressing + and otherwise decrease it by pressing -. Here is the script.
PHP Code:
//#CLIENTSIDE
function onKeyPressed(codeKey) {
  if (
Key == "z") {
    
setTimer(0.05);
    if (
this.mode == 0) {
      
this.mode 1;
      
this.speed 1;
    } else {
      
this.mode 0;
    }
  }
  if (
Key == "=") {
    
this.speed this.speed 1;
  }
  if (
Key == "-") {
    
this.speed this.speed 1;
  }
}

function 
onTimeout() {
  if (
this.mode == 1) {
    
showingimage();
    for (
temp.key 0key 4key++) {
      if (
keydown(key)) {
        
player.+= (vecx(key) * this.speed);
        
player.+= (vecy(key) * this.speed);
      }
    }
  }
  if (
this.mode == 0) {
    
hidingimage();
  }
  
setTimer(0.05);
}

function 
ShowingImage() {
  
with(findimg(200)) {
    
image "wboots.png";
    
layer 4;
    
screenwidth 675;
    
screenheight 610;
  }
  
with(findimg(201)) {
    
text "Speed: " thiso.speed;
    
screenwidth 638;
    
screenheight 601;
    
zoom 0.7;
    
layer 4;
    
style "bi";
    
textshadow true;
    
font "Tempsitc";
  }
}

function 
HidingImage() {
  
hideimg(200);
  
hideimg(201);

Attached Images
 
__________________
Reply With Quote