/tod - 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: /tod (
/showthread.php?tid=425762)
/tod -
raamiix - 26.03.2013
Not chaning time what i going to do?
Код:
CMD:tod(playerid, params[])
{
if (PlayerInfo[playerid][pAdmin] >= 1337)
{
new string[128], time;
if(sscanf(params, "d", time)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /tod [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: /tod -
Jeffry - 26.03.2013
You might try
SetPlayerTime.
Re: /tod -
raamiix - 26.03.2013
Quote:
Originally Posted by Jeffry
|
Where to add it?
Код:
SetPlayerTime(playerid,12,0); //noon
SetPlayerTime(playerid,0,0); //midnight
Re: /tod -
vitorvlv - 26.03.2013
If you want to do this for all players, will have to add a loop and puts
loop :
pawn Код:
for(new i=0; i<MAX_PLAYERS; i++)
{
}
Re: /tod -
raamiix - 26.03.2013
Quote:
Originally Posted by vitorvlv
If you want to do this for all players, will have to add a loop and puts
loop :
pawn Код:
for(new i=0; i<MAX_PLAYERS; i++) { }
|
It's removing when i do it
Re: /tod -
Jeffry - 27.03.2013
Quote:
Originally Posted by raamiix
It's removing when i do it
|
What?
Re: /tod -
raamiix - 27.03.2013
Quote:
Originally Posted by Jeffry
What?
|
when I type /tod after a while the time changes back
Re: /tod -
gtakillerIV - 27.03.2013
You're using the gl_realtime FS. Remove it from your server.cfg file. You can find it in the "Filterscripts" line.
Re: /tod -
raamiix - 27.03.2013
Quote:
Originally Posted by gtakillerIV
You're using the gl_realtime FS. Remove it from your server.cfg file. You can find it in the "Filterscripts" line.
|
I only got this:
Код:
buttons anims knpc Firework2 gcustom vacations F_streamer maploader Mapv1 notepad Weaponholder MegaPhone test1 radio attachments
Re: /tod -
Jeffry - 28.03.2013
Any other timer that may change the time? Search for SetPlayerTime/SetWorldTime in your script(s).