TOD not working [++REP] - 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 not working [++REP] (
/showthread.php?tid=320746)
TOD not working [++REP] -
varuncoolrule - 24.02.2012
Hello friends this cmd is not working why please help me
pawn Код:
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);
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 not working [++REP] -
varuncoolrule - 24.02.2012
Please Help Me Please
Re: TOD not working [++REP] -
Twisted_Insane - 24.02.2012
Try it with an integer:
pawn Код:
if(sscanf(params, "i", time))
Re: TOD not working [++REP] -
Kaperstone - 24.02.2012
and if his solution doesn't work.
than try this one:
pawn Код:
if(sscanf(params, "n", time))
Re: TOD not working [++REP] -
Twisted_Insane - 24.02.2012
Why "n"?
Re: TOD not working [++REP] -
TheTale - 24.02.2012
he's using the NGRP script.
Let me break it down.
The time in the NGRP script is streamed with stuff like Sync functions.
Learn ur facts
Re: TOD not working [++REP] -
TheTale - 24.02.2012
putting it simply ; Remove the Sync function.
Re: TOD not working [++REP] -
varuncoolrule - 25.02.2012
Both Not Working
Re: TOD not working [++REP] -
varuncoolrule - 25.02.2012
Please Someone help me
Re: TOD not working [++REP] -
DRIFT_HUNTER - 25.02.2012
Command looks fine and it must work so its not the cmd..by the way make it more simple
pawn Код:
CMD:tod(playerid, params[])
{
if (PlayerInfo[playerid][pAdmin] < 1337) return SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
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);
return 1;
}
And you dont need that gTime unless you use it to detect time...