[Ajuda] Meu GM pode prender sem ta nos procurados ajuda ?
#3

pawn Код:
if(strcmp(cmd, "/prender", true) == 0)
    {
        format(file, sizeof(file), PASTA_CONTAS, GetPlayerNameEx(playerid));
        if(dini_Int(file, "Profissao") == Policial_C || dini_Int(file, "Profissao") == Policial_F || dini_Int(file, "Profissao") == Delegado || dini_Int(file, "Profissao") == Bope || dini_Int(file, "Profissao") == Swat || dini_Int(file, "Profissao") == Narcoticos || dini_Int(file, "Profissao") == Policial_M || dini_Int(file, "Profissao") == FBI || dini_Int(file, "Profissao") == Interpol || dini_Int(file, "Profissao") == LSPD || dini_Int(file, "aAdmin") == 2 || PlayerInfo[playerid][SCON] == true)
        {
            new plid, motivo[64];

            if(sscanf(cmdtext, "s[5]us[64]", cmd, plid, motivo))
            {
                SendClientMessage(playerid, Vermelho, "Use: /prender [id] [motivo]");
                return 1;
            }
            if(IsPlayerInAnyVehicle(plid) || IsPlayerInAnyVehicle(playerid))
            {
                SendClientMessage(playerid, Vermelho, "Alguem estб dentro de um carro.");
                return 1 ;
            }
            if(GetPlayerWantedLevel(plid)) == 0)
            {
                return SendClientMessage(playerid,Cinza,"Vocк nгo pode prender uma pessoa sem nнveis de procurado!");
            }
            if(plid == playerid)
            {
                SendClientMessage(playerid, Vermelho, "Vocк nгo pode fazer isto com si mesmo.");
                return 1 ;
            }
            if(!IsPlayerConnected(plid))
            {
                SendClientMessage(playerid, Vermelho, "O(A) jogador(a) nгo estб conectado.");
            }
            else
            {
                if(GetDistanceBetweenPlayers(plid, playerid) < 10)
                {
                    {
                        PrenderPlayer(plid);
                        GivePlayerGrana(playerid, 700);

                        format(string, sizeof(string), "O oficial da lei %s te prendeu. Porque vocк era um procurado/suspeito(a).", GetPlayerNameEx(playerid));
                        SendClientMessage(plid, Blue, string);

                        format(string, sizeof(string), "O jogador %s (ID: %d) Foi Preso por %s (ID: %d)Motivo: %s", GetPlayerNameEx(plid), GetPlayerNameEx(playerid), motivo);
                        SendClientMessageToAll(Blue, string);
                    }
                }
                else
                {
                    SendClientMessage(playerid, Vermelho, "Chegue mais perto para prender!");
                }
            }
        }
        else
        {
            SendClientMessage(playerid, Vermelho, "Apenas policiais podem usar este comando!");
        }
        return 1;
    }
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)