IsTeamFull
#1

Hello,

Recently i've been working on a small function that check if the team which's ID is passed as parameter is full (has more members then others?), but i literally failed as i am really bad at maths, would anyone mind giving me a hand?

This the function that i made which i dont think is good / accurate:
PHP код:
IsTeamFull(TeamID)
{
    new 
Teams[MAX_TEAMS], bool:rt;
    for(new 
=0iMAX_PLAYERSi++)
    {
        for(new 
0MAX_TEAMSk++)
        {
             if((
GetPlayerTeam(i) == k)
             {
                
Teams[k]++;
             }
        }
    }
    for(new 
0iMAX_TEAMSi++)
    {
        if(
Teams[i] < Teams[TeamID])
        {
            
rt true;
        }
        else
        {
            
rt false;
        }
    }
    return 
rt;

Reply


Messages In This Thread
IsTeamFull - by iLearner - 11.03.2017, 12:55
Re: IsTeamFull - by SyS - 11.03.2017, 13:09
Re: IsTeamFull - by TitanX - 11.03.2017, 13:10
Re: IsTeamFull - by iLearner - 11.03.2017, 13:12
Re: IsTeamFull - by TopShooter2 - 11.03.2017, 13:14
Re: IsTeamFull - by SyS - 11.03.2017, 13:22
Re: IsTeamFull - by TitanX - 11.03.2017, 13:27
Re: IsTeamFull - by SyS - 11.03.2017, 13:46
Re: IsTeamFull - by TitanX - 11.03.2017, 13:54
Re: IsTeamFull - by Trucido - 11.03.2017, 16:35

Forum Jump:


Users browsing this thread: 4 Guest(s)