Reconnect

Status
Not open for further replies.

Harrisonwells

Member
Joined
Jul 9, 2017
Messages
18
Reaction score
0
Can someone help me? When it says "server closed the connection" I will be re-logged, and automatically type my password in the login input. Basically an afk farm thing
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,116
Solutions
5
Reaction score
881
Location
Lithuania
PHP:
{$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
    player.Defined(0)
    0C29: $not_USED = stristr string1 0@ string2 "Server closed the connection." // COMPARE STRING 0@ WITH "Server closed the connection."
    then
        wait 100
        0B28: samp disconnect_with_reason DISCONNECT_QUIT
        wait TIME_RECONNECT
        0B27: samp set_gamestate GAMESTATE_WAIT_CONNECT
    end
end

end
 

Harrisonwells

Member
Joined
Jul 9, 2017
Messages
18
Reaction score
0
PHP:
{$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
    player.Defined(0)
    0C29: $not_USED = stristr string1 0@ string2 "Server closed the connection." // COMPARE STRING 0@ WITH "Server closed the connection."
    then
        wait 100
        0B28: samp disconnect_with_reason DISCONNECT_QUIT
        wait TIME_RECONNECT
        0B27: samp set_gamestate GAMESTATE_WAIT_CONNECT
    end
end

end

where you will get auto-reconnected, and will input your password.
 
Status
Not open for further replies.
Top