Time set
#1

When i change to other time, its returning it to the previous one.

let's say like this:

its like 22:00 in-game and when i /settime it to 13:00, its changes it to 13:00 and then back to 22:00.

Код:
CMD:settime(playerid, params[])
{
	if (PlayerInfo[playerid][pAdmin] >= 1337)
	{
		new string[128], time;
		if(sscanf(params, "d", time)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /settime [time] (0-23)");

		SetWorldTime(time);
		FixHour(time);
		shifthour = time;
		ghour = time;
		wtime = time;
		gTime = time;
		format(string, sizeof(string), "Time set to %d:00.", time);
		BroadCast(COLOR_GRAD1, string);
	}
	else
	{
		SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
	}
	return 1;
}
Reply
#2

There is something else overriding the world time, most likely a timer. You need to adjust it to the system in place in the gamemode for it to work correctly.
Reply
#3

pawn Код:
FixHour(time);
Can we see this function?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)