04.03.2018, 22:12
(
Последний раз редактировалось insus100; 04.03.2018 в 22:43.
)
Hello everybody! So Im using this loop:
I have tried using a simple:
Doesnt work, I have used if too. Thanks for your help guys..
PHP код:
new sorte;//This is the random player we are choosing.
//now the loop:
do
{
sorte = Iter_Random(Player);//I use foreach.
}
while(!Logado[sorte] || pInfo[sorte][pIdade] == 1);
//While he isnt logged OR he is Jailed (Using pIdade for Jailed, yeah) Repeat the loop.
fInfo[sorte][fBandit] = 1;//Here I set the faction to spawn
foreach(Player, i)
if(i != sorte || pInfo[i][pIdade] == 1 || pInfo[i][pAviso] > 0)// If player isnt bandit and he isnt jailed.
{
fInfo[i][fPolice] = 1; //Then, he is a cop.
}
So The problem is that if you are jailed, you still spawn to the game (being a cop) and it's so annoying damn.
PHP код:
while(!Logado[sorte] || pInfo[sorte][pIdade] == 1 || pInfo[sorte][pAviso] > 0) //If he isnt logged in OR he is jailed.
{
sorte = Iter_Random(Player); //Pick random player(foreach)
}