My profiler for optimise my script
#6

Quote:
Originally Posted by papedo
Посмотреть сообщение
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.
- I have just 99 objects i think, 350 vehicles.
- 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:
Originally Posted by BigETI
Посмотреть сообщение
This is a really old script I made once: http://pastebin.com/TCkpwY3R
It doesn't use OnPlayerUpdate to detect someone "c-bugging".
My anti c-bug it's good but i use GetPlayerSpecialAction(playerid) for detect on player crouching on OnPlayerUpdate beacause apparently this function it's wrong on OnPlayerKeyStateChange.

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?
Reply


Messages In This Thread
My profiler for optimise my script - by HitnKill - 18.07.2013, 21:57
Re: My profiler for optimise my script - by ReVo_ - 18.07.2013, 22:12
Re : My profiler for optimise my script - by HitnKill - 18.07.2013, 22:40
Re: My profiler for optimise my script - by papedo - 18.07.2013, 22:52
AW: My profiler for optimise my script - by BigETI - 18.07.2013, 22:53
Re : My profiler for optimise my script - by HitnKill - 18.07.2013, 23:21
Re: My profiler for optimise my script - by Bakr - 19.07.2013, 03:46
Re: My profiler for optimise my script - by xeeZ - 19.07.2013, 04:09
Re: My profiler for optimise my script - by SuperViper - 19.07.2013, 04:47
Re: My profiler for optimise my script - by xeeZ - 19.07.2013, 05:37

Forum Jump:


Users browsing this thread: 2 Guest(s)