Ending "rounds" and determining alive players
#5

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
}
Reply


Messages In This Thread
Ending "rounds" and determining alive players - by [NWA]Hannes - 29.06.2014, 10:42
Re: Ending "rounds" and determining alive players - by BroZeus - 29.06.2014, 10:45
Re: Ending "rounds" and determining alive players - by [NWA]Hannes - 29.06.2014, 10:51
Re: Ending "rounds" and determining alive players - by BroZeus - 29.06.2014, 10:57
Re: Ending "rounds" and determining alive players - by [NWA]Hannes - 29.06.2014, 11:12
Re: Ending "rounds" and determining alive players - by BroZeus - 29.06.2014, 11:49

Forum Jump:


Users browsing this thread: 1 Guest(s)