tod problem - 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 problem (
/showthread.php?tid=382431)
tod problem -
shauncyq - 03.10.2012
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?
AW: tod problem -
BiosMarcel - 03.10.2012
your errors/warnings pleade
Re: AW: tod problem -
shauncyq - 03.10.2012
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)
Re: tod problem -
SuperViper - 03.10.2012
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.
Re: tod problem -
shauncyq - 04.10.2012
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.
Re: tod problem -
dannyk0ed - 04.10.2012
Yea, most of the NGRP scripts really don't work for /tod, just because of the old coding.
Re: tod problem -
shauncyq - 04.10.2012
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?
Re: tod problem -
shauncyq - 04.10.2012
Ok, gTime=time is sync for Realtime right?