Would this code work??
#1

hi,
sorry for this question but i just dont have the possibility to test this code with more than 2 players.
Would this code work?
This code shall prevent one team to get overbalanced.
pawn Код:
new Count1, Count2;
        for(new p = 0; p < GetMaxPlayers(); p++)
    {
        if (GetPlayerTeam(p) == TEAM_POLICE) Count1++;
        else if (GetPlayerTeam(p) == TEAM_TERRORISTS) Count2++;
    }
        if ((Count1 > Count2) && GetPlayerTeam(playerid) == TEAM_TERRORISTS)
    {
        GameTextForPlayer(playerid, "~r~This team is full!", 600, 5);
        return 0;
    }
        else if ((Count2 > Count1) && GetPlayerTeam(playerid) == TEAM_POLICE)
    {
        GameTextForPlayer(playerid, "~r~This team is full!", 600, 5);
        return 0;
    }
Reply
#2

Give me the IP, I'd be happy to test it for you
Reply
#3

thx for ur offer but my server is not hosted yet and i dont want to port forward now....
Can someone tell me if this code is going to work pls?
Reply
#4

should work
Reply
#5

ok thx.
I hope ure right
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)