Ive made a target system, but the targets keep responing, making the targets not disapear and reapear x.x
i need it to destroy every time a player enters and then recreate
one.
this is my script:
PHP Code:
//NPC Made By *theHAWKER
function onPlayerChats(){
if (clientr.staff = true){
if (player.chat = "destroy"){
destroy();
}
}
}
function onCreated(){
setshape(1,32,48);
setimg("gl_target.png");
this.chat = "Shoot Me!";
setTimer(.1);
}
function onActionAdd(){
with(findplayer(params[0])){
player.rupees += int(random(0,20));
}
}
function onTimeout(){
hide();
sleep(random(1,3));
show();
sleep(random(1,3));
setTimer(.3);
}
//#CLIENTSIDE
function onWasShot(){
this.chat = "Hit!";
triggerserver("gui","-System","addrupees",player.account,int(random(0,20)));
sleep(.5);
this.chat = "Shoot Me!";
}