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(){
setshape( 1, 32, 32);
setimg( "beer.png");
}
function onActionServerside(){
if(params[0] == "destroy"){
destroy();
}
}
//#CLIENTSIDE
function onPlayerTouchsme(){
setimg( "beer.png");
setshape( 1, 32, 32);
player.hearts += 5;
player.bombs += 5;
player.darts += 5;
triggerserver("gui",this.name,"destroy");
destroy();
}