SA-MP Forums Archive
Potentially Laggy Filterscript - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Potentially Laggy Filterscript (/showthread.php?tid=662886)



Potentially Laggy Filterscript - robokopas112 - 14.01.2019

I'm creating a filterscript of turrets and I don't know if it is worth the effort. Once at every second "GetPlayerPos()" will be called for most if not for all players and once at every second "Streamer_Update()" will be called for all players. Lets say that we have a server with 100 players. Can someone tell me if these two functions alone, called at that time interval, can cause significant lag to that much players? I need "GetPlayerPos()" for trigonometry, and "Streamer_Update()" for incognito streamer, which is used with a purpose of placing moving objects in specific virtual worlds.


Re: Potentially Laggy Filterscript - m4karow - 14.01.2019

I dont know what do you want but if you want to update at a specific point you should use Streamer_UpdateEx that have XYZ parameters


Re: Potentially Laggy Filterscript - robokopas112 - 14.01.2019

Quote:
Originally Posted by m4karow
Посмотреть сообщение
I dont know what do you want but if you want to update at a specific point you should use Streamer_UpdateEx that have XYZ parameters
I want turret to fire a dynamic object to a player which is close enough. This involves frequent call of "GetPlayerPos()" and either "Streamer_Update()" or "Streamer_UpdateEx()".


Re: Potentially Laggy Filterscript - robokopas112 - 14.01.2019

Quote:
Originally Posted by ******
Посмотреть сообщение
Why not test it? There's a profiler plugin. We can't say what will be slow without seeing a) how well you wrote it or b) what machine you are running it on.
I did not know there's a profiler plugin, thank you, I will try it.
Here is my machine:

Motherboard: ASUS Z97M-PLUS
CPU: Intel Core i5 4690K
RAM: 2 x HX324C11T3K2/8 (16 GB)
VGA: ASUS R9280X-DC2-3GD5
SSD: Kingston SV300S37A/120G
OS: Windows 7 Professional x64