Spam issue
#3

Looping through all players on -every- OnPlayerUpdate is a stupid thing to do, it will only cause stress on your server.

You should use foreach by ****** https://sampforum.blast.hk/showthread.php?tid=92679 which loops only through online players.

And remember that on foot, OnPlayerUpdate is called something like 6-8 times a second and in a car like 20-30 times.

Why not simply use Incognito's streamer and create an area? https://sampforum.blast.hk/showthread.php?tid=102865

This would mean you can use the callback OnPlayerEnterDynamicArea.

But if you don't want to rely on that, atleast whack it in a 5-10 second timer as you really don't need to be checking something as petty as that 30 times a second.
Reply


Messages In This Thread
Spam issue - by Eugene. - 05.10.2013, 20:46
Re: Spam issue - by IPrototypeI - 05.10.2013, 21:02
Re: Spam issue - by Limex - 05.10.2013, 21:08
Re: Spam issue - by Eugene. - 05.10.2013, 21:28
Re: Spam issue - by IPrototypeI - 05.10.2013, 21:40
Re: Spam issue - by Patrick - 05.10.2013, 22:11
Re: Spam issue - by Jefff - 05.10.2013, 22:57
Re: Spam issue - by Mattakil - 05.10.2013, 23:00
Re: Spam issue - by Eugene. - 06.10.2013, 09:25
Re: Spam issue - by xXShadowXx - 06.10.2013, 17:33

Forum Jump:


Users browsing this thread: 1 Guest(s)