#1

pawn Код:
new MembersPrisioners[MAX_PLAYERS];

pawn Код:
public OnPlayerRequestSpawn(playerid)
{
    if(Team[playerid] == 1)
    {
        MembersPrisioners++; // This line is wrong, how would u do it ?
    }
    return 1;
}

I want it to count the players in that team, so later I can do a team balancer.
Reply
#2

If it just counts the members in that specific team then you don't need the array (MAX_PLAYERS).
Reply
#3

pawn Код:
new MembersPrisioners;

pawn Код:
public OnPlayerRequestSpawn(playerid)
{
    if(Team[playerid] == 1)
    {
        MembersPrisioners++; // Like this ?
    }
    return 1;
}
Reply
#4

Quote:
Originally Posted by marinov
Посмотреть сообщение
pawn Код:
new MembersPrisioners;

pawn Код:
public OnPlayerRequestSpawn(playerid)
{
    if(Team[playerid] == 1)
    {
        MembersPrisioners++; // Like this ?
    }
    return 1;
}
[MAX_PLAYERS] used to create a var for each player on the server. Just use the function marinov posted.
Reply
#5

Correct tommy, As he posted. MAX_PLAYERS is creating a variable for each player everytime its called, for a team balancer use like he posted.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)