02.02.2014, 20:52
pawn Код:
#define MAX_MEMBERS YourNumber // Defines the MAX_MEMBERS
Membercount = 0;
PHP код:
foreach (Player, i) // Looping through all players.
{
if (IsPlayerConnected(i))
{
if(GetPlayerTeam(i) == classid) // Looks for players with the same classid
Membercount ++; // Increases the Membercount variable.
}
}
PHP код:
if(Membercount => MAX_MEMBERS) // Checks if the membercount is equal or bigger then the max_members define
return SendClientMessage(playerid, -1, "This team is full"); // It it's like this?, Send an error message