do while loop not working
#1

Hello everybody! So Im using this loop:
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(Playeri)
if(
!= sorte || pInfo[i][pIdade] == || 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 jailedyou still spawn to the game (being a cop) and it's so annoying damn. 
I have tried using a simple:
PHP код:
while(!Logado[sorte] || pInfo[sorte][pIdade] == || pInfo[sorte][pAviso] > 0//If he isnt logged in OR he is jailed.
    
{
             
sorte Iter_Random(Player); //Pick random player(foreach)
    

Doesnt work, I have used if too. Thanks for your help guys..
Reply


Messages In This Thread
do while loop not working - by insus100 - 04.03.2018, 22:12
Re: do while loop not working - by AdamsLT - 05.03.2018, 00:28
Re: do while loop not working - by insus100 - 05.03.2018, 10:41
Re: do while loop not working - by insus100 - 05.03.2018, 16:53

Forum Jump:


Users browsing this thread: 1 Guest(s)