Loop help
#1

Hello guys!
I have created a gang system where the gang vehicles are respawning with command, but I have a small problem.
I can't stop the loop
Quote:

for(new i = 0; i <= MAX_PLAYERS; i++)

In the loop I check if player is gang leader and respawn only the vehicles of the gang.
Can you help me, I want to stop the loop, because when I respawn the vehicles, they are successfully respawned, but it calls
Quote:

Unknow command.

Sorry for my bad english, I hope you understand me!
Reply
#2

I forgot to say, the
Quote:

Unknow command.

appear, because MAX_VEHICLES are more than the vehicles, I want to respawn.
Reply
#3

SOLVED!
Reply
#4

you don't need to make much replies, Just edit your post, And the next time you make such a thread, either post a code, or we won't help..
Reply
#5

idk if i understood, however to break a loop you simply use 'break;'.

eg:
PHP код:
for(new =0i<max_playersi++)
// when u found what u wanted
break; 
Reply
#6

Quote:
Originally Posted by iLearner
Посмотреть сообщение
idk if i understood, however to break a loop you simply use 'break;'.

eg:
PHP код:
for(new =0i<max_playersi++)
// when u found what u wanted
break; 
He already said that he solved it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)