CLEO Help More keybinds in a cleo

CLEO related
Status
Not open for further replies.

ThermaL

Expert
Joined
Oct 23, 2013
Messages
1,593
Reaction score
3
How do I put more keybinds in a cleo?

Code:
{$VERSION 3.1.0027}
{$CLEO .cs}
0000: nop

if 
8AF7: get_samp_base_to 0@
then 
0A93: end_custom_thread
end
repeat 
wait 400
until 0AFA: is_samp_structures_available

:BIND_01
wait 0
if and
0AB0:   key_pressed 102
0AFA:   is_samp_structures_available
else_jump @BIND_01
0AF9: samp say_msg "/fill"
wait 500
jump @BIND_01

:BIND_02
wait 0
if and
0AB0:   key_pressed 100
0AFA:   is_samp_structures_available
else_jump @BIND_02
0AF9: samp say_msg "/engine"
wait 500
jump @BIND_02

/fill works ok but /engine doesn't.
 

Monstercat

Well-known member
Joined
Feb 26, 2013
Messages
281
Reaction score
5
Here...

Code:
{$CLEO .cs}
THREAD "KEYBINDER"

if 
  8AF7: get_samp_base_to 0@
then 
    0A93: end_custom_thread
end
repeat 
    wait 400
until 0AFA: is_samp_structures_available


WHILE TRUE
WAIT 0
    if
    0ADC:   test_cheat "KeyBinder"
    THEN
        if
        31@ == 0 
        then
        0ACD: show_text_highpriority "KeyBinder on." time 1337
        018C: play_sound 1083 at 0.0 0.0 0.0
        31@ = 1 
        else
        0ACD: show_text_highpriority "KeyBinder off." time 1337
        018C: play_sound 1084 at 0.0 0.0 0.0  
        31@ = 0 
        end
    END
    if
    31@ == 1
    then      
        if and
        0AB0:   key_pressed 49
        8B21: not  samp is_chat_opened
        then
            0AF9: samp say_msg "Test 1"
            wait 200 
        end
        
        if and
        0AB0:   key_pressed 50
        8B21: not  samp is_chat_opened
        then
            0AF9: samp say_msg "Test 2"
            wait 200
        end
        
        if and
        0AB0:   key_pressed 51
        8B21: not  samp is_chat_opened
        then
            0AF9: samp say_msg "Test 3"
            wait 200
        end                                            
    end
END
 

xzytro

God
Joined
Apr 1, 2013
Messages
2,294
Reaction score
7
You don't actually need that much complicated things(i mean the longass script that monstercat wrote). The error which you made was just at the wrong jumps. You ALMOST did it. Lemme show you those spots :

:BIND_01
wait 0
if and
0AB0: key_pressed 102
0AFA: is_samp_structures_available
else_jump @BIND_01 //should have been else_jump @BIND_02, to check the other key_pressed
0AF9: samp say_msg "/fill"
wait 500
jump @BIND_01

:BIND_02
wait 0
if and
0AB0: key_pressed 100
0AFA: is_samp_structures_available
else_jump @BIND_02 //should have been else_jump @BIND_01, to check the first key_pressed
0AF9: samp say_msg "/engine"
wait 500
jump @BIND_02
 

ThermaL

Expert
Joined
Oct 23, 2013
Messages
1,593
Reaction score
3
You don't actually need that much complicated things(i mean the longass script that monstercat wrote). The error which you made was just at the wrong jumps. You ALMOST did it. Lemme show you those spots :

:BIND_01
wait 0
if and
0AB0: key_pressed 102
0AFA: is_samp_structures_available
else_jump @BIND_01 //should have been else_jump @BIND_02, to check the other key_pressed
0AF9: samp say_msg "/fill"
wait 500
jump @BIND_01

:BIND_02
wait 0
if and
0AB0: key_pressed 100
0AFA: is_samp_structures_available
else_jump @BIND_02 //should have been else_jump @BIND_01, to check the first key_pressed
0AF9: samp say_msg "/engine"
wait 500
jump @BIND_02
Thanks for the information. But I will still use Monstercat's version because it has activation/deactivation and I need it.
 
Status
Not open for further replies.
Top