PDA

View Full Version : Show time on HUD


yang
07-04-2007, 09:00 AM
Hello guys, I wanted to know if there is a method to enable a time viewer (showing the windows time) or at least something stop watch like?

You have cl_showpos, fps_max, net_graph etc. etc.
and can show lots of things on the HUD, is there a command or any other way to show a timer?

Thx in advance

John6000
07-04-2007, 09:49 AM
I would start by making a new hud element then set it to put a label as gpGlobals->curtime (i think its that) into the paint function

lodle
07-04-2007, 09:53 AM
that is frame time. you want to include time.h and use the time functions to make a clock as he said above on a new hud element.

Hint: Google it.

yang
07-05-2007, 01:34 AM
first of all thx for your answers and great to hear that it is actually possible! :)

hope customizing my hl2 deathmatch game will not be affected by sv_pure 2 because of this.

tbh I know how to work with clientscheme.res gamemenu.res and hudanimations.txt etc. but what you say is new to me.

u dont know by accident where the hud elements are stored?
probably in hudlayout.res?
or explain it a bit further to me?

how can I add an new element, like this?
But the new element is the last step, right?

HudClock
{
"fieldname" "HudClock"
"xpos" "r86"
"ypos" "6"
"wide" "80"
"tall" "34"
"visible" "0"
"enabled" "1"

"PaintBackgroundType" "2"

}

sry I am not a programmer so I am not very experienced with coding...
All help appreciated!

yang
07-05-2007, 01:35 PM
ok a very nice user of these forums thx to razvan252 gave me this link
where the whole process is described!

but my problem is as i said i cant understand c++ or compile and things.
i dont know how much time it costs, the tutorial is quite short so is there anyone out there who could do this for me?


http://209.85.129.104/search?q=cache:to2LCLnEH58J:www.ijaguar.co.uk/content/tut_timer.aspx+hudroundtimer&hl=de&ct=clnk&cd=4&gl=de&client=firefox-a

thx in advance ...

Angry Beaver
07-05-2007, 03:11 PM
if you really can't code get a coder, learn, or just do it with the level itself.

http://developer.valvesoftware.com/wiki/User:Angry_Beaver

I have a 4 digit counter up on there.

yang
07-05-2007, 11:48 PM
[QUOTE=Angry Beaver;6463190]..., or just do it with the level itself.
QUOTE]

sry, didn't get that!?

so I hope there s someone out there who could compile this for me,
as the tutorial provided above is quite short and even the needed code is shown there... so plz help a hl2 fan out! thx in advance! :)


here s the tutorial link again
http://209.85.129.104/search?q=cache:to2LCLnEH58J:www.ijaguar.co.uk/content/tut_timer.aspx+hudroundtimer&hl=de&ct=clnk&cd=4&gl=de&client=firefox-a

Ging
07-06-2007, 07:31 AM
Be aware that you won't be able to play HL2DM with your modified client.dll if that's what you intended.

yang
07-06-2007, 07:38 AM
thx ging, so I think this story ends here... well, seems like I am going to buy me a small desk clock with seconds on the display instead of coding... :D

razvan252
07-06-2007, 09:00 PM
not really, you could do it as a plugin.

yang
07-07-2007, 01:12 AM
would you explain that further?

razvan252
07-07-2007, 04:38 AM
plugin=some kind of an addon...
Examples for css(can be hl2dm):zombiehorde, zombiemod, bullet time etc. look it up on wiki how to do one.

Ging
07-07-2007, 04:44 AM
But they're all server side...

razvan252
07-07-2007, 04:45 AM
hmm yeah youre right...but it would be beter than typing thetime everytime...

Ging
07-08-2007, 04:00 AM
Or you could just buy a watch...

yang
07-08-2007, 04:31 AM
that s what im gonna do! :)

anyway thx thx thx razvan!!