SetPlayerTime
#6

Quote:
Originally Posted by _Zeus
Посмотреть сообщение
And you assign nothing to "time". Sscanf or even isnull + isnumeric would be useful for that command.

People must understand that using strcmp to compare string for commands is not an efficient way and it's slow/outdated, strtok too.
ZCMD is more easier then strtok...

pawn Код:
CMD:setmytime(playerid, params[])
{
    new string1[128]; new time;
    if(sscanf(params, "i", time))
    {
    SendClientMessage(playerid, COLOR_GREY, "Usage: /setmytime [Time(Hour)");
    SendClientMessage(playerid, COLOR_PINK, "Function: Will set your Time");
    }
    SetPlayerTime(playerid, time, 0);
    format(string1, sizeof(string1), "His time has Changed to: %d:00", time);
    SendClientMessage(playerid, -1, string1);
    return 1;
}
Here is the code!
Reply


Messages In This Thread
SetPlayerTime - by Salsa - 15.07.2013, 14:03
Re: SetPlayerTime - by Passout - 15.07.2013, 14:18
Re: SetPlayerTime - by PrinceKumar - 15.07.2013, 14:42
Re: SetPlayerTime - by Areax - 15.07.2013, 15:11
Re: SetPlayerTime - by Konstantinos - 15.07.2013, 15:17
Re: SetPlayerTime - by Areax - 15.07.2013, 15:22
Re: SetPlayerTime - by Konstantinos - 15.07.2013, 15:26
Re: SetPlayerTime - by Areax - 15.07.2013, 15:30
Re: SetPlayerTime - by Salsa - 15.07.2013, 15:47
Re: SetPlayerTime - by Areax - 15.07.2013, 15:55

Forum Jump:


Users browsing this thread: 3 Guest(s)