05.09.2010, 14:44
//OnPlayerDeath:
pawn Код:
TogglePlayerSpectating(playerid, true);
SetTimerEx("Speccing",2000,false,"d",playerid);
pawn Код:
Speccing(playerid)
{
new Float:Health;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i)) continue;
GetPlayerHealth(i, Health);
if(Health < 1) continue;
if(mTeam[playerid] == mTeam[i])
{
PlayerSpectatePlayer(playerid, i);
break;
}
if(TeamCounting[mTeam[playerid]-1] == 0)
{
PlayerSpectatePlayer(playerid, i);
break;
}
}
}