Raised This Month: $ Target: $400
 0% 

[TUT/Snippet] Doing timed stuff without CreateTimers


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 02-10-2015 , 11:06   Re: [TUT/Snippet] Doing timed stuff without CreateTimers
Reply With Quote #2

Quote:
Originally Posted by Chdata View Post
As opposed to using CreateTimer() to run code in the future, there are various scenarios where you could just use a single float to do things such as, preventing code from executing until a certain amount of time has passed.

For example, all of the "m_flNext..." variables Source uses work this way. TF2 has m_flNextPrimaryAttack. This is set to a time in seconds, which is compared to the GameTime, which can be retrieved in SM via GetGameTime().
This seems like a lot of work for what is essentially OnGameFrame on the game server side.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
 



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 18:28.


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