Need some help with team balancer
#1

My brain froze, basically I need to get IDs of teams which WERE NOT chosen.
The code I made will just make the notclicked to the latest team ID, and I want to store all team IDs which weren't chosen.
Any ideas, suggestions?

I know there's a way, I just can't think of it..
pawn Код:
new notclicked;
    for(new x=0; x < MAX_TEAMS; x++)
    {
        if(clickedid != Teams[x]) notclicked = x;
        if(clickedid == Teams[x])
        {
            if(TeamCount[x] > TeamCount[notclicked]) return SendClientMessage(playerid, RED, "This team is full."), 1;
            SetPlayerTeam(playerid, x);
Reply
#2

anyone..?
Reply
#3

Before u post check on ******.

EDIT: check dis https://sampforum.blast.hk/showthread.php?tid=273362
Reply
#4

pawn Код:
public OnPlayerRequestClass(playerid, classid)    
{
    new notclicked;
    for(new x=0; x < MAX_TEAMS; x++)
    {
        if(clickedid != Teams[x]) notclicked = x;
        if(clickedid == Teams[x])
        {
            if(TeamCount[x] > TeamCount[notclicked]) return SendClientMessage(playerid, RED, "This team is full.");
            SetPlayerTeam(playerid, x);
            return 0;
         }
        return 1;
}/
try this
Reply
#5

I use clickable textdraws, I only need to somehow store the -not- clicked teams into a variable/array and then compare it's playercount with playercount of team which was chosen.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)