26.09.2009, 03:03
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid == INVALID_PLAYER_ID)
{
SendDeathMessage(INVALID_PLAYER_ID,playerid,reason);
}
else
{
SendDeathMessage(killerid,playerid,reason);
}
if(PlayerDied[playerid] == true)
{
PlayerDied[playerid] = false;
if(KillerID[playerid] != INVALID_PLAYER_ID)
TogglePlayerSpectating(playerid,1);
PlayerSpectatePlayer(playerid,killerid);
SetTimerEx("spawn",10000,1, "i", playerid);
}
else
{
TogglePlayerSpectating(playerid, 0);
}
return 1;
}