Server lag on disconnect
#1

As the tittle says, when someone on the server quits,crashes or gets kicked the server lags for about 3 seconds, what could cause that issue? Any help is appriciated.
Reply
#2

Post your OnPlayerDisconnect
Reply
#3

Because I hardly wanna publish parts of the script, I will just say that alot of lines are included in OnPlayerDisconneect, could that lag the server on disconnect? If it still doesn't help I am willing to post the OnPlayerDisconnect.
Reply
#4

If u don't show ur script OnPlayerDisconnect, we won't be able to reply.
Reply
#5

Quote:
Originally Posted by L.Hudson
Посмотреть сообщение
Because I hardly wanna publish parts of the script, I will just say that alot of lines are included in OnPlayerDisconneect, could that lag the server on disconnect? If it still doesn't help I am willing to post the OnPlayerDisconnect.
If you don't want to publish your script when it's needed, then you won't be able to get any help. It's unfortunately a two way street. If you don't trust us with your code, you shouldn't be asking for help.
Reply
#6

Sorry for the delay, http://pastebin.com/dK3VpzFH
Reply
#7

I think stock SavePlayer(playerid) may cause a lag. Which saving system do you use?
Reply
#8

bump
Reply
#9

You should use the Performance profiler and compile your mode with the -d3 flag
Than run your gamemode and join / disconnect sometime and check the log
Afterwards you will know if it was SavePlayer, UnrentVehicle or just the 4 MAX_PLAYERS loops in OnPlayerDisconnect
Either way you will need to rewrite that part of your code or delay it with a timer
Reply
#10

Quote:
Originally Posted by Nero_3D
Посмотреть сообщение
You should use the Performance profiler and compile your mode with the -d3 flag
Than run your gamemode and join / disconnect sometime and check the log
Afterwards you will know if it was SavePlayer, UnrentVehicle or just the 4 MAX_PLAYERS loops in OnPlayerDisconnect
Either way you will need to rewrite that part of your code or delay it with a timer
http://www.2shared.com/complete/eWXb...P-profile.html

Here are the results, thanks to "Not Important"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)