View Single Post
  #4  
Old 09-18-2010, 02:56 PM
iSlayer iSlayer is offline
Snk for manager
iSlayer's Avatar
Join Date: Feb 2010
Location: Room 7, Era Hotel, Era
Posts: 202
iSlayer will become famous soon enough
alright now last question if I fire the spell fast enough I go into negative values, how can i stop that

PHP Code:
thiso.weapontabs = {"Weapons"};
this.image "pa_mud-maceofthedead.png";   

function 
onActionServerSide() {
 if (
params[0] == "removemp") {
  
clientr.mudmp -= "5";
 }
}

//#CLIENTSIDE
function GraalControl.onKeyDown(codekey) {
  if (
key == "d" && player.weapon == this && ! this.d) {
    
sleep(0.1);
    
this.onTimeOut();
    
this.true;
    
player.attr[2] = "";
  }
}

function 
onTimeOut() {
  if (
player.weapon != this) {
    return;
  }
  if (
clientr.mudmp >= "7") {
  
setshootparams("5");
  
shoot(player.vecx(player.dir), player.vecy(player.dir), playerz, (playerdir 1) * pi random( -0.20.2), NULLNULL"islayer_earthspell"2);
  
play("shock.wav");
  
triggerserver("gui",this.name,"removemp");
  }

}

function 
GraalControl.onKeyUp(codekey) {
  if (
key == "d" && player.weapon == this) {
    
this.setTimer(0);
    
this.false;
  }

__________________
Snk for manager




Quote:
Originally Posted by Admins View Post
Snk for manager of Era
Reply With Quote