CLEO Help How to loop...

CLEO related
Status
Not open for further replies.

0BE4

Active member
Joined
Jan 15, 2017
Messages
124
Reaction score
2
Code:
{$CLEO .cs}

//-------------MAIN---------------
0000: NOP

0B34: samp register_client_command "loop" to_label @loop

:WAIT
wait 100
goto @WAIT
:loop
chatmsg " " -1
SAMP.CmdRet
jump @loop

so what i am trying to do here is to keep putting space as a chat message when loop is typed as command but what really happens is that it puts only one space as chat message and doesn't loop anything
 

Opcode.eXe

Expert
Joined
Feb 18, 2013
Messages
1,492
Reaction score
236
Location
( ͡° ͜ʖ ͡°)
Your :loop label will be only called ONCE when you type /loop.
I just added a toggle for it

{$CLEO .cs}
0000: NOP
0B34: samp register_client_command "loop" to_label @loop
0@ = false


:WAIT
wait 100
IF
0@ == TRUE
then
chatmsg " " -1
end
goto @WAIT


:loop
if
0@ == true
then
0@ = false
else
0@ = true
end
0B43: samp cmd_ret
 
Status
Not open for further replies.
Top