Stats help!
#1

How can i add Hours, Minutes, Seconds in /stats command? +rep for help




Thank you!
Reply
#2

Quote:
Originally Posted by Ninad
Посмотреть сообщение
How can i add Hours, Minutes, Seconds in /stats command? +rep for help




Thank you!
Credits to my friend Konstantinos


Put the code below somewhere in your /stats and change sz_str to which you are using currently using

Код HTML:
format(sz_str, sizeof(sz_str), "%s\nTime Login: %s", sz_str, ConvertTime2(seconds));
Код HTML:
stock ConvertTime2(cts)
{
    #define PLUR(%0,%1,%2) (%0),((%0) == 1)?((#%1)):((#%2))
    new strii[128], cth, ctm;
	cth = cts / 3600;
	cts %= 3600;
	ctm = cts / 60;
	cts %= 60;
	format(strii, sizeof(strii), "%d %s, %d %s", cth, (cth == 1) ? ("hour") : ("hours"), ctm, (ctm == 1) ? ("minute") : ("minutes"));
	return strii;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)