PDA

View Full Version : [Source] Drawing Time and Date



Str8Soulja
02-09-2008, 12:43 AM
Here is a nice perk i like in a D3D, so i dont lose track of time when i play
Credits - Roverturbo/UC


//includes

#include <time.h>

//globals

char cTimeAndDate[80];
time_t tValue;


//Do the rest In EndScene

HRESULT APIENTRY IDirect3DDevice9::EndScene()
{

tValue = time(NULL);
strftime(cTimeAndDate, sizeof(cTimeAndDate), "[ %a - %b %d - %i:%m %p ]", localtime(&tValue));

return Device->EndScene();

}

man2fight
03-04-2008, 01:01 PM
works this for D3D8 to

olie122333
04-27-2008, 07:26 AM
how do i use it ? where do i insert ?

18hoursperday
04-27-2008, 07:46 AM
Its for when you are making your own d3d..
you know what the vip hacks are..
d3d.
U Attach the d3d to warrock
and u can then add a code.
and it will come up in wrrk.
Harder to detect.
etc:)
18hourz.:)
http://www.dxth4x.com/forums/showthread.php?t=2029
that might help you also:)

olie122333
04-27-2008, 01:37 PM
I AM NOT A STUPID NUB!!!

:flamer



i know, i am making a D3D atm...


i just need to know how to insert this code in ?

Filterhead
04-28-2008, 02:41 PM
Every single shit works fine but in m game it doesn't do anything o.O

---------------------
TatniumD3D Started...
---------------------
Direct3DCreate9(31) succeeded...
Hooked Direct3D9 interface: 0x257300 -> 0xf024d8
Hooked Direct3D9 device: 0x16242c0 -> 0xf025c8

masterboy
04-28-2008, 03:08 PM
You tried pressing insert?

Filterhead
04-28-2008, 03:29 PM
I'll continue from this, thx guys got my crosshair working :p ( I am working on a different game anyway :D )

man2fight
05-02-2008, 03:19 PM
i got 2 problems
the day and month works
but the hours en minutes not

virus7799
07-05-2008, 11:08 AM
i got 2 problems
the day and month works
but the hours en minutes not

Here's another way you can display time using
<ctime>.

Include this at the top

#include <ctime>

Do this in End Scene:


char time [5]
_strtime( time );
printf( "%s", time );

And to display it you would use your draw text function.
In a starter kit it'll most likely look like this:


m_pFont_new->DrawText(710,310,txtWhite,time);

FrancYescO
07-10-2008, 09:32 AM
i got 2 problems
the day and month works
but the hours en minutes not

i have the same problem

and the solutions of virus don't work


and another question isn't possible tho change language of month or day to another(italian :P)?? how i have to set it

olie122333
08-07-2008, 10:19 AM
Here's another way you can display time using
<ctime>.

Include this at the top

#include <ctime>

Do this in End Scene:


char time [5]
_strtime( time );
printf( "%s", time );

And to display it you would use your draw text function.
In a starter kit it'll most likely look like this:


m_pFont_new->DrawText(710,310,txtWhite,time);

nice thanks for that, im gonna use :)

hawky
08-07-2008, 10:30 AM
i have the same problem

and the solutions of virus don't work


and another question isn't possible tho change language of month or day to another(italian :P)?? how i have to set it

yeh how i change the time to that of my own country or is that automatically set to the right one?

Vescovo
08-07-2008, 10:36 AM
yeh how i change the time to that of my own country or is that automatically set to the right one?

its automatic..
it detects local time...

hawky
08-07-2008, 12:45 PM
its automatic..
it detects local time...

ok thx for telling me

Vescovo
08-07-2008, 01:44 PM
ok thx for telling me

if you read the code it's not hard to figure out.

froztyhax
09-02-2008, 04:49 AM
Thanks Str8.

Works perfectly with D3D8. :D

=proxycode=
09-27-2008, 01:24 AM
i love this thanks !!!!!!!!!!!!!!

NicholeAyala
08-02-2009, 02:03 AM
any idea why this wont work in hans menu? when i compile its fine but when i test it on his test program this wierd windows debug thing pops up?

Screeny:
http://i25.tinypic.com/tahg0x.jpg

tictac43v3r
04-17-2010, 09:39 PM
Mine wasn't working at all. Why am I getting GameHack Detected?