Time and Date Function

Posts 1630 of 30 · Page 2 of 2
Lmao .
Quote Originally Posted by Stephen View Post
You made this harder than it was
/fp

Good Job anyway /
I agree LOL
the month must be +1 cause its from 0 - 11 but the other things are right^^
There are easier ways /
AcidBase
Code:
    const time_t timer = time(NULL);
    MenuAddText (ctime(&timer),"");
[code]
const time_t timer = time(NULL);
PrintText(pFont, 1, 1, Green, "The current time and date is: " ctime(&timer) [code]

you could've just done one of these two but mmk
Quote Originally Posted by God601 View Post
This is completely my source so if you use it give credits.

[php]#include <time.h>


struct tm * current_tm;
time_t current_time;time (&current_time);
current_tm = localtime (&current_time);
char *month []={"January","February","March","April","Mai","June ","July","August","September","October","November" ,"December"};
char *Day []={"Sun","Mon","Tue","Wed","Thu","Fri","Sat"};
char *Hour []={"12","1","2","3","4","5","6","7","8","9","10","1 1","12","1","2","3","4","5","6","7","8","9","10"," 11"};
char *Sec []={"00","01","02","03","04","05","06","07","08","09 ","10","11","12","13","14","15","16","17","18","19 ","20","21","22","23","24","25","26","27","28","29 ","30","31","32","33","34","35","36","37","38","39 ","40","41","42","43","44","45","46","47","48","49 ","50","51","52","53","54","55","56","57","58","59 "};
char *Min []={"00","01","02","03","04","05","06","07","08","09 ","10","11","12","13","14","15","16","17","18","19 ","20","21","22","23","24","25","26","27","28","29 ","30","31","32","33","34","35","36","37","38","39 ","40","41","42","43","44","45","46","47","48","49 ","50","51","52","53","54","55","56","57","58","59 "};
char *logbuf = new char[ 256 ];
sprintf( logbuf, "%s %s %02dth %d || %s:%s:%s",Day[current_tm->tm_wday], month[current_tm->tm_mon], current_tm->tm_mday, current_tm->tm_year+1900, Hour[current_tm->tm_hour], Min[current_tm->tm_min], Sec[current_tm->tm_sec]);
[/php]And you can say this is kind of noob proof lol

And this is what it looks like.

you didnt noob proof it at all.....
i c+p it and it works, you must have forgotten to noob proof lol
rep+ for releasing it tho and thanks for the release as well
Whats with all this talk about noob proof? It does shit all.
oh wtf... who did that on my account o.o
I think longevity made this first!
i dont know , last 4 week i didnt went on my account x.x

[REQUEST] Close all fucking post of Coryester , I know it;s him who posted all thoses shit.
Quote Originally Posted by God601 View Post
i dont know , last 4 week i didnt went on my account x.x

[REQUEST] Close all fucking post of Coryester , I know it;s him who posted all thoses shit.
DUDE YOU GAVE ME YOUR INFO NUB
Quote Originally Posted by C00lGuy View Post
DUDE YOU GAVE ME YOUR INFO NUB
Corster STFU Your Leecher Your Using My Editted Hans Menu In Your Base..Stupid Fuck
Code:
  sprintf( logbuf, "%s %s %02dth %d || %s:%s:%s",Day[current_tm->tm_wday], month[current_tm->tm_mon], current_tm->tm_mday, current_tm->tm_year+1900, Hour[current_tm->tm_hour], Min[current_tm->tm_min], Sec[current_tm->tm_sec]);
much easier without char arrays:

Code:
  sprintf( logbuf, "%s %s %02dth %d || %02d:%02d:%02d",Day[current_tm->tm_wday], month[current_tm->tm_mon], current_tm->tm_mday, current_tm->tm_year+1900, current_tm->tm_hour, current_tm->tm_min, current_tm->tm_sec);
then you dont need your arrays.

btw when you call this each frame (present, beginscene, endscene, etc) it will give a each frame a memory leak of 256 bytes. be sure you free the memory (operator delete)

and why the hell is this in the ca hack coding section?
is it the Complete code? oO
Posts 1630 of 30 · Page 2 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?