Raised This Month: $ Target: $400
 0% 

Hook roundtime and do something at a specefic time?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
proffs
Senior Member
Join Date: Jul 2013
Old 04-13-2016 , 09:24   Hook roundtime and do something at a specefic time?
Reply With Quote #1

Hello,

I'm not sure how I can hook roundtime and do something at a specefic time.

Let says I want to slay everyone then the round time shows 1:00 how can I do that?

EDIT:

Another thing I need help with is check what round it is, I want to do something at a specefic round.
__________________

Last edited by proffs; 04-13-2016 at 09:34.
proffs is offline
thecount
Veteran Member
Join Date: Jul 2013
Old 04-13-2016 , 14:18   Re: Hook roundtime and do something at a specefic time?
Reply With Quote #2

PHP Code:
public Evt_RoundStart(blah blah){
CreateTimer(GetConVarFloat(ROUND_TIME) + GetConVarFloat(FREEZE_TIME) - 60Timer_Handle);

You might want to store these convars as floats instead of fetching them each time.

Last edited by thecount; 04-13-2016 at 14:19.
thecount is offline
KissLick
Veteran Member
Join Date: Nov 2012
Location: void
Old 04-13-2016 , 15:45   Re: Hook roundtime and do something at a specefic time?
Reply With Quote #3

As far as I know, ConVars are already cached so there is no need to cache bool/int/float ConVars.
__________________
Plugins: TeamGames
Includes: Menu stocks, ColorVariables, DownloadTableConfig

> No help through PM, make a topic.

Last edited by KissLick; 04-13-2016 at 15:46.
KissLick is offline
thecount
Veteran Member
Join Date: Jul 2013
Old 04-13-2016 , 21:29   Re: Hook roundtime and do something at a specefic time?
Reply With Quote #4

Quote:
Originally Posted by KissLick View Post
As far as I know, ConVars are already cached so there is no need to cache bool/int/float ConVars.
Good to know.
thecount is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 04-14-2016 , 00:39   Re: Hook roundtime and do something at a specefic time?
Reply With Quote #5

You would to get the cvars each round incase they change mid match.
__________________
Neuro Toxin 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 19:34.


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