Specating enemy after dead if team #1 is fully dead
#1

I am trying to make if team 1 is completely dead it would spec team 2, it's a no-respawn gamemode.

Currently i have this code:
pawn Code:
stock GetRandomTeamPlayerForPlayer(playerid)
{
    new rand = -1;
    new team = mTeam[playerid];
    new Float:health;
    while(rand == -1)
    {
        rand = random(MAX_PLAYERS);
        if(!IsPlayerConnected(rand)) rand = -1;
        if(TeamCounting[team] != 0 && team == mTeam[rand]) rand = -1;
        GetPlayerHealth(rand, health);
        if(health <= 0) rand = -1;
    }
    return rand;
}
Butt his code makes everyone respawn.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)