21.03.2010, 17:34
pawn Код:
// Top
new Spectating[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
Spectating[playerid] = 0;
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
TogglePlayerSpectating(playerid, 1);
PlayerSpectatePlayer(playerid, killerid);
Spectating[playerid] = 1;
return 1;
}
// When new round starts
for(new i=0;i<=MAX_PLAYERS; i++)
{
if(Spectating[i] == 1)
{
TogglePlayerSpectating(i, 0);
SpawnPlayer(i);
Spectating[i] = 0;
}
}