25.02.2012, 09:56
Command looks fine and it must work so its not the cmd..by the way make it more simple
And you dont need that gTime unless you use it to detect time...
pawn Код:
CMD:tod(playerid, params[])
{
if (PlayerInfo[playerid][pAdmin] < 1337) return SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
new string[128], time;
if(sscanf(params, "d", time)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /tod [time] (0-23)");
SetWorldTime(time);
gTime = time;
format(string, sizeof(string), "Time set to %d:00.", time);
BroadCast(COLOR_GRAD1, string);
return 1;
}