Thread: NPC Troubles :(
View Single Post
  #3  
Old 12-28-2004, 08:40 AM
ZeroTrack ZeroTrack is offline
G2K1 Developer
ZeroTrack's Avatar
Join Date: Apr 2004
Location: LongIsland, NY
Posts: 402
ZeroTrack is on a distinguished road
Send a message via AIM to ZeroTrack
frist of yes get rid of those strtofloats, second get rid of that pointless timeout , thrid u need to set the var first , nothing is setting the var when the script is active, with all the corrections is should look like this
PHP Code:
//#CLIENTSIDE
if (weaponfired) {
  if (
this.inuse=0) {
    
this.inuse=1;
    
timeout 0.05;
    
this.bootspeed=1;
    
setplayerprop #c,Boots On;
  
} else {
    
this.inuse=0;
    
setplayerprop #c,Boots Off;
  
}
}
if (
this.inuse==&& timeout) {
  if (
keydown(0)) playery -= this.bootspeed;
  if (
keydown(1)) playerx -= this.bootspeed;
  if (
keydown(2)) playery += this.bootspeed;
  if (
keydown(3)) playerx += this.bootspeed;
  
timeout 0.05;
}
if (
playerchats) {
  
tokenize #c;
  
if (tokenscount==3){
    if (
strequals(#t(0),/boots)&&strequals(#t(1),speed)) {
      
this.bootspeed strtofloat(#t(2));
    
}
  }
}
if (
playerchats) {
  if (
strequals(#c,/boots on)) {
    
this.inuse==1;
    
timeout=.05;
  }
  if (
strequals(#c,/boots off)) {
    
this.inuse==0;
  }

__________________

Reply With Quote