28.07.2016, 11:25
First hello guys, i made my event system and all maps is dm i don't know how i make TDM because its /event and it with textdraw countdown so i don't know how i make Team Balancer, Any help please.
#define TEAM_A 0 #define TEAM_B 1 new CountT_A, CountT_B; if(CountT_A < 1 || CountT_A < CountT_B) { SetPlayerTeam(playerid, TEAM_A); ++ CountT_A; } else if(CountT_B < 1 || CountT_B < CountT_A) { SetPlayerTeam(playerid, TEAM_B); ++ CountT_B; }
CMD:event(playerid) { if(CountT_A < 1 || CountT_A < CountT_B) { SetPlayerTeam(playerid, TEAM_A); ++ CountT_A; SendClientMessage(playerid, -1, "You're in team A"); SetPlayerPos(playerid, x, y, z); // pos of team a } else if(CountT_B < 1 || CountT_B < CountT_A) { SetPlayerTeam(playerid, TEAM_B); ++ CountT_B; SendClientMessage(playerid, -1, "You're in team B"); SetPlayerPos(playerid, x, y, z); // pos of team b } return true; }