View Single Post
  #1  
Old 05-28-2009, 09:29 PM
Struggler Struggler is offline
Zone Repulser =D
Struggler's Avatar
Join Date: May 2006
Posts: 54
Struggler is an unknown quantity at this point
Problem With Destroy()

I'm havin troubles getting this script to delete itself after the player touchs it.. Can someone tell me whats worng with it?
PHP Code:
function onCreated(){
  
setshape13232);
  
setimg"beer.png");
}
function 
onActionServerside(){
  if(
params[0] == "destroy"){
    
destroy();
  }
}
//#CLIENTSIDE
function onPlayerTouchsme(){
  
setimg"beer.png");
  
setshape13232);
  
player.hearts += 5;
  
player.bombs += 5;
  
player.darts += 5;
  
triggerserver("gui",this.name,"destroy");
  
destroy();

Reply With Quote