[Pedido] New Comando
#1

Bom estava querendo um comando /agendarcadeia que quando um cara fosse denunciado um ADM entrasse no jogo e desse /agendarcadeia [ID] [TEMPO] [MOTIVO]... Bom estou querendo um NOVO COMANDO
Vou deixar o comando /cadeia aqui sу para ajudar...
OBS: Sу para reforзar quero um comando novo...
pawn Код:
if(strcmp(cmd, "/cadeia",true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            new tempo[20];
            new tempo2;
            if(PlayerInfo[playerid][pAdmin] < 3)
            {
                SendClientMessage(playerid, COLOR_GREY, "   Vocк nгo esta autorizado para usar este comando!");
                return true;
            }
            tmp = strtok(cmdtext, idx);
            tempo = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: /cadeia [id] [Tempo] [Motivo]");
                return true;
            }
            if(!strlen(tempo))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: /cadeia [id] [Tempo] [Motivo]");
                return true;
            }
            if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1341)
            {
                SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/jogar)");
                return true;
            }
            giveplayerid = ReturnUser(tmp);
            tempo2 = strval(tempo);
            new length = strlen(cmdtext);
            while ((idx < length) && (cmdtext[idx] <= ' '))
            {
            idx++;
            }
            new offset = idx;
            new result[100];
            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
            {
            result[idx - offset] = cmdtext[idx];
            idx++;
            }
            result[idx - offset] = EOS;
            if(IsPlayerConnected(giveplayerid))
            {
                if(giveplayerid != INVALID_PLAYER_ID)
                {
                    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                    GetPlayerName(playerid, sendername, sizeof(sendername));
                    format(string, sizeof(string), "Admin %s colocou %s na Cadeia, por %s minutos, Motivo: %s",PlayerName(playerid), giveplayer, tempo, (result));
                    SendClientMessageToAll(COLOR_LIGHTRED, string);
                    ResetPlayerWeaponsEx(giveplayerid);
                    OnPlayerUpdate(giveplayerid);
                    PlayerInfo[giveplayerid][pJailed] = 6;
                    PlayerInfo[giveplayerid][pJailTime] = tempo2 * 60;
                    SetPlayerInterior(giveplayerid, 5);
                    SetPlayerPos(giveplayerid, 318.5804,316.9043,999.1484);
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "   O jogador estб offline !");
                return true;
            }
        }
        return true;
    }
Reply


Messages In This Thread
New Comando - by The_G0dFather - 02.07.2012, 16:52
Re: [AJUDA] New Comando - by [BcSTotty_Munson - 02.07.2012, 17:47
Re: [AJUDA] New Comando - by The_G0dFather - 02.07.2012, 17:58
Re: [AJUDA] New Comando - by Macintosh - 02.07.2012, 18:12
Re: [AJUDA] New Comando - by Macintosh - 02.07.2012, 18:19
Re: New Comando - by The_G0dFather - 02.07.2012, 19:33
Re: New Comando - by Ricop522 - 02.07.2012, 20:16
Re: New Comando - by The_G0dFather - 03.07.2012, 17:49
Re: New Comando - by ViictorDaay- - 03.07.2012, 17:55
Re: New Comando - by The_G0dFather - 03.07.2012, 18:07

Forum Jump:


Users browsing this thread: 1 Guest(s)