Avoiding the cause of lag
#5

Quote:
Originally Posted by vassilis
Посмотреть сообщение
My script is saving player position so he gets spawned at the last position he was before death.
Any method to change the way i am working it ?
You don't really need anything saved until the player logs out. So put most of your saving under OnPlayerDisconnect. But for important stuff like money and VIP level and admin level save them as soon as they are updated for example at the end of your makeadmin command if you have one make it save the data. And a 5 minutes timer to save everything should be enough. I have been doing that for years now and I never experienced any lag even when my server reached around 60 players. I also never lost any data more than a few minutes old even through some of the worst DDOSes we experienced.
Reply


Messages In This Thread
Avoiding the cause of lag - by vassilis - 18.02.2016, 14:49
Re: Avoiding the cause of lag - by Ilhan - 18.02.2016, 14:55
Re: Avoiding the cause of lag - by Vince - 18.02.2016, 14:57
Re: Avoiding the cause of lag - by vassilis - 18.02.2016, 15:01
Re: Avoiding the cause of lag - by mirou123 - 18.02.2016, 15:39

Forum Jump:


Users browsing this thread: 4 Guest(s)