SA-MP Forums Archive
Help about command fix world time - 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: Help about command fix world time (/showthread.php?tid=580892)



Help about command fix world time - Bumie - 09.07.2015

I wan't to change the time of the sever to night to place a party, but I use this commands It's working but after that 30 - 60 second, the time will return to day. How to config it bro
Quote:

CMD:tod(playerid, params[])
{
if (PlayerInfo[playerid][pAdmin] >= 1337)
{
new string[128], time;
if(sscanf(params, "d", time)) return SendClientMessageEx(playerid, COLOR_WHITE, "Su dung: /tod [time] (0-23)");

SetWorldTime(time);
format(string, sizeof(string), "Thoi Gian Chinh Thanh %d:00.", time);
SendClientMessageEx(playerid, COLOR_GREY, string);
}
else
{
SendClientMessageEx(playerid, COLOR_GRAD1, "{FF0000}Ban Khong Du Kha Nang De Su Dung Lenh Nay!");
}
return 1;
}
forward todtime();
public todtime()
{
SetWorldTime(0);
GioFix = SetTimerEx("todtime1", 10000, 0, "d", 1);
}

forward todtime1();
public todtime1()
{
SetWorldTime(0);
GioFix1 = SetTimerEx("todtime", 1000, 0, "d", 1);
}

CMD:efixtime(playerid, params[])
{
if (PlayerInfo[playerid][pAdmin] >= 1337)
{
SetWorldTime(0);
SetTimerEx("todtime", 1000, 0, "d", 1);
}
else
{
SendClientMessageEx(playerid, COLOR_GRAD1, "Ban ko du kha nang de thuc hien lenh nay!");
}
return 1;
}

CMD:dfixtime(playerid, params[])
{
if (PlayerInfo[playerid][pAdmin] >= 1337)
{
new string[128], time;
if(sscanf(params, "d", time)) return SendClientMessageEx(playerid, COLOR_WHITE, "Su Dung: /dfixtime [time] (0-23)");

SetWorldTime(time);
format(string, sizeof(string), "Thoi gian bay gio la %d:00.", time);
SendClientMessageToAllEx(COLOR_GRAD1,string);
KillTimer(GioFix);
KillTimer(GioFix1);
}
else
{
SendClientMessageEx(playerid, COLOR_GRAD1, "Ban ko du kha nang de thuc hien lenh nay!");
}
return 1;
}




Re: Help about command fix world time - SoFahim - 09.07.2015

Am i able to know your Gamemode script name? and one more thing , check there any line like this or not
PHP код:
new realtime 



Re: Help about command fix world time - Bumie - 09.07.2015

Quote:
Originally Posted by SoFahim
Посмотреть сообщение
Am i able to know your Gamemode script name? and one more thing , check there any line like this or not
PHP код:
new realtime 
I use mode NGG, and the second thing, your line is not in my script


Re: Help about command fix world time - SoFahim - 09.07.2015

Hmm! NGG. As long as i know There must be a line like this. Over check all files.


Re: Help about command fix world time - Bumie - 09.07.2015

Quote:
Originally Posted by SoFahim
Посмотреть сообщение
Hmm! NGG. As long as i know There must be a line like this. Over check all files.
I have find all but I can't find this line, and the mode when running still change the time of sever in 30 - 60 seconds and the time will return to day. Help me please


Re: Help about command fix world time - SpikeSpigel - 09.07.2015

Isn't that working cuz of the timer ?


Re: Help about command fix world time - Bumie - 14.07.2015

Someone help me this problem please