/time little bug
#1

Код:
CMD:time(playerid, params[])
{
	new hh, mm, ss, string[128];
    gettime( hh, mm, ss );
	format(string, sizeof(string), "~g~[~w~%d:%d~g~]", hh, mm);
	GameTextForAll( string, 8000, 1 );
	return 1;
}
It works fine, but say the time IRL is '17:26' it will display it as '17:2' And not the full minutes..?
Reply
#2

PHP код:
format(stringsizeof(string), "~g~[~w~%02d:%02d~g~]"hhmm); 
Reply
#3

You can use IF,
For example :
PHP код:
if(hh 10)
{
    
format(stringsizeof(string), "~g~[~w~%02d:%d~g~]"hhmm);
    
GameTextForAllstring8000);

And stuff a like. (You can use it for mm exactly like this)
Good luck.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)