SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 19/10/2016, 07:29 PM   #1
Edw
Huge Clucker
 
Join Date: Jun 2014
Posts: 308
Reputation: 28
Default Timer

Hello!
Owning a server and when they reach 100 players made an appearance about the lag that's not too big but I have an idea but want to know your opinion and.
This lag is a timer that is used every seconds for everyone, but it sure is because I had in mind to do a timer for each player separately (ie they connect with SetTimerEx).
How about, I would eliminate lag? Or be the same work and consume more timers?
My guess is they would not be such as not to log all at the same time.

Excuse my english: D
__________________
[FilterScript] Job Constructor/Builder - http://forum.sa-mp.com/showthread.ph...60#post3585560
[FilterScript] System Event Halloween - http://forum.sa-mp.com/showthread.php?t=592293
[FilterScript] Job Gift Distribuitor - http://forum.sa-mp.com/showthread.php?t=596896
[FilterScript] Drop weapon system - http://forum.sa-mp.com/showthread.php?t=629010
[FilterScript] Mine Sweeper - Casino System - http://forum.sa-mp.com/showthread.php?t=642220
[FilterScript] Halloween systems - with MySQL - http://forum.sa-mp.com/showthread.php?t=643793
[FilterScript] Christmas Quest - with MySQL - http://forum.sa-mp.com/showthread.php?t=646490
Edw is offline   Reply With Quote
Old 19/10/2016, 07:36 PM   #2
SickAttack
High-roller
 
Join Date: Dec 2013
Posts: 4,768
Reputation: 754
Default Re: Timer

Switch, it will surely be better.
SickAttack is offline   Reply With Quote
Old 19/10/2016, 07:43 PM   #3
Edw
Huge Clucker
 
Join Date: Jun 2014
Posts: 308
Reputation: 28
Default Re: Timer

Quote:
Originally Posted by SickAttack View Post
Switch, it will surely be better.
Ok. Thank you for the answer
__________________
[FilterScript] Job Constructor/Builder - http://forum.sa-mp.com/showthread.ph...60#post3585560
[FilterScript] System Event Halloween - http://forum.sa-mp.com/showthread.php?t=592293
[FilterScript] Job Gift Distribuitor - http://forum.sa-mp.com/showthread.php?t=596896
[FilterScript] Drop weapon system - http://forum.sa-mp.com/showthread.php?t=629010
[FilterScript] Mine Sweeper - Casino System - http://forum.sa-mp.com/showthread.php?t=642220
[FilterScript] Halloween systems - with MySQL - http://forum.sa-mp.com/showthread.php?t=643793
[FilterScript] Christmas Quest - with MySQL - http://forum.sa-mp.com/showthread.php?t=646490
Edw is offline   Reply With Quote
Old 19/10/2016, 07:46 PM   #4
Correlli
Godfather
 
Correlli's Avatar
 
Join Date: May 2009
Location: Slovenia
Posts: 6,340
Reputation: 365
Default Re: Timer

Quote:
Originally Posted by Edw View Post
Hello!
Owning a server and when they reach 100 players made an appearance about the lag that's not too big but I have an idea but want to know your opinion and.
This lag is a timer that is used every seconds for everyone, but it sure is because I had in mind to do a timer for each player separately (ie they connect with SetTimerEx).
How about, I would eliminate lag? Or be the same work and consume more timers?
My guess is they would not be such as not to log all at the same time.

Excuse my english: D
You don't want to do that mate - timer per player. Your server might die (i.e. crash) with 20 or more players, especially if you have a lot of code in the timer. Stick to global timer(s) in this case.
Correlli is offline   Reply With Quote
Old 19/10/2016, 07:58 PM   #5
Edw
Huge Clucker
 
Join Date: Jun 2014
Posts: 308
Reputation: 28
Default Re: Timer

Quote:
Originally Posted by Correlli View Post
You don't want to do that mate - timer per player. Your server might die (i.e. crash) with 20 or more players, especially if you have a lot of code in the timer. Stick to global timer(s) in this case.
However a try.
That stuff is not too loaded timer, are more checks, if it is in a location, variables decrease.
__________________
[FilterScript] Job Constructor/Builder - http://forum.sa-mp.com/showthread.ph...60#post3585560
[FilterScript] System Event Halloween - http://forum.sa-mp.com/showthread.php?t=592293
[FilterScript] Job Gift Distribuitor - http://forum.sa-mp.com/showthread.php?t=596896
[FilterScript] Drop weapon system - http://forum.sa-mp.com/showthread.php?t=629010
[FilterScript] Mine Sweeper - Casino System - http://forum.sa-mp.com/showthread.php?t=642220
[FilterScript] Halloween systems - with MySQL - http://forum.sa-mp.com/showthread.php?t=643793
[FilterScript] Christmas Quest - with MySQL - http://forum.sa-mp.com/showthread.php?t=646490
Edw is offline   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
If /foodsearch doesn't find item, set wait timer (TIMER HELP) Josh_Main Scripting Help 7 14/09/2016 04:13 PM
Which is better Per Player Timer or Global timer? (issue with timer) Dokins Scripting Help 4 07/06/2016 09:50 AM
Slice's Timer Fix include --> timer public function isn't getting called Riwerry Scripting Help 0 02/01/2016 03:50 PM
Stopping timer and starting timer with the same duration TheSimpleGuy Scripting Help 3 15/05/2014 04:34 PM
[Timer Help] Score saving timer, should it always be running or should it be killed? Ghost100 Scripting Help 6 08/10/2012 10:12 PM


All times are GMT. The time now is 07:44 AM.


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