i need help whit zombies server team balancer - 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)
+--- Thread: i need help whit zombies server team balancer (
/showthread.php?tid=352216)
i need help whit zombies server team balancer -
Ossama313 - 18.06.2012
i need help whit zombies server team balancer
and thanx
sry for my bad english i am eygptin i know franch more tha english
Re: i need help whit zombies server team balancer -
Faisal_khan - 19.06.2012
What are your team defines of Zombies and Humans? Do you have 2 teams? I have this code change it according to your script:
pawn Код:
new Count1,Count2;
public OnPlayerSpawn ( playerid ) {
for(new i = 0; i < GetMaxPlayers(); i++)
{
if (gTeam[playerid] == TEAM_RED) Count1++;
else if (gTeam[playerid] == TEAM_GREEN) Count2++;
}
}
public OnPlayerRequestSpawn(playerid)
{
if ((Count1 > Count2) && gTeam[playerid] == TEAM_GREEN)
{
SendClientMessage(playerid,COLOR_RED, "[BALANCER] Balancing teams. Choose Another Team");
return 0;
}
else if ((Count2 > Count1) && gTeam[playerid] == TEAM_RED)
{
SendClientMessage(playerid,COLOR_RED, "[BALANCER] Balancing teams. Choose Another Team");
return 0;
}
return 1;
}
Re: i need help whit zombies server team balancer -
Ossama313 - 19.06.2012
no i dnt want an full team balancer i need a team balancer that if there are 5 humans and 1 zombie 1 human well turn into an zombie plz
i need need need it
and thanx bro