[Ajuda] Comando
#4

Vlwwwww... funcionou.... perfeitamente +rep e rjjj me ajuda com outro comando ?! *_* o /agendar (server para agendar a cadeia do player)

pawn Код:
if(strcmp(cmd, "/agendar",true) == 0)
    {
        if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1341) return SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/jogar)");
        new jogador[128], tempo[128], str[50];
        jogador = strtok(cmdtext, idx);
        tempo = strtok(cmdtext, idx);
        new length = strlen(cmdtext);
        while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; }
        new offset = idx; new result[128];
        while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; }
        result[idx - offset] = EOS;
        if(!strlen(jogador) || !strlen(tempo) || !strlen(result)) return SendClientMessage(playerid, COLOR_GRAD2, "USE: /agendar [Nome] [Tempo] [Motivo]");
        for(new x = 0, y = GetMaxPlayers(); x != y; x++)
        {
            if(IsPlayerConnected(x))
            {
            new nome[24];
            GetPlayerName(x, nome, MAX_PLAYER_NAME);
            if(!strcmp(nome, jogador))  return SendClientMessage(playerid, COLOR_GREY, " O jogador estб online... Use o comando comum para prendelo. !");
            }
        }
        format(str,sizeof(str), "Contas/%s.ini", jogador);
        if(!dini_Exists(str)) return SendClientMessage(playerid, COLOR_GREY, "   Nome Invalido! !");
        format(string, sizeof(string), "O admin %s agendou %s, %d minutos, Motivo: %s",PlayerName(playerid), jogador, strval(tempo), result);
        SendClientMessageToAll(COLOR_LIGHTRED, string);
        dini_IntSet(str, "pJailed", 6);
        dini_IntSet(str, "pJailTime", strval(tempo) * 60);
        return 1;
    }
Tipo funciona normalmente mais quando o player a ser preso entra ele continua normalmente como se nada tivesse acontecido.
Att. The_GodFather
Reply


Messages In This Thread
Comando - by The_G0dFather - 29.07.2012, 12:45
Re: [Ajuda] Comando - by The_G0dFather - 29.07.2012, 12:51
Re: [Ajuda] Comando - by rjjj - 29.07.2012, 14:00
Re: [Ajuda] Comando - by The_G0dFather - 29.07.2012, 14:12

Forum Jump:


Users browsing this thread: