Resource icon

CLEO Release Reconnect.cs

CLEO related
Status
Not open for further replies.

Monstercat

Well-known member
Joined
Feb 26, 2013
Messages
281
Reaction score
5
Here i have a simple Reconnect.cs for you Guys...

The Code is from FYP (ChangeNick.cs) I've changed something so that its only a Reconnect.cs

Press LSHIFT+0 to Reconnect.

Here the Surce:

Code:
{$CLEO .cs}
 
thread "Rejoin"
0662: NOP "Edit by [Monstercat]"
 
const
self = $PLAYER_ACTOR
VK_LSHIFT = 0xA0
VK_KEY_0 = 0x30
SAMP_BASE = 29@
 
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
 
if
  8AF7: get_samp_base_to SAMP_BASE
then
    0A93: end_custom_thread
end
repeat
    wait 400
until 0AFA: is_samp_structures_available
 
// ================================== MAIN ================================== //
 
while true
    wait 0
    if and
    player.Defined(0)
    8B21:  not samp is_chat_not_opened
    0AB0: VK_LSHIFT
    then
        if 0AB0: VK_KEY_0 
        then
            0B28: samp disconnect_with_reason DISCONNECT_QUIT
            wait TIME_RECONNECT
            0B27: samp set_gamestate GAMESTATE_WAIT_CONNECT
            repeat
            wait 20
            until 8AB0: VK_KEY_0
        end
        end
    end
 
// ============================== END OF MAIN ============================== //
 

Attachments

  • Reconnect.cs
    18.4 KB · Views: 4,110

shubhi99

Well-known member
Joined
May 10, 2013
Messages
289
Reaction score
1
what other players will see that i am timeout/crashed or i just quit the server ?
 

FrederickDarksR2

New member
Joined
Nov 6, 2013
Messages
1
Reaction score
0
My SA-MP has crashed for install this mod with cleo 3.
Can you fix it? (Sorry for bad english)
 

Monstercat

Well-known member
Joined
Feb 26, 2013
Messages
281
Reaction score
5
what other players will see that i am timeout/crashed or i just quit the server ?


0B28: samp disconnect_with_reason DISCONNECT_QUIT
 

shubhi99

Well-known member
Joined
May 10, 2013
Messages
289
Reaction score
1
Is there any way to show timeout to the server not just quit?
 

Monstercat

Well-known member
Joined
Feb 26, 2013
Messages
281
Reaction score
5
0B28: samp disconnect_with_reason 0 / / Disables the server with the given reason / / 0 - normal shutdown, 1 - timeout

PS: Loock at the surce and you will see this:

DISCONNECT_QUIT = 0
DISCONNECT_TIMEOUT = 1

so change it to

0B28: samp disconnect_with_reason DISCONNECT_TIMEOUT
 

Dimitri

Well-known member
Joined
Mar 5, 2013
Messages
200
Reaction score
0
Do i need SAMPFUNCS? If yes send me your SAMOFUNCS my wont work :/
 

shubhi99

Well-known member
Joined
May 10, 2013
Messages
289
Reaction score
1
0B28: samp disconnect_with_reason 0 / / Disables the server with the given reason / / 0 - normal shutdown, 1 - timeout

PS: Loock at the surce and you will see this:

DISCONNECT_QUIT = 0
DISCONNECT_TIMEOUT = 1

so change it to

0B28: samp disconnect_with_reason DISCONNECT_TIMEOUT
thanks ,the only problem i am facing is that when it timeout and joins again ,th samp shows "nickname is already chosen" because the name is still in the server while reconnecting again
 

drumerluke

New member
Joined
Mar 18, 2014
Messages
1
Reaction score
0
Hey, does someone have this Cleo for 0.3z?

Maybe i am too stupid to find it o_O
 

Reshay

Member
Joined
Apr 19, 2014
Messages
5
Reaction score
0
A$AP.cs link said:
[quote author=Reshay link=topic=3936.msg38367#msg38367 date=1397943890]
I press SHIFT + 0 but doesnt work.
Numpad ?
[/quote]
Ohh, thank you bro , very thanks seriusly!! I dont know it , I thought it was with 0 being no numpad haha, very thanks!!!
 

Reshay

Member
Joined
Apr 19, 2014
Messages
5
Reaction score
0
:me_gusta:
A$AP.cs link said:
[quote author=Reshay link=topic=3936.msg38367#msg38367 date=1397943890]
I press SHIFT + 0 but doesnt work.
Numpad ?
[/quote]
Oh, i try and doesnt work SHIFT+0 and SHIFT+0(NUMPAD)
:bawww:
I need it now to quit and login fast in a RP Server :troll:
 

n4z1

Member
Joined
Apr 26, 2014
Messages
23
Reaction score
0
THANKS! NOW I CAN RECONNECT!  :eek:mg_run:
 

chad1st

Member
Joined
Apr 19, 2013
Messages
17
Reaction score
0
how to install sampfuncs everytime i installed SAMP funcs i get error plugin sampfuncs v3.1.1
 

DzkAy

Well-known member
Joined
Feb 20, 2014
Messages
472
Reaction score
1
chad1st link said:
how to install sampfuncs everytime i installed SAMP funcs i get error plugin sampfuncs v3.1.1
You need ".Asi Loader"

Here's the good one :http://www.gtagarage.com/mods/show.php?id=21709
 

chad1st

Member
Joined
Apr 19, 2013
Messages
17
Reaction score
0
Monitor link said:
[quote author=chad1st link=topic=3936.msg40686#msg40686 date=1399691049]
how to install sampfuncs everytime i installed SAMP funcs i get error plugin sampfuncs v3.1.1
You need ".Asi Loader"

Here's the good one :http://www.gtagarage.com/mods/show.php?id=21709
[/quote]

how to install the Asi Loader
 
Status
Not open for further replies.
Top