Trouble with /tod
#4

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;
}
Reply


Messages In This Thread
Trouble with /tod - by MikeRep - 21.02.2013, 20:59
Re: Trouble with /tod - by Jay_ - 21.02.2013, 21:02
Re: Trouble with /tod - by MikeRep - 21.02.2013, 21:57
Re: Trouble with /tod - by Krakuski - 21.02.2013, 22:27

Forum Jump:


Users browsing this thread: 1 Guest(s)