Some timeleft calculations..
Hello.
I need a calculation of elapsed map time (float vaule). There are no timelimit (mp_timelimit "0") on server (gungame), we can't use [mp_timelimit - timeleft]. How i can get him? PHP Code:
|
Re: Some timeleft calculations..
This should help : http://forums.alliedmods.net/showpos...26&postcount=5
EDIT: Title is misleading. This below should be correct. |
Re: Some timeleft calculations..
get_gametime I believe
|
Re: Some timeleft calculations..
Quote:
PHP Code:
Registering of evens and logevents is useless in my case. :cry: |
Re: Some timeleft calculations..
Quote:
|
Re: Some timeleft calculations..
I want to initiate map voting & map change process in the end of map (gun game mod). Votemap process initializes when a timeleft value is 00-30 (seconds left).
This is a way: when a mapchenge is needed, we get elapsed map time (ex.: 15 mins and 14 secs) and summ him with 31 seconds = 15:45, then we set timeleft to 15:45. After 1 second votemap is in process.. Quote:
PHP Code:
|
Re: Some timeleft calculations..
server_print("elapsed time: %.2f", get_gametime())
no need for any global variables or calculations, this will return game time |
Re: Some timeleft calculations..
Thanks to all!
|
Re: Some timeleft calculations..
PHP Code:
|
Re: Some timeleft calculations..
Thank! This is very useful code!
|
| All times are GMT -4. The time now is 16:16. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.