[Pedido] Setar tempo
#1

Preciso de um comando para mudar o tempo pra qualquer horario tipo /mudarhoradetodos (hora)
Reply
#2

SetWorldTime
Reply
#3

O que vocк usa?
Zcmd:
pawn Код:
CMD:sethora(playerid, params[])
    {
            new hour2;
            if(sscanf(params, "d", hour2))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: /sethora [hora do dia] (0-23)");
                return true;
            }
            new string[128];
            if (PlayerInfo[playerid][pAdmin] >= 1337)
            {
                if(hour2 < 0 || hour2 > 24)
                {
                    SendClientMessage(playerid, COLOR_GRAD2, "Hora mнnima, 0 ~ 24!");
                    return true;
                }
                SetWorldTime(hour2);
                format(string, sizeof(string), "   Hora configurada para %d Horas.", hour2);
                SendClientMessageToAll(COLOR_GRAD1, string);
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб autorizado a usar o comando!");
            }
            return true;
    }
strcmp:
pawn Код:
if(strcmp(cmd, "/sethora", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: /sethoraclima [hora do dia])");
                return true;
            }
            new hour2;
            hour2 = strval(tmp);
            tmp = strtok(cmdtext, idx);
            if (PlayerInfo[playerid][pAdmin] >= 1337)
            {
                SetWorldTime(hour2);
                format(string, sizeof(string), " Hora configurada para %d Horas.", hour2);
                SendClientMessageToAll(COLOR_GRAD1, string);
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб autorizado a usar o comando!");
            }
        }
        return true;
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)