#3

Код:
CMD:tod(playerid, params[])
{
	if (PlayerInfo[playerid][pAdmin] >= 1337)
	{
		new string[128], time;
		if (!strlen(params)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /tod [time] (0-23)");

		time = strval(params);

		if (time < 0 || time > 23) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /tod [time] (0-23)");

		SetWorldTime(time);
		FixHour(time);
		shifthour = time;
		ghour = time;
		wtime = 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;
}
Reply


Messages In This Thread
/tod - by raamiix - 15.03.2013, 22:00
Re: /tod - by [ABK]Antonio - 15.03.2013, 22:02
Re: /tod - by P3DRO - 15.03.2013, 22:04
Re: /tod - by raamiix - 15.03.2013, 22:05

Forum Jump:


Users browsing this thread: 1 Guest(s)