18.07.2013, 23:21
Quote:
Often lag reasons:
- Script in OnPlayerUpdate - A lot of objects or vehicles at one place - Timers < 500ms - !! Changing materials or text on objects !! - frequented asking about player infos GetPlayerPos, Skin, Weapons, Vehicle, Seat.. You can store this serverside, for example create Skin[MAX_PLAYERS] that you will change when you change player skin.. Scripts with variables are much faster than scripts using player getting functions. |
- My online timer are 1000 ms, just one 30000 ms.
- I d'ont change the materials but i update a label text all 1 second
- Ok thanks for your advice
Quote:
This is a really old script I made once: http://pastebin.com/TCkpwY3R
It doesn't use OnPlayerUpdate to detect someone "c-bugging". |
https://sampforum.blast.hk/showthread.php?tid=370810
I will improve my anti c bug with your code thanks.
But for my "LastWeapon" on OnPlayerUpdate it's a bad idea to place it on this callback?