[Help] my auto team balance is bugging - 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: [Help] my auto team balance is bugging (
/showthread.php?tid=299370)
[Help] my auto team balance is bugging -
Amine_Mejrhirrou - 25.11.2011
hello all
i've got a problem, i saw that my auto team balance chose the same persone more offen than others ! every time that the player X (the players who is 90% auto-team balanced) the auto balance turn him in to an other team ... any solution ?
Re: [Help] my auto team balance is bugging -
Pharrel - 25.11.2011
Can you show us some code?
Re : [Help] my auto team balance is bugging -
Amine_Mejrhirrou - 25.11.2011
yeah ok
Код:
if(Players > 1 && Players < 6)
{
if (Counter1 >= 15&&Counter1 <= 280)
{
if(GetPlayersFromTeam(2) == 0)
{
new Winner = random(Players);
if(IsPlayerConnected(Winner)&& team[Winner] != 2)
{
new String[128], Name[MAX_PLAYER_NAME];
GetPlayerName(Winner, Name, MAX_PLAYER_NAME);
format(String, 120, "{FFFF00} %s has been {FF0000}zombieficated [BOMMER]{FFFF00} by the auto-team-balance", Name);
SendClientMessageToAll(RED, String);
return 1;
}
}
return 1;
}
}
and this is the important thing
Код:
stock Random(min, max)
{
new a = random(max - min) + min;
return a;
}