Problem with /settime command
#1

Im having issues with this command, i do not receive any errors when i try to compile, but once i get in-game and try to set the server time, it's always sending me the error message "You may only set valid hours between 0 and 23" instead of setting the server time, help plz.


pawn Код:
CMD:settime(playerid, params[])
{
new pTI, string[128];
if(pInfo[playerid][Level] < 1) return SendClientMessage(playerid, 0xFF0000AA, "[ERROR]You are not authorized to use this command.");
if(sscanf(params, "u", pTI)) return SendClientMessage(playerid, 0xFF0000AA, "[USAGE]: /settime <time>.");
if(pTI > 24 || pTI > 0) return SendClientMessage(playerid, 0xFF0000AA, "You may only set valid hours between 0 and 23");
for(new i = 0; i < MAX_PLAYERS; i++)
{
SetPlayerTime(i, pTI, 0);
}
format(string, sizeof(string), "World time has been set to %d", pTI);
SendClientMessageToAll(0x10F441AA, string);
return 1;
}
There's the code!
Reply


Messages In This Thread
Problem with /settime command - by GwENiko - 20.04.2013, 14:08
Re: Problem with /settime command - by [MG]Dimi - 20.04.2013, 14:11
Re: Problem with /settime command - by MattyG - 20.04.2013, 14:18
Re: Problem with /settime command - by GwENiko - 20.04.2013, 14:21
Re: Problem with /settime command - by Jessyy - 20.04.2013, 16:44

Forum Jump:


Users browsing this thread: 1 Guest(s)