Raised This Month: $ Target: $400
 0% 

time left in a round


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
alien
Senior Member
Join Date: Aug 2005
Location: London || Slovakia
Old 10-09-2007 , 20:30   Re: time left in a round
Reply With Quote #6

Code:
new Float:new_round_time; public plugin_init()   {     register_logevent("on_new_round", 2, "1=Round_Start");     return PLUGIN_CONTINUE;   } public on_new_round()   {     new_round_time = halflife_time();     return PLUGIN_CONTINUE;   } stock Float:round_time_left()   {     return get_cvar_float("mp_roundtime") - (halflife_time() - new_round_time);   }

This could help you if you want to spare some lines. You can also replace halflife_time by get_systime function to get less precise integer result. Round_time_left should return round time left in seconds.
__________________

Last edited by alien; 10-09-2007 at 20:33.
alien is offline
Send a message via ICQ to alien
 



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 16:15.


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