View Single Post
  #5  
Old 05-17-2008, 07:42 PM
[email protected] sid.gottlieb@googlemail.com is offline
Banned
Join Date: Mar 2008
Posts: 861
sid.gottlieb@googlemail.com will become famous soon enough
hmm use a public function....

weapon name: MYWEAPONTESTLOL/HI

HTML Code:
function onTimeout() { 
  if(onwater(player.x, player.y) && this.waterTimer == 0) { 
    findWeapon("MYWEAPONTESTLOL/HI").drawLeap(1, {player.x, player.y});
  } 

  this.waterTimer += 1; 
  if(this.waterTimer >= 3) this.waterTimer = 0; 

  setTimer(0.05); 
}  
inside the weapon 'MYWEAPONTESTLOL/HI' add
HTML Code:
public function drawLeap(type, position) {
  putleaps(temp.type, temp.position[0], temp.position[1]);
}
you could even do this if you wanted to be advanced:-

inside the weapon 'MYWEAPONTESTLOL/HI' also add [normally on the onCreated function]

HTML Code:
leapcontrol = this;
then you can just call the function from any weapon clientside by doing

HTML Code:
leapcontrol.drawLeap(type, {x, y});
Reply With Quote