need help with teams
#1

i use TDM team deathmatch
and need max players in team 15
how ???
Reply
#2

so your meaning a team balancer?
Reply
#3

well you can try it with this:
#define MAX_PLAYERS_IN_TEAM (15)
Reply
#4

team = team name ok
Reply
#5

no that not i needed
it's in team full send message this team is full choose other team
Reply
#6

Thats a team balancer wow-.-
ill find one for u wait couple of min
Reply
#7

i got this from grim_

since your to lazy to search


playerid - the player
team_1 - the team that is being calculated by the ratio
team_2 - the other team
ratio - the ratio of which to balance team 1 from team 2
teamvar - the variable to hold the player's team


Код:
OnPlayerSpawn(playerid)
{
  TeamBalance(playerid, TEAM_NAME, TEAM_NAME, 1, Team); // Sets the balance of the teams equal
}
Код:
TeamBalance(playerid, team_1, team_2, ratio, teamvar[]) {
  new result_var = (Players() / ratio);
  for(new x = 0; x < MAX_PLAYERS; x++) {
   if(teamvar[x] == team_1) {
     count++;
   }
  }
  if(count < result_var) {
   teamvar[playerid] = team_1;
  } else {
   teamvar[playerid] = team_2;
  }
}
Reply
#8

can you learn me wherre i paste it
Reply
#9

just read this

http://forum.sa-mp.com/showthread.ph...t=Team+balance
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)