07.10.2010, 23:21
hello guys, i've made a Bomb script, which when a player types /bomb, it puts the bomb(with object ID 1252) on the ground, then 5 secs after (with SetTimerEx) destroy it. so i use an other callback for the bomb to explode, and destroy the object... But it doesn't work :S
with what should i replace objectid in :
DestroyObject(objectid)
in the Custom Callback?
here's some of my code:
thanks for help
with what should i replace objectid in :
DestroyObject(objectid)
in the Custom Callback?
here's some of my code:
Код:
//somewhere in OnPlayerCommandText:
if(strcmp(cmdtext, "/bomb", true) == 0)
{
//my stuff
SetTimerEx("BombDetonate",5000,false,"",0,"");
CreateObject(1252,X,Y,Z,14.283400,0.0,0.0,100.0);
return 1;
}
Код:
//my custom callback
public BombDetonate(playerid)
{
//my stuff
DestroyObject(objectid);
}



