SA-MP Forums Archive
/changetime Bug - 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: /changetime Bug (/showthread.php?tid=398273)



/changetime Bug - MikeMike1997 - 08.12.2012

The time is not changing.

Код:
  	if(strcmp("/changetime", cmd, true) == 0)
	{
		new tmp[256], cmdid;

		tmp = strtok(cmdtext, idx);
		if(PlayerInfo[playerid][AdminLevel] < 1) return 0;
		if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /changetime [time]");
		cmdid = strval(tmp);
     	if(cmdid < 0 || cmdid > 24) return SendClientMessage(playerid,COLOR_ORED,"Wrong Time!");
		SetWorldTime(cmdid);
		SendClientMessageToAll(COLOR_LIGHTGREEN,"An Admin has changed the time!");
		return 1;
	}