29.06.2014, 10:57
just an example
pawn Code:
#include <foreach>
new Iterator:TDM<MAX_PLAYERS>;
Iter_Add(TDM, playerid);//now this when a player joins
//now this all when a player dies
if(Iter_Contains(TDM, playerid))Iter_Remove(TDM, playerid);//this should be in player disconnect too
PlayerSpectatePlayer(playerid, Iter_Random(TDM));//to spectate random players