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.

I've tried Performance profiler and found out that OnPlayerDiscounect takes 6.5 sec to load.

Here are the resaults, http://www.2shared.com/complete/eWXb...P-profile.html.
OnplayerDisconnect code: http://pastebin.com/dK3VpzFH

I'm ready to pay anything to fix that bug.
Reply
#2

You have alot of PVars and Player loops, try reducing that by setting variables instead of PVars and combining all of the player loops into 1 player loop.

Are you using MySQL? MySQL takes alot of time to execute a query, especially if you're calling query code ALOT of times.
Reply
#3

Quote:
Originally Posted by SkittlesAreFalling
Посмотреть сообщение
You have alot of PVars and Player loops, try reducing that by setting variables instead of PVars and combining all of the player loops into 1 player loop.

Are you using MySQL? MySQL takes alot of time to execute a query, especially if you're calling query code ALOT of times.
My script is fully SQLITE, Also what do you mean by "combining all of the player loops into 1 player loop."
Reply
#4

Not Important fixed me the bug, thank you.
Reply
#5

I think the lag would continue, or it moght be your internet connection also

__________________________________________________ _________________________


__________________________________________________ _______________________________________

HostName: [0.3x] PL:A Project Los Ablaze|[Refund]
Address: 176.31.103.65:9060
Players: 2 / 30
Ping: 332
Mode: PL:A v2.4
Map: San Andreas

We are recruiting Junior Admins, factions leaders if you're interested.

This is dynamic server youre always welcome here.
Reply
#6

1- No need to destroy Text Draws
2- You are using some things that no need to be on OnPlayerDisconnect(), you need to delete 50% of your lines !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)