I am trying to make a target system where you have to shoot the targets...
BUT when ever i lose or gain money it dose the same for all the other players in the room...
so this is my script:
PHP Code:
//NPC Made By *theHAWKER
function onCreated(){
this.chat = "Shoot Me!";
setTimer(.1);
}
function onActionAdd(){
with(findplayer(params[0])){
player.rupees += int(random(0,20));
}
}
function onTimeout(){
this.x += random(0,1);
this.x -= random(0,1);
setTimer(.3);
}
//#CLIENTSIDE
function onWasShot(){
this.chat = "Hit!";
triggeraction(x,y,"add",player.account);
sleep(.5);
this.chat = "Shoot Me!";
}
can someone tell me whats wrong, i think its the player.account part in the triggeraction...