How to do so when I write...
#1

How to do so when I write /tod 200, appears to me that "You can not set a time before 0 and after 23 hours"? Thanks in advance

Код:
	if(strcmp(cmd, "/tod", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /tod [0-23]");
				return 1;
			}
			new hour;
			hour = strval(tmp);
			if (PlayerInfo[playerid][pAdmin] >= 4)
			{
	            SetWorldTime(hour);
				format(string, sizeof(string), "Weather is set to %d hours.", hour);
				SendClientMessageToAll(COLOR_GRAD1, string);
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "You are not an admin!");
			}
		}
		return 1;
	}
Reply


Messages In This Thread
How to do so when I write... - by Join7 - 06.05.2011, 11:40
Re: How to do so when I write... - by Vince - 06.05.2011, 12:04
Re: How to do so when I write... - by Join7 - 06.05.2011, 19:28

Forum Jump:


Users browsing this thread: 1 Guest(s)