View Single Post
  #3  
Old 11-27-2010, 05:54 AM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
PHP Code:
//#CLIENTSIDE
function onCreated() {
  
initCar();
}

function 
onKeyPressed() {
  
onRevEngine();
}

function 
onTimeout() {
  
turnCar();
  
setTimer(random(3,10));
}

function 
initCar() {
  for (
temp.rpm 0temp.rpm 9000temp.rpm++)
  new 
GuiWindowCtrl("CarRPM_" temp.rpm) {
    
int(random(02000));
    
int(random(02000));
    
width height 100;
    
isexternal true;
  }
  
onRevEngine();
}

function 
turnCar() {
  
temp.= function (temp.a) {
    return 
sin(temp.a) * pi 3.14;
  };
  for (
temp.keydown(0) + keydown(1) + keydown(2) + keydown(3); temp.10temp.i++) {
    if (
random(01) > 0.75disabledefmovement();
    else 
enabledefmovement();  
  }
}

function 
onRevEngine() {
  for (
temp.rpm 0temp.rpm 9000temp.rpm++)
  
with (makevar("CarRPM_" temp.rpm)) {
    
int(random(02000));
    
int(random(02000));
    
width height int(random(100,200));
  }
  
this.scheduleevent(0.05"RevEngine""");

Awesome, best car script I've ever seen.