19.06.2010, 01:42
hi i need team balance to my server only for 2 teams
i saw too many codes before all not work.
i saw too many codes before all not work.
Originally Posted by KDlivest954
U mean, balance the amount of players on each team?
|
new Team1, Team2; // On top
public OnPlayerSpawn(playerid)
{
if(Team1 == 5) return ForceClassSelection(playerid); // It means that if there is 5 players in the team he will be forced to select class again
if(Team2 == 5) return ForceClassSelection(playerid);
if(gTeam[playerid] == BlueTeam){
Team1 ++;}
if(gTeam[playerid] == RedTeam){
Team2 ++;}
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
if(gTeam[playerid] == BlueTeam){
Team1 --;}
if(gTeam[playerid] == RedTeam){
Team2 --;}
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
if(gTeam[playerid] == BlueTeam){
Team1 --;}
if(gTeam[playerid] == RedTeam){
Team2 --;}
return 1;
}
Originally Posted by ViruZZzZ_ChiLLL
First : You can only bump per 12 hour if nobody
has replied to your help. Please do so refer here : http://forum.sa-mp.com/index.php?topic=67900.0 Second : Try this : pawn Код:
I don't know either if this will work. |
Originally Posted by ViruZZzZ_ChiLLL
First : You can only bump per 12 hour if nobody
has replied to your help. Please do so refer here : http://forum.sa-mp.com/index.php?topic=67900.0 Second : Try this : pawn Код:
I don't know either if this will work. |