23.11.2010, 13:57
Hey, i have been trying to fix my "team balancer" but it keeps being bugged.
I wont allow me to spawn.
* pi[playerid][Classid] = classid
* CopFull/MafiaFull = 16 - Max Players per team
* Cpolice/Cmafia = players on each team
I wont allow me to spawn.
pawn Код:
public OnPlayerRequestSpawn(playerid)
{
if(Cmafia >= MafiaFull)
{
if(pi[playerid][Classid] == 1 || 2 || 3)
{
ForceClassSelection(playerid);
return 0;
}
else
{
if(pi[playerid][Classid] == 1 || 2 || 3)
{
pi[playerid][Mafia] = 1;
}
}
}
if(Cpolice <= CopFull)
{
if(pi[playerid][Classid] == 4 || 5 || 6)
{
ForceClassSelection(playerid);
return 0;
}
else
{
if(pi[playerid][Classid] == 4 || 5 || 6)
{
pi[playerid][Police] = 1;
}
}
}
return 1;
}
* CopFull/MafiaFull = 16 - Max Players per team
* Cpolice/Cmafia = players on each team