Maptime is this stored in a CVAR ?

4 replies [Last post]
THOR*ELITE'Z*
Thor-NL's picture
Offline
Joined: Jan 2011
Posts:

Hi quakers,
I have a question concerning time.
Is there a CVAR which holds the value of time played on a map, or remaining maptime for that matter ?Seen in the HUD's GameTime, but cant access it in any other CFG (server, crontab ..)Also seen something like it in the spider php example, there it's called map_time, but cant access that one either.Is this possible, is it stored in a CVAR so i can use it in crontab ?
Any help is greatly apreciated Winking

www.elitez.eu



The whole world is searching for Waldo...
In Soviet Russia, Waldo finds YOU !
rUnThEoN?!
Skullheadq3's picture
Offline
Joined: Dec 2005
Posts:
DE Germany
Re: Maptime is this stored in a CVAR ?

imo on default hud it was xp_drawtime 2 or drawtimer 2? been a long time since I worked with that D:

cg_drawtime does the same on top right imo.

for contrab you need to specify stuff ahead anyways, so rather tell us what you want to do with contrab and then we can figure about how to.

hurrenson: "This idiot is apparently not familiar with a rail/sniper style."

THOR*ELITE'Z*
Thor-NL's picture
Offline
Joined: Jan 2011
Posts:
Re: Maptime is this stored in a CVAR ?

Oke, to make it more specific on our server we have callvote enabled for nextmap and restart.There is a rule displayed that voting is allowed within only the first three minutes of a map.

Normaly this rule is respected, but not always, and with a map 10 minutes on its way and a callvote is made, the name-calling and disconnecting is close at hand Big grin
To prevent this it would be better if after 3 minutes the callvote is disabled. New map, enabled again for three minutes.
if ( $map_time >=12 ) { */1 * * * * /execstr $g_allowvote 1; }
if ( $map_time <= 12 ) { */1 * * * * /execstr $g_allowvote 0; }

www.elitez.eu



The whole world is searching for Waldo...
In Soviet Russia, Waldo finds YOU !
rUnThEoN?!
Skullheadq3's picture
Offline
Joined: Dec 2005
Posts:
DE Germany
Re: Maptime is this stored in a CVAR ?

its theoretically possible, however if i remember right, you need to do rotation over contrab too then, depending on how you do it. (since contrab doesnt allow maptime as timer)

hurrenson: "This idiot is apparently not familiar with a rail/sniper style."

THOR*ELITE'Z*
Thor-NL's picture
Offline
Joined: Jan 2011
Posts:
Re: Maptime is this stored in a CVAR ?
rUnThEoN?! wrote:

its theoretically possible, however if i remember right, you need to do rotation over contrab too then, depending on how you do it. (since contrab doesnt allow maptime as timer)

If crontab not allows maptime as a timer.Then from crontab you could exec a cfg (every minute) who does the checking, if its above or below 12 minutes.
The result of that comparison could flip the g_allowvote switch. (in an if...else construct)
Then when the map is finished the g_allowvote is put on again by rotation as CVAR fixation.

So i did already think of this construct, but still don't know what the CVAR is which holds that time to make it work Sad

www.elitez.eu



The whole world is searching for Waldo...
In Soviet Russia, Waldo finds YOU !