[Ajuda] Comando
#3

try

pawn Код:
CMD:prender(playerid, params[])
{
    new id, string[128];
    if(IsPlayerConnected(playerid) && IsACop(playerid))
    {
        if(OnDuty[playerid] != 1) return SendClientMessage(playerid, COR_CINZA, "   Vocк nгo Bateu o cartгo!");
       
        if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "Erro: ID nao conetado");

        if(!PlayerToPoint(12.0, playerid, 268.3327,77.8972,1001.0391) && !PlayerToPoint(12.0, playerid, 1545.4073,-1607.9791,13.3828) && !PlayerToPoint(12.0, playerid, 324.3141,-1496.9177,24.9219)
        && !PlayerToPoint(12.0, playerid, 920.5212,-1184.8267,16.9766) &&  !PlayerToPoint(12.0, playerid, 221.1459,115.3492,999.0156) && !PlayerToPoint(12.0, playerid, 193.9101,179.2799,1003.0234)
        && !PlayerToPoint(12.0, playerid, 1545.7220,-1609.4769,13.3828) && !PlayerToPoint(12.0, playerid, 1019.6051,-317.6436,73.9922) && !PlayerToPoint(12.0, playerid, 195.5733,158.4008,1003.0234)
        && !PlayerToPoint(12.0, playerid, 1410.2281,413.0080,19.7578) && !PlayerToPoint(12.0, playerid, -1298.8188,490.5014,11.1953) && !PlayerToPoint(12.0, playerid, 264.1557,77.5797,1001.0391)
        && !PlayerToPoint(12.0, playerid, 1361,175.1075,1003.0234) && !PlayerToPoint(12.0, playerid, 321.8284,315.6733,999.1484) && !PlayerToPoint(12.0, playerid, 1807.5519,-1689.7974,13.5461)
        && !PlayerToPoint(12.0, playerid, 899.5557,-1206.2456,16.9766) && !PlayerToPoint(12.0, playerid, -509.7748,-557.3786,25.5234))
        {
            SendClientMessage(playerid, COR_CINZA, "   Vocк nгo estб perto da cela, nгo pode prender o suspeito !");
            return 1;
        }
        if(sscanf(params, "uddd", id, time, bail, bailprice )) return SendClientMessage(playerid, COR_BRANCO, "USE: /prender [id] [time (minutos)] [bail (0=nao 1=sim)] [preco da bail]");

        if(time < 1 || time > 20) return SendClientMessage(playerid, COR_CINZA, "   O time nгo pode ser menor que 1 nem maior que 20 !");
           
        if(bail < 0 || bail > 1) return SendClientMessage(playerid, COR_CINZA, "   Fianзa Tem Que ser 0=Nгo ou 1=Sim !");
           
        if(bailprice  < 0 || bailprice  > 300000) return SendClientMessage(playerid, COR_CINZA, "   O Preзo nгo pode ser menor que 0 nem maior que R$300000 !");
           
        if(GetDistanceBetweenPlayers(playerid, id) < 15)
        {
            if(BrunoInfo[playerid][pMembro] == 1 || BrunoInfo[playerid][pLider] == 1)
            {
                if(WantedPoints[id] < 1) return SendClientMessage(playerid, COR_CINZA, "   O Jogador deve ter no mнnimo 1 nнvel de procurado!");
                       
                format(string, sizeof(string), "* Vocк Prendeu %s !", pNome(id));
                SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                format(string, sizeof(string), "Preso por %s", pNome(playerid));
                GameTextForPlayer(id, string, 5000, 5);
                ResetPlayerWeapons(id);
                if(BrunoInfo[playerid][pMembro]==1||BrunoInfo[playerid][pLider]==1)
                {
                    format(string, sizeof(string), "<< Policial Militar %s prendeu o suspeito %s >>", pNome(playerid), pNome(id));
                    OOCNews(COR_VERMELHO, string);
                }
                SetPlayerInterior(id, 6);
                SetPlayerPos(id,264.6288,77.5742,1001.0391);
                BrunoInfo[id][time] = time * 60;
                SetPlayerSkin(id, 42);
                SetPlayerChatBubble(id, "*", COR_VERMELHO, 1, 1);
                if(bail == 1)
                {
                    JailPrice[id] = bailprice ;
                    format(string, sizeof(string), "Vocк foi preso por %d Segundos.   Fianзa: R$%d", BrunoInfo[id][time], JailPrice[id]);
                    SendClientMessage(id, COLOR_LIGHTBLUE, string);
                }
                else
                {
                    JailPrice[id] = 0;
                    format(string, sizeof(string), "Vocк foi preso por %d Segundos.   Fianзa: Desativada", BrunoInfo[id][time]);
                    SendClientMessage(id, COLOR_LIGHTBLUE, string);
                }
                BrunoInfo[id][pJailed] = 1;
                SetPlayerFree(id,playerid, "Foi Preso");
                WantedPoints[id] = 0;
                SetPlayerWantedLevel(id, 0);
                WantAdvogado[id] = 1;
                BrunoInfo[id][pFita] = 0;
                TogglePlayerControllable(id, 1);
                PlayerCuffed[id] = 0;
                BrunoInfo[id][pDroga] = 0;
                return 1;
            }
            if(BrunoInfo[playerid][pMembro] == 3 || BrunoInfo[playerid][pLider] == 3)
            {
                if(WantedPoints[id] < 1) return SendClientMessage(playerid, COR_CINZA, "   O Jogador deve ter no minimo 1 nнvel de procura!");
                           
                format(string, sizeof(string), "* Vocк Prendeu %s !", pNome(id));
                SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                //GivePlayerMoney(id, -moneys);
                format(string, sizeof(string), "Preso por %s", pNome(playerid));
                GameTextForPlayer(id, string, 5000, 5);
                ResetPlayerWeapons(id);
                if(BrunoInfo[playerid][pMembro]==3||BrunoInfo[playerid][pLider]==3)
                {
                    format(string, sizeof(string), "<< Exйrcito %s prendeu o suspeito %s >>", pNome(playerid), pNome(id));
                    OOCNews(COR_VERMELHO, string);
                }
                SetPlayerInterior(id, 0);
                SetPlayerPos(id,-1293.2203,490.5885,11.1953);
                BrunoInfo[id][time] = time * 60;
                SetPlayerSkin(id, 42);
                SetPlayerChatBubble(id, "*", COR_VERMELHO, 1, 1);
                if(bail == 1)
                {
                    JailPrice[id] = bailprice ;
                    format(string, sizeof(string), "Vocк foi preso por %d Segundos.   Fianзa: R$%d", BrunoInfo[id][time], JailPrice[id]);
                    SendClientMessage(id, COLOR_LIGHTBLUE, string);
                }
                else
                {
                    JailPrice[id] = 0;
                    format(string, sizeof(string), "Vocк foi preso por %d Segundos.   Fianзa: Desativada", BrunoInfo[id][time]);
                    SendClientMessage(id, COLOR_LIGHTBLUE, string);
                }
                BrunoInfo[id][pJailed] = 7;
                SetPlayerFree(id,playerid, "Foi Preso");
                WantedPoints[id] = 0;
                SetPlayerWantedLevel(id, 0);
                WantAdvogado[id] = 1;
                TogglePlayerControllable(id, 1);
                BrunoInfo[id][pFita] = 0;
                PlayerCuffed[id] = 0;
                BrunoInfo[id][pDroga] = 0;
                return 1;
            }
        }
    }    
    else return SendClientMessage(playerid, COR_CINZA, "   Vocк nгo й um Oficial !");
    return 1;
}
espero n ter errado
Reply


Messages In This Thread
Comando - by Wellington1999 - 27.08.2013, 01:53
Re: Comando - by smiiir - 27.08.2013, 02:04
Re: Comando - by PT - 27.08.2013, 02:27

Forum Jump:


Users browsing this thread: 2 Guest(s)