SA-MP Forums

Go Back   SA-MP Forums > SA-MP > Client Support

Reply
 
Thread Tools Display Modes
Old 02/01/2019, 01:51 PM   #1
MrStead
Little Clucker
 
MrStead's Avatar
 
Join Date: Jul 2014
Location: Russia
Posts: 39
Reputation: 4
Question How to disable reconnection to a server after lost connection?

I develop a plugin now and often need debugging it with Visual Studio in runtime. When I insert a breakpoint to debug any code my server is stopped for a time. When all have been debugged the server continue working again. But when the server stopped my samp client has lost connection and is doing reconnection in 15-20sec.



I have a question: how to disable reconnection to a server after lost connection? For example, increase playtimeout on client side to 1000 sec? Then I could continue play on my server to debug the plugin without reconnection, repeated signing in, etc...
MrStead is online now   Reply With Quote
Old 03/01/2019, 05:26 AM   #2
RoboN1X
Huge Clucker
 
RoboN1X's Avatar
 
Join Date: Feb 2011
Location: Indonesia
Posts: 335
Reputation: 57
Default Re: How to disable reconnection to a server after lost connection?

Adjust your "playertimeout" and "sleep" in server.cfg according to your debug break time, might be necessary to disable the connection cookie and time because you'd expect "You are banned from this server" Anything in the "networking" section here

Try to increase the update rates too (client section here), but only if that's okay for you to feel lag/slow/desync every time (as it is not changeable from /rcon). Use pawn's "sleep()" (note: bugged/leaks) or some a busy for/while loop code (you can customize it i.e. a code to communicate while "breakpoint" = true) on OnPlayerUpdate and return 0, so it looks like a server lag for the client.

You can also try BlockIpAddress() according to your "playertimeout" value (e.g. if playertimeout is 10000, set it to 9999 or less).

Just my opinion (never tried), maybe also start the client in debug mode? Not sure if it can help.
Launch samp_debug.exe and click "connect localhost".

If reconnecting isn't the issue with your script/plugin development (which you are just lazy to wait), you can find some cl*o script/hack out there for fast reconnect, and restore your previous player states after onplayerconnect (e.g. setting back skin, position, etc from previously saved data) in your pawn script.
__________________
Need Help? Use Search, WIKI, and FAQ
RoboN1X is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Lost Connection to the server... JasonMorelli Client Support 2 18/10/2016 10:31 PM
Server lost connection at 12 pm/am KubiPL Server Support 27 10/01/2015 09:45 PM
Lost connection to the server. audriuxxx Scripting Help 2 14/01/2014 01:52 PM
Lost connection to the server (0.3d) DSK_Vyorel Server Support 0 16/12/2011 03:11 PM
[HELP] Server Lost Connection.. CruncH Help Archive 0 20/02/2009 04:36 PM


All times are GMT. The time now is 02:44 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.