Portal SAMP
[Pedido] Para orgs - Versão de Impressão

+- Portal SAMP (https://portalsamp.com)
+-- Fórum: SA-MP (https://portalsamp.com/forumdisplay.php?fid=5)
+--- Fórum: Área de suporte (https://portalsamp.com/forumdisplay.php?fid=6)
+--- Tópico: [Pedido] Para orgs (/showthread.php?tid=1624)



Para orgs - ivansamp - 10/09/2021

Exclamation Alguém tem o /m para abordagem policial e de org 
E o /revistar?


RE: Para orgs - xbruno1000x - 10/09/2021

São funções que precisam ser adaptadas ao seu GM, não adianta ter apenas os comandos. /revistar sem ter, por exemplo, as suas variaveis de drogas, não encontraria nada em todas as vezes.

Porém, segue um dos comandos:
Código:
alias:revistar("inspeccionar")//español
CMD:revistar(playerid, params[])
{
    new tmp[24], string[128];

    if(sscanf(params, "s[24]", tmp))
        if(idioma[playerid]==PT)return ShowInfoBox(playerid, COR_USOCORRETO, "Uso: /revistar [id]");
        else if(idioma[playerid]==ES)return ShowInfoBox(playerid, COR_USOCORRETO, "Uso: /inspeccionar [id]");

    new id;
    if(!IsNumeric(tmp))
        id = ReturnPlayerID(tmp);
    else
        id = strval(tmp);

    if(!IsPlayerConnected(id))
        if(idioma[playerid]==PT)return ShowInfoBox(playerid, COR_ERRO, "ERRO: ID invalido!");
        else if(idioma[playerid]==ES)return ShowInfoBox(playerid, COR_ERRO, "ERROR: ID invalida!");

    if(!Player[id][pLogged])
        if(idioma[playerid]==PT)return ShowInfoBox(playerid, COR_ERRO, "ERRO: Esse jogador nao esta logado!");
        else if(idioma[playerid]==ES)return ShowInfoBox(playerid, COR_ERRO, "ERROR: Este jugador no ha iniciado sesion!");

    if(!Player[playerid][EmTrabalho])
        if(idioma[playerid]==PT)return ShowInfoBox(playerid, COR_ERRO, "ERRO: Voce nao esta em trabalho!");
        else if(idioma[playerid]==ES)return ShowInfoBox(playerid, COR_ERRO, "ERROR: No estas en el trabajo!");

    if(IsPM(playerid, 1))
    {
        if (ProxDetectorS(5.0, playerid, id))
        {
            MostrarMochila(playerid, id, 2, 0);
            each(Players->new p)
            {
                if(idioma[p]==PT)format(string, sizeof(string), "** %s foi revistado pelo Policial %s.", GetPlayerNameEx(id), GetPlayerNameEx(playerid));
                if(idioma[p]==ES)format(string, sizeof(string), "** %s fue inspeccionado por la policía %s.", GetPlayerNameEx(id), GetPlayerNameEx(playerid));
                MensagemLocal(p, COR_ROXO, string, 60);
            }
        }
        else
            if(idioma[playerid]==PT)ShowInfoBox(playerid, COR_ERRO, "ERRO: Esse player esta muito distante de voce!");
            else if(idioma[playerid]==ES)ShowInfoBox(playerid, COR_ERRO, "ERROR: Este jugador esta demasiado lejos de ti!");
    }
    else
        ShowInfoBox(playerid, COR_ERRO, ERRO_PERM);
    return true;
}

Só servirá como base, o resto é com você.


RE: Para orgs - geek - 12/09/2021

Código:
CMD:m(playerid, result[])
    {
    if(gPlayerLogged[playerid] == 0) { return SendClientMessage(playerid, 0xff6347FF, "* Você não está conectado."); }
            if(PlayerInfo[playerid][pMuted] == 1)
            {
                SendClientMessage(playerid, 0xA92BF6F6, "Você não pode falar, pois foi calado");
                return true;
            }
            if(!IsACop(playerid) && PlayerInfo[playerid][pAdmin] < 1 && PlayerInfo[playerid][pAdminTemp] < 1)
            {
                SendClientMessage(playerid, COLOR_GREY, "Você não é um policial!");
                return true;
            }
            if(OnDuty[playerid] != 1 && PlayerInfo[playerid][pAdmin] < 1 && PlayerInfo[playerid][pAdminTemp] < 1)
            {
                SendClientMessage(playerid, COLOR_GREY, "Você não Bateu o cartão!");
                return true;
            }
            if(PlayerInfo[playerid][pJailed] == 9)
            {
                SendClientMessage(playerid,COLOR_GRAD1,"Você não pode usar este comando nas Celas da Administração!");
                  return true;
            }
            GetPlayerName(playerid, sendername, sizeof(sendername));
            if(isnull(result))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: (/m)egafone [texto]");
                return true;
            }
            //Anti Divulguer
            if(AntiDivulguer(playerid, result))return 1;
            if(IsACop(playerid) || PlayerInfo[playerid][pAdmin] > 0 || PlayerInfo[playerid][pAdminTemp] > 0)
            {
                new string[MAX_STRING];
                if(admtrampando[playerid] > 0)
                {
                    format(string, sizeof(string), "[MEGAFONE] %s:o< %s]", sendername, result);
                    SendClientMessageInRange(60.0, playerid, string, 0xFE85E0AA,0xFE85E0AA,0xFE85E0AA,0xFE85E0AA,0xFE85E0AA);
                }
                else if(PlayerInfo[playerid][pMembro] == 1||PlayerInfo[playerid][pLider] == 1)
                {
                    format(string, sizeof(string), "Policia Militar %s:o< %s", sendername, result);
                    SendClientMessageInRange(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
                }
                else if(PlayerInfo[playerid][pMembro] == 2||PlayerInfo[playerid][pLider] == 2)
                {
                    format(string, sizeof(string), "BOPE %s:o< %s", sendername, result);
                    SendClientMessageInRange(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
                }
                else if(PlayerInfo[playerid][pMembro] == 27||PlayerInfo[playerid][pLider] == 27)
                {
                    format(string, sizeof(string), "Policial Militar %s:o< %s", sendername, result);
                    SendClientMessageInRange(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
                }
                else if(PlayerInfo[playerid][pMembro] == 3||PlayerInfo[playerid][pLider] == 3)
                {
                    format(string, sizeof(string), "Exercito %s:o< %s", sendername, result);
                    SendClientMessageInRange(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
                }
                else if(IsAGOV(playerid))
                {
                    format(string, sizeof(string), "Governo %s:o< %s", sendername, result);
                    SendClientMessageInRange(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
                }
                else if(PlayerInfo[playerid][pMembro] == 16||PlayerInfo[playerid][pLider] == 16)
                {
                    format(string, sizeof(string), "ROTA %s:o< %s", sendername, result);
                    SendClientMessageInRange(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
                }
                else if(PlayerInfo[playerid][pMembro] == 11||PlayerInfo[playerid][pLider] == 11)
                {
                    format(string, sizeof(string), "Policial Federal %s:o< %s", sendername, result);
                    SendClientMessageInRange(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
                }
                else if(PlayerInfo[playerid][pMembro] == 33||PlayerInfo[playerid][pLider] == 33)
                {
                    format(string, sizeof(string), "Policial Civil %s:o< %s", sendername, result);
                    SendClientMessageInRange(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
                }
                else if(PlayerInfo[playerid][pMembro] == 34||PlayerInfo[playerid][pLider] == 34)
                {
                    format(string, sizeof(string), "DETRAN %s:o< %s", sendername, result);
                    SendClientMessageInRange(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
                }
                printf("%s", string);
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD2, "Você não faz parte de nenhuma equipe !");
                return true;
            }
            return true;
    }
Como o mesmo exemplo do amigo a cima ,deve ser adaptado a sua gamemode, qualquer duvida só entrar em contato


RE: Para orgs - ivansamp - 12/09/2021

Ti mandei mensagem lá @greek