Raised This Month: $ Target: $400
 0% 

What should be used


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
impossible_cc
Senior Member
Join Date: Sep 2018
Location: Ukraine
Old 01-01-2019 , 10:08   What should be used
Reply With Quote #1

I want to create repeating timer. What should I use? There are not any messages, action of this timer is looping through all players and some checks.

PHP Code:
public void OnMapStart()
{
    
CreateTimer(0.1randomtimer_TIMER_REPEAT TIMER_FLAG_NO_MAPCHANGE);

or
PHP Code:
public void OnPluginStart()
{
    
CreateTimer(0.1randomtimer_TIMER_REPEAT);


Last edited by impossible_cc; 01-01-2019 at 10:10.
impossible_cc is offline
backwards
AlliedModders Donor
Join Date: Feb 2014
Location: USA
Old 01-01-2019 , 10:14   Re: What should be used
Reply With Quote #2

Both would achieve the same result. It's down to preference at that point but since the goal is to have a timer that always loops, regardless of map changes; I would use the second method.
__________________
I highly recommend joining the SourceMod Discord Server for real time support.
backwards is offline
Reply



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

Forum Jump


All times are GMT -4. The time now is 02:31.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode