0x73616D
Active member
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