29.06.2014, 11:12
Would something like this work?
pawn Code:
#include <foreach>
new Iterator:DM<MAX_PLAYERS>;
//OnPlayerDisconnect
if(Iter_Contains(DM, playerid)) Iter_Remove(DM, playerid);
//OnPlayerDeath
if(Iter_Contains(DM, playerid)) Iter_Remove(DM, playerid);
RoundCheck();
PlayerSpectatePlayer(playerid, Iter_Random(DM));
//The function
forward RoundCheck();
public RoundCheck()
{
new Count;
foreach(new x:DM)
{
Count++;
}
if(Count == 1) //Last player alive, place some kind of end round function here
}