Clock going to 25 and higher
#1

Ok, my server has a custom clock i made, but sometimes the weathers get bugged on certain times, and i decided to make a command which changes the world's time and sets the clock to the number i set using the settime command, but the problem is, the command can go over 24 to 25 26 and 27, when i want it to restart to 0 after 24.


pawn Код:
CMD:settime(playerid, params[])
    {
    new time;
    if(sscanf(params, "ii", time)) return SendClientMessage(playerid, GRAY, "Function : /settime [ hour ]");
    if(time < 0 || time > 24) return SendClientMessage(playerid, GRAY, "The available hours are 0-24 ! ");
    if(!sscanf(params, "ii", time))
    {
    new name[MAX_PLAYER_NAME], mestring[128];
    GetPlayerName(playerid, name, sizeof(name));
    format(mestring, sizeof(mestring), "%s has changed San Andreas Time to %d", name, time);
    SendClientMessageToAll(GRAY, mestring);
    SetWorldTime(time);
    V_ToggleClock();
    V_ToggleClock(time, 0);
    return 1;
    }
    return 1;
    }
Reply


Messages In This Thread
Clock going to 25 and higher - by stix - 08.12.2012, 22:45
Re: Clock going to 25 and higher - by LarzI - 08.12.2012, 22:55
Respuesta: Clock going to 25 and higher - by stix - 08.12.2012, 23:18
Re: Clock going to 25 and higher - by Ironboy - 08.12.2012, 23:37
Respuesta: Clock going to 25 and higher - by stix - 08.12.2012, 23:47

Forum Jump:


Users browsing this thread: 1 Guest(s)