CLEO Help How to leap on alternative registered command while on loop?

CLEO related
Status
Not open for further replies.

Husnain

Well-known member
Joined
May 20, 2016
Messages
228
Reaction score
9
Location
Mars
C++:
{$CLEO .cs}
0000:

0B34: samp register_client_command "abc" to_label @abc
0B34: samp register_client_command "dis" to_label @dis

:blank
wait 0
jump @blank

:abc
wait 18000
say "/find 22"
0B43: samp cmd_ret
jump @abc

:dis
wait 0
0B63: samp unregister_client_command "abc"
0B43: samp cmd_ret

Here is the code. Now what I want that the code should keep /find the id 22 until I won't register another command "dis" to disable it but the problem is I can't figure out the way. I mean I want /find to keep in loop until I won't type /dis to disable it
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,115
Solutions
5
Reaction score
879
Location
Lithuania
Should work.

PHP:
{$CLEO .cs}

0000:

repeat
wait 0
until 0afa:

0B34: samp register_client_command "abc" to_label @abc
0B34: samp register_client_command "dis" to_label @dis

32@ = 0 // keep while timer 

:blank
wait 0

if and
0@ == true
32@ > 18000
then
    say "/find 22"
    32@ = 0
end
jump @blank

:abc
0@ = true
0B43: samp cmd_ret

:dis
wait 0
0@ = false
0B63: samp unregister_client_command "abc"
0B43: samp cmd_ret
 
Status
Not open for further replies.
Top