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

i have updated the code:
It's not spectating the enemy, but just looking at the water + bridge...
pawn Code:
stock GetRandomTeamPlayerForPlayer(playerid)
{
    new rand = -1;
    new Float:health;
    if(ThisMode == 1)
    {
    while(rand == -1)
    {
    rand = random(MAX_PLAYERS);
    if(mTeam[rand] != mTeam[playerid] || !IsPlayerConnected(rand)) rand = -1;
    GetPlayerHealth(rand, health);
    if(health <= 0) rand = -1;
    }
    return rand;
}
    else if(ThisMode == 2)
    {
    while(rand == -1)
    {
    rand = random(MAX_PLAYERS);
    if(!IsPlayerConnected(rand)) rand = -1;
    GetPlayerHealth(rand, health);
    if(health <= 0) rand = -1;
    }
}
    return rand;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)