Help about command fix world time
#1

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;
}

Reply


Messages In This Thread
Help about command fix world time - by Bumie - 09.07.2015, 05:10
Re: Help about command fix world time - by SoFahim - 09.07.2015, 06:42
Re: Help about command fix world time - by Bumie - 09.07.2015, 08:35
Re: Help about command fix world time - by SoFahim - 09.07.2015, 09:56
Re: Help about command fix world time - by Bumie - 09.07.2015, 10:31
Re: Help about command fix world time - by SpikeSpigel - 09.07.2015, 11:26
Re: Help about command fix world time - by Bumie - 14.07.2015, 15:39

Forum Jump:


Users browsing this thread: 1 Guest(s)