CLEO Help Open and close vehicle cleo

CLEO related

frandwk

New member
Joined
Feb 24, 2023
Messages
3
Reaction score
0
Hello good morning, I want to make a cleo that opens and closes the car doors with the "1" key (samp command /abrir and /cerrar) is it possible? Could someone tell me how I can do it. Thank you so much!
 

frandwk

New member
Joined
Feb 24, 2023
Messages
3
Reaction score
0
i have this but i want to make the open and close car with one key (/abrir and /cerrar]

Code:
{$USE CLEO+}
{$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 and
        0AB0:   key_pressed 49
        8B21: not  samp is_chat_opened
        then
            0AF9: samp say_msg "/abrir"
            wait 200
        end
      
        if and
        0AB0:   key_pressed 51
        8B21: not  samp is_chat_opened
        then
            0AF9: samp say_msg "/cerrar"
            wait 200
        end
      
        if and
        0AB0:   key_pressed 52
        8B21: not  samp is_chat_opened
        then
            0AF9: samp say_msg "/comprar materiales"
            wait 200
        end                                          

        if and
        0AB0:   key_pressed 73
        8B21: not  samp is_chat_opened
        then
            0AF9: samp say_msg "/inventario"
            wait 200
        end

        if and
        0AB0:   key_pressed 76
        8B21: not  samp is_chat_opened
        then
            0AF9: samp say_msg "/luces"
            wait 200
        end
    end
 

Hidend

Expert
Joined
Mar 4, 2013
Messages
653
Reaction score
49
fz?
Perl:
{$CLEO .cs}
{$USE bitwise}
0000:
repeat
wait 40
until SAMP.Available()
30@ = 0 // abrir

WHILE TRUE
WAIT 0
    IF 0AB0:   key_pressed 49
    THEN
        0B12: 30@ = 30@ XOR 1       
        IF 0039:   30@ == 1
        THEN
            0AF9: samp say_msg "abrir"
        ELSE
            0AF9: samp say_msg "cerrar"
        END
        wait 200
    END
END
 
Top