Time set - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Time set (
/showthread.php?tid=417898)
Time set -
Nivniv2 - 22.02.2013
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;
}
Re: Time set -
Bakr - 23.02.2013
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.
Re: Time set -
zDevon - 23.02.2013
Can we see this function?