the server is full of lags, help
#1

I've a RolePlay mode, and when i play alone on a linux server it work perfect, there are no lags.
but, when someone is logging in too, and we're 2 players in the server, the server is full of lags, there is a deley of 10 seconds when you write, you can't see your friend on his real walking, i mean when he walk straight and then right, you see that he walked only straight, and then sunddenly "teleported" to other place.
please help me, thanks.
Reply
#2

Many things can cause lag, from outdated systems, to 'obsolete' functions, timers, to simply using the 'wrong' callbacks. If your wishing to 'upgrade' 'your' Gamemode, take a look around the forums. Use the search function, and search for newer things which were meant for the current SA:MP version.
Reply
#3

Few Common solutions:

- Don't add load of stuff to OnPlayerUpdate.

- Optimize your script.
- Reduce the usage of timers.

- Check if the connections are good.
- Don't add too many filterscripts/plugins.

Thats all from a newbie pawner.
Reply
#4

Don't use OnPlayerUpdate for saving user data if you are.
Reply
#5

so what should i do ? the use date won't be saved ?
Reply
#6

If you must use a timer for saving data, save it every 15/30 mins.
Reply
#7

Rename the callback (e.g. to OnPlayerUpdateEx) and set it on a slow timer (every 5 or 10 minutes or so). Also call it when a player disconnects.
Reply
#8

Just make a new callback SaveAccount and call it OnPlayerDisconnect. Create a new safe gmx command and don't use gmx in console, or the player coordinates, health, weapons will be set to 0.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)