Clock always displays 12:0
#1

I made a /time command with this
Код HTML:
		GetPlayerTime(playerid,hour,minutes);
		format(string,128,"~b~~h~%i:%i",hour,minutes);
		GameTextForPlayer(playerid, string, 3000, 1);
but it always displays just 12:0
Reply
#2

It should be this:

pawn Код:
GetPlayerTime(playerid, hour, minutes);
format(string, 128, "~b~~h~%02d:%02d", hour,minutes);
GameTextForPlayer(playerid, string, 3000, 1);
And GetPlayerTime only works if you've used TogglePlayerClock or SetPlayerTime.
Reply
#3

GetPlayerTime returns the in-game time of that player, if you want the real time, you have to use gettime.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)