tod problem
#1

Hi all,
some help please, I'm having trouble with this, can't seem to change the gametime.
Код:
CMD:tod(playerid, params[])
{
	if (PlayerInfo[playerid][pAdmin] >= 5)
	{
		new string[128], time;
		if(sscanf(params, "d", time)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /tod [time] (0-23)"); 

		SetWorldTime(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;
}
Also tried changing
Код:
if(sscanf(params, "n", time))
to
Код:
if(sscanf(params, "i", time))
I did try to remove gTime=time also.
All of the above did not work, does anyone else have any other ideas on fixing this?
Reply
#2

your errors/warnings pleade
Reply
#3

Quote:
Originally Posted by [Bios]Marcel
Посмотреть сообщение
your errors/warnings pleade
It does not show errors while compiling, but in-game when the command is used, it changes to the specific wanted time for about a second and changes back to server time, which is my hoster's time @ their timezone. (colorhost)
Reply
#4

It's because you're using the NGRP script and it has a system setup to stay to the real time. I would highly recommend not starting on that script if you don't have a decent amount of experience with scripting.
Reply
#5

Quote:
Originally Posted by SuperViper
Посмотреть сообщение
It's because you're using the NGRP script and it has a system setup to stay to the real time. I would highly recommend not starting on that script if you don't have a decent amount of experience with scripting.
I don't think it's synced properly anyway. If my server time is night time, I still see day sky. I would like to start on this script as a base, of course, credits will be given to respective owners.
Reply
#6

Yea, most of the NGRP scripts really don't work for /tod, just because of the old coding.
Reply
#7

Quote:
Originally Posted by dannyk0ed
Посмотреть сообщение
Yea, most of the NGRP scripts really don't work for /tod, just because of the old coding.
you have any ideas to remove the whole sync setup thas scripted into this script?
Reply
#8

Ok, gTime=time is sync for Realtime right?
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)