team balance
#1

hi i need team balance to my server only for 2 teams
i saw too many codes before all not work.
Reply
#2

any help?
Reply
#3

U mean, balance the amount of players on each team?

Reply
#4

Quote:
Originally Posted by KDlivest954
U mean, balance the amount of players on each team?

yeah thats i meant
please help me
Reply
#5

any help?
Reply
#6

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 Код:
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;
}
Note : This is just an example.
I don't know either if this will work.
Reply
#7

Quote:
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 Код:
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;
}
Note : This is just an example.
I don't know either if this will work.
thanks i will try and tell you and sory for break section rules
Reply
#8

Quote:
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 Код:
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;
}
Note : This is just an example.
I don't know either if this will work.
may be should edit OnPlayerSpawn to OnPlayerRequestSpawn?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)