Raised This Month: $ Target: $400
 0% 

Solved hook to specific timestamp


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Watermelonnable
Member
Join Date: Feb 2017
Old 12-04-2019 , 15:59   Re: hook to specific timestamp
Reply With Quote #6

Quote:
Originally Posted by OciXCrom View Post
The "set_task" function has a flag that allows it to count the time until the end of the map:



So, instead of using maths, you can do:

Code:
set_task(300.0, "Hook5MinutesRemaining", .flags = "d")
Thank you. I will try this and let you know the results.

For the meantime I did some debugging and came across that
PHP Code:
get_timeleft() 
and also

PHP Code:
 get_pcvar_num(get_cvar_pointer("mp_timelimit")) 
returns 0 if I try to assign those values inside plugin_init. Can you please tell me why?

EDIT: Your solution worked like a charm Thank you again

Last edited by Watermelonnable; 12-04-2019 at 16:05.
Watermelonnable 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:03.


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