11.03.2017, 13:27
PHP код:
#define MAX_PLAYERS_IN_TEAM 15
IsTeamFull(TeamID)
{
new Count, bool:rt;
for(new i =0; i< MAX_PLAYERS; i++)
{
if(GetPlayerTeam(i) == TeamID)
{
Count++;
}
}
if(Count == MAX_PLAYERS_IN_TEAM)
{
return true;
}
else return false;
}
IsHightestTeam(TeamID)
{
new id, output = -1, Teams[MAX_TEAMS], bool:rt;
for(new i =0; i< MAX_PLAYERS; i++)
{
for(new k = 0; k < MAX_TEAMS; k++)
{
if(GetPlayerTeam(i) == k)
{
Teams[k]++;
}
}
}
for (new ht; ht != sizeof(Teams); ++ht)
{
if (Teams[ht] > output) output = Teams[ht], id = ht;
}
if(id == TeamID && id != -1)
{
return true;
}
else return false;
}