#1

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;
}
Reply
#2



You might try SetPlayerTime.
Reply
#3

Quote:
Originally Posted by Jeffry
Посмотреть сообщение


You might try SetPlayerTime.
Where to add it?

Код:
SetPlayerTime(playerid,12,0); //noon
SetPlayerTime(playerid,0,0); //midnight
Reply
#4

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++)
{
}
pawn Код:
SetPlayerTime (i, time);
Reply
#5

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++)
{
}
pawn Код:
SetPlayerTime (i, time);
It's removing when i do it
Reply
#6

Quote:
Originally Posted by raamiix
Посмотреть сообщение
It's removing when i do it
What?
Reply
#7

Quote:
Originally Posted by Jeffry
Посмотреть сообщение
What?
when I type /tod after a while the time changes back
Reply
#8

You're using the gl_realtime FS. Remove it from your server.cfg file. You can find it in the "Filterscripts" line.
Reply
#9

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
Reply
#10

Any other timer that may change the time? Search for SetPlayerTime/SetWorldTime in your script(s).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)