06.07.2013, 05:28
so under OnPlayerRequestClass i have this(this is really frustrating me out!!!)(it's a team balancer)
now i also have this as a stock
HOW DO I MAKE THIS WORK !!!!
Код:
if(EUROPE > USA && GetPlayerTeam(playerid) == EUROPE) { GameTextForPlayer(playerid, "~r~Team Full!~n~~w~Choose Another Team!", 3000, 5); return 0; } else if(USA > EUROPE && GetPlayerTeam(playerid) == USA) { GameTextForPlayer(playerid, "~r~Team Full!~n~~w~Choose Another Team!", 3000, 5); return 0; } if(RUSSIA > CHINA && GetPlayerTeam(playerid) == RUSSIA) { GameTextForPlayer(playerid, "~r~Team Full!~n~~w~Choose Another Team!", 3000, 5); return 0; } else if(CHINA > RUSSIA && GetPlayerTeam(playerid) == CHINA) { GameTextForPlayer(playerid, "~r~Team Full!~n~~w~Choose Another Team!", 3000, 5); return 0; } TextDrawShowForPlayer(playerid, title); return 1; }
Код:
stock GetPlayersInTeamFromMaxPlayers(teamid) { new playercount = 0; for(new i = 0; i < MAX_PLAYERS; i++) { if(GetPlayerState(i) == PLAYER_STATE_NONE) continue; if(GetPlayerTeam(i) != teamid) continue; playercount++; } return playercount; }