CLEO Help help with a cleo

CLEO related

0x73616D

Active member
Joined
Apr 18, 2021
Messages
135
Solutions
1
Reaction score
68
Location
0x73616D
This cleo reconnects when using hello and being in a vehicle, what I want is to put hello and wait 5 seconds and reconnect if the player is in the vehicle, there is a fault that when I write hello in the chat and get out of the vehicle and in seconds I go back up it reconnects me and I don't want that.
Code:
 {$CLEO .cs}

0000:

repeat
wait 0
until 0AFA: SAMP_IS_READY

const
VK_KEY_0 = 0x30

DISCONNECT_QUIT = 0
DISCONNECT_TIMEOUT = 1

GAMESTATE_NONE = 0
GAMESTATE_WAIT_CONNECT = 1
GAMESTATE_AWAIT_JOIN = 2
GAMESTATE_CONNECTING = 3
GAMESTATE_CONNECTED = 4
GAMESTATE_RESTARTING = 5
GAMESTATE_DISCONNECTED = 6

TIME_RECONNECT = 15
end

while true
wait 0

if
0B61:  samp is_local_player_spawned
then
    0AC8: 0@ = allocate_memory_size 260
    0AC8: 1@ = allocate_memory_size 260
    0B75: samp get_chat_string 99 text_to 0@ prefix_to 1@ color_to 2@ prefix_color_to 3@
    if and
    0C29: $not_USED = stristr string1 0@ string2 "hello"
    wait 5000
    00DF:   actor $PLAYER_ACTOR driving
    then
        wait 100
        0B28: samp disconnect_with_reason DISCONNECT_QUIT
        wait TIME_RECONNECT
        0B27: samp set_gamestate GAMESTATE_WAIT_CONNECT
    end
end

end
 

Juli4n

Active member
Joined
Mar 31, 2021
Messages
43
Solutions
1
Reaction score
19
Location
Argentina
@curraco
Code:
{$CLEO .cs}

0000:

while 8AFA:
    wait 0
end

0AC8: 0@ = allocate_memory_size 260

while true
    wait 0
    if
    0B61:  samp is_local_player_spawned
    then
        0B75: samp get_chat_string 99 text_to 0@ prefix_to $NOT_USED color_to $NOT_USED prefix_color_to $NOT_USED
        if
        0C29: $NOT_USED = stristr string1 0@ string2 "Hola"
        then
            0AF8: samp add_message_to_chat "" color -1
            TIMERA = 0
            while true
                wait 0
                if
                TIMERA > 5000
                then
                    if
                    00DF:   actor $PLAYER_ACTOR driving
                    then
                        0B28: samp disconnect_with_reason 0
                        wait 500
                        0B27: samp set_gamestate 1
                    end
                    break
                end
            end
        end
    end
end
 
Last edited:
Top