30.08.2010, 10:56
(
Last edited by LifeStyle; 31/08/2010 at 06:43 PM.
)
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:
Butt his code makes everyone respawn.
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;
}