SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 14/01/2019, 11:31 AM   #1
robokopas112
Little Clucker
 
Join Date: Aug 2009
Posts: 6
Reputation: 0
Question Potentially Laggy Filterscript

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.
robokopas112 is offline   Reply With Quote
Old 14/01/2019, 11:35 AM   #2
m4karow
Huge Clucker
 
Join Date: Oct 2015
Posts: 246
Reputation: 13
Default Re: Potentially Laggy Filterscript

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
m4karow is offline   Reply With Quote
Old 14/01/2019, 11:44 AM   #3
robokopas112
Little Clucker
 
Join Date: Aug 2009
Posts: 6
Reputation: 0
Default Re: Potentially Laggy Filterscript

Quote:
Originally Posted by m4karow View Post
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()".
robokopas112 is offline   Reply With Quote
Old 14/01/2019, 12:34 PM   #4
Y_Less
Beta Tester
 
Y_Less's Avatar
 
Join Date: Jun 2008
Location: 629 - git.io/Y
Posts: 15,459
Reputation: 3206
Default Re: Potentially Laggy Filterscript

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.
Y_Less is online now   Reply With Quote
Old 14/01/2019, 03:45 PM   #5
robokopas112
Little Clucker
 
Join Date: Aug 2009
Posts: 6
Reputation: 0
Smile Re: Potentially Laggy Filterscript

Quote:
Originally Posted by Y_Less View Post
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
robokopas112 is offline   Reply With Quote
Old 14/01/2019, 04:06 PM   #6
Y_Less
Beta Tester
 
Y_Less's Avatar
 
Join Date: Jun 2008
Location: 629 - git.io/Y
Posts: 15,459
Reputation: 3206
Default Re: Potentially Laggy Filterscript

That sounds like a PC. So I can tell you that the with the number of players you will get on a home-hosted server, performance will never be an issue.
Y_Less is online now   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Server To Much Laggy ! KilleRCitY Server Support 0 26/07/2016 11:33 PM
Server is Potentially restarting Noris Scripting Help 11 25/05/2016 07:31 AM
Triangle.gs Laggy? Rocky Racoon Everything and Nothing 10 22/12/2014 07:30 PM
Youtube being laggy? Coltmaster Everything and Nothing 2 11/04/2013 10:28 PM
Laggy server ColdIce Help Archive 15 17/04/2011 03:20 AM


All times are GMT. The time now is 11:23 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.