/tod Command - 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 Command (
/showthread.php?tid=416953)
/tod Command -
repalone11 - 18.02.2013
The /tod command in my script works but is over thrown by something else. When I use the command it switches the weather for a second and switches it right back. Anyone know what can solve this issue? I want to change the server time and the players time. Simply trying to make it day time.
Re: /tod Command -
PaulDinam - 18.02.2013
Well, look up for your current /tod command and place this simple one:
pawn Код:
CMD:tod(playerid, params[])
{
new string[128], time;
if(!IsPlayerAdmin(playerid)) return 1;
if(sscanf(params, "d", time)) return SyntaxMSG(playerid, "/tod [time] (0-23)");
SetWorldTime(time);
format(string, sizeof(string), "Time set to %d:00.", time);
SendClientMessageToAll(-1, string);
return 1;
}
Re: /tod Command -
repalone11 - 18.02.2013
Quote:
Originally Posted by PaulDinam
Well, look up for your current /tod command and place this simple one:
pawn Код:
CMD:tod(playerid, params[]) { new string[128], time; if(!IsPlayerAdmin(playerid)) return 1; if(sscanf(params, "d", time)) return SyntaxMSG(playerid, "/tod [time] (0-23)"); SetWorldTime(time); format(string, sizeof(string), "Time set to %d:00.", time); SendClientMessageToAll(-1, string); return 1; }
|
Looks similar to mine but ill try it.
Re: /tod Command -
repalone11 - 18.02.2013
Quote:
Originally Posted by PaulDinam
Well, look up for your current /tod command and place this simple one:
pawn Код:
CMD:tod(playerid, params[]) { new string[128], time; if(!IsPlayerAdmin(playerid)) return 1; if(sscanf(params, "d", time)) return SyntaxMSG(playerid, "/tod [time] (0-23)"); SetWorldTime(time); format(string, sizeof(string), "Time set to %d:00.", time); SendClientMessageToAll(-1, string); return 1; }
|
Did not work, it switches for a second and then goes back, what could be doing this?
Re: /tod Command -
repalone11 - 18.02.2013
Yes im using setplayertime.
Re: /tod Command -
Bakr - 18.02.2013
Do you have timer somewhere changing the global time? Enlighten us with your code.
Re: /tod Command -
repalone11 - 18.02.2013
Quote:
Originally Posted by Bakr
Do you have timer somewhere changing the global time? Enlighten us with your code.
|
Could you add me on skype? tom.repalone
Re: /tod Command -
repalone11 - 18.02.2013
I need a command that uses setplayertime I think.
Re: /tod Command -
denNorske - 19.02.2013
Search in your code for: SetPlayerTime
And tell me if you find it anywhere else in your script. It could be this causing it to change back to another time.
~Airplanesimen