HELP WITH BALANCE - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: HELP WITH BALANCE (
/showthread.php?tid=149998)
HELP WITH BALANCE -
MEXICAN_NORTE - 24.05.2010
HI I SEARCHED AROUND ALL OVER THE FORUMS AND I NEVER REALLY FOUND A GOOD TOPIC THAT TELLS ME HOW TO BALANCE MY TEAM WELL HERE IS SOMEONE CAN HELP ME HOW TO MAKE A SIMPLE BALANCER OF TEAMS I HAVE 11 TEAMS WITH ARE THEESE
pawn Code:
if(gTeam[playerid] == TEAM_AZTECAS) { SetPlayerColor( playerid, AZTECAS_COLOR); }
else if(gTeam[playerid] == TEAM_VAGOS) { SetPlayerColor( playerid, VAGOS_COLOR); }
else if(gTeam[playerid] == TEAM_BALLAS) { SetPlayerColor( playerid, BALLAS_COLOR); }
else if(gTeam[playerid] == TEAM_GROVE) { SetPlayerColor( playerid, GROVE_COLOR); }
else if(gTeam[playerid] == TEAM_DEALERS) { SetPlayerColor( playerid, DEALERS_COLOR); }
else if(gTeam[playerid] == TEAM_COPS) { SetPlayerColor( playerid, COPS_COLOR); }
else if(gTeam[playerid] == TEAM_BIKERS) { SetPlayerColor( playerid, BIKERS_COLOR); }
else if(gTeam[playerid] == TEAM_RAPPERS) { SetPlayerColor( playerid, RAPPERS_COLOR); }
else if(gTeam[playerid] == TEAM_GUARDS) { SetPlayerColor( playerid, GUARDS_COLOR); }
else if(gTeam[playerid] == TEAM_HOODLUMS){ SetPlayerColor( playerid, HOODLUMS_COLOR); }
else if(gTeam[playerid] == TEAM_WORKERS) { SetPlayerColor( playerid, WORKERS_COLOR); }
I JUT WANT IT TO BE LIKE 4 PLAYERS ON A TEAM CAN SOMEONE HELP ME PLZ CUZ I REALLY NEED THIS I WILL REALLY APRECIATE IT
Re: HELP WITH BALANCE -
Hiddos - 24.05.2010
HI THERE I SUGGEST YOU USE PARAMETERS THAT CHECK IF A TEAM CONTAINS 4 PLAYERS AND IF SO DENY HIS ACCESS TO SPAWNING
Re: HELP WITH BALANCE -
DJDhan - 24.05.2010
Quote:
Originally Posted by Hiddos
HI THERE I SUGGEST YOU USE PARAMETERS THAT CHECK IF A TEAM CONTAINS 4 PLAYERS AND IF SO DENY HIS ACCESS TO SPAWNING
|
Why 4 players?
It is going to be long since you have 11 teams, you need 11 counters to store number of player in each team. Then OnPlayerRequstSpawn add your balancer. return 0 if he is trying to spawn in a team which makes the game un balanced.
Re: HELP WITH BALANCE -
MEXICAN_NORTE - 26.05.2010
yea but how do i make the team balancer ??/cause i really dont have idea of how to make one and yea it could be to have morep layers like 8 on each team
Re: HELP WITH BALANCE -
MEXICAN_NORTE - 29.05.2010
sorry fo bump
Re: HELP WITH BALANCE -
MEXICAN_NORTE - 30.05.2010
help anyone please?? i keep on searching and i still dont find one
Re: HELP WITH BALANCE -
azzerking - 30.05.2010
I think What He Means Is He Wants Codes For a Team Balancer I would give u one but im kinda busy now
Re: HELP WITH BALANCE -
ViruZZzZ_ChiLLL - 30.05.2010
It's a little bit
easy Mexicano :P Go to MSN and I'll explain everything
Re: HELP WITH BALANCE -
Nero_3D - 30.05.2010
pawn Code:
//OnPlayerConnect
Players++;
pawn Code:
//OnPlayerDisconnect
Players--;
pawn Code:
//OnPlayerRequestSpawn
new tmembers = -1;
#define NUM_TEAMS (11)
for(new i; i != MAX_PLAYERS; i++) if(gTeam[playerid] == gTeam[i]) tmembers++;
if(tmembers >= floatround((Players / NUM_TEAMS), floatround_ceil))
return !SendClientMessage(playerid 0xFFFFFFAA, "Please choose another team!");
That would be an easy example of a team balancer, it stops the player from spawning if the team is at his maximum size
The maximum size is Players divided through team count