21.02.2013, 22:27
Try this, Untested.
pawn Код:
CMD:tod(playerid, params[])
{
new string[128], input;
if (PlayerInfo[playerid][pAdmin] >= 1337) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
if(sscanf(params, "d", time)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /tod [time] (0-23)");
if(input > 23) return SendClientMessage(playerid, COLOR_GREY, "Hours are between 0 and 23.");
gettime(thour, tmin, tsec);
thour = input;
SetWorldTime(input);
format(string, sizeof(string), "AdmWarn: You have set the time to whatever you desired");
SendClientMessage(0xFFFFFFFF, 1, string);
return 1;
}

