Quote:
Originally Posted by CaptainBoi
PHP код:
new killtimer[MAX_PLAYERS];
CMD:kill(playerid)
{
SendClientMessage(playerid, 0xFF0000FF, "wait 10 seconds to suicide");
killtimer[playerid] = SetTimerEx("killhim", 10000, false, "i", playerid);
return 1;
}
forward killhim(playerid);
public killhim(playerid)
{
SetPlayerHealth(playerid, 0.0);
}
//Onplayerdisconnect
KillTimer(killtimer);
you have make it like this what if that player disconnects the server in timeout or something so that timer get kill otherwise the next player will join with that id will get killed as he spawns.
|
No it won't, the first one is hell fine, Becoz he got SetTimerEx(*Code*, playerid)
The playerid in it will kill only the Playerid...