25.10.2010, 07:37
pawn Код:
new spectateTimer[MAX_PLAYERS];
foward respawnCounter(playerid);
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
TogglePlayerSpectating(playerid, 1);
PlayerSpectatePlayer(playerid, killerid);
spectateTimer[playerid] = SetTimerEx("respawnCounter", 1000, true, "d" , playerid);
return 1;
}
pawn Код:
public respawnCounter(playerid)
{
new string[21];
format(string, sizeof(string), "Respawning in %d", GetPVarInt(playerid, "rCount");
GameTextForPlayer(playerid, string, 1000, 4);
if(GetPVarInt(playerid, "rCount") == 0)
{
TogglePlayerSpectating(playerid, 0);
KillTimer(spectateTimer[playerid]);
}
return 1;
}

