Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(strcmp(cmd, "/prender1", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(IsACop(playerid))
- {
- if(OnDuty[playerid] != 1)
- {
- SendClientMessage(playerid, COLOR_GREY, "Você não bateu o cartão!");
- return 1;
- }
- if(!PlayerToPoint(12.0, playerid, 268.3327,77.8972,1001.03910) && !PlayerToPoint(12.0, playerid, 1545.4073,-1607.9791,13.3828)
- && !PlayerToPoint(12.0, playerid, 341.4560,-1499.6265,36.0390) && !PlayerToPoint(12.0, playerid, 920.5212,-1184.8267,16.9766)
- && !PlayerToPoint(12.0, playerid, 221.1459,115.3492,999.01560) && !PlayerToPoint(12.0, playerid, 193.9101,179.2799,1003.0234)
- && !PlayerToPoint(12.0, playerid, 1545.7220,-1609.4769,13.3828) && !PlayerToPoint(12.0, playerid, -1761.9185,-161.1813,3.5547)
- && !PlayerToPoint(12.0, playerid, 1019.6051,-317.6436,73.9922) && !PlayerToPoint(12.0, playerid, 195.5733,158.4008,1003.0234)
- && !PlayerToPoint(12.0, playerid, -84.3000,-2255.3999,11.1000) && !PlayerToPoint(12.0, playerid, -1298.8188,490.5014,11.1953)
- && !PlayerToPoint(12.0, playerid, 264.1557,77.5797,1001.03910) && !PlayerToPoint(12.0, playerid, 1361,175.1075,1003.0234)
- && !PlayerToPoint(12.0, playerid, 1504.2811,-680.8134,94.7500) && !PlayerToPoint(12.0, playerid, 1368.4421,-1666.0829,13.4968)
- && !PlayerToPoint(12.0, playerid, -2441.0391,527.3107,29.9149)&& !PlayerToPoint(12.0, playerid, 944.2126,-1695.3010,14.3798))
- {
- SendClientMessage(playerid, COLOR_GREY, "Você não está no local de prisao de procurados, não pode prender o suspeito!");
- return 1;
- }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USE: /prender [ID]");
- return 1;
- }
- new suspect = giveplayerid;
- if(IsPlayerConnected(suspect))
- {
- if(GetDistanceBetweenPlayers(playerid,suspect) < 15)
- {
- if(IsACop(playerid))
- {
- GetPlayerName(suspect, giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- if(WantedPoints[suspect] < 1)
- {
- SendClientMessage(playerid, COLOR_GREY, "O Jogador deve ter no mínimo 1 nível de procurado!");
- return 1;
- }
- format(string, sizeof(string), "* Você Prendeu %s !", giveplayer);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- PlayerInfo[suspect][pJailTime] += 60;
- format(string, sizeof(string), "Preso por %s", sendername);
- GameTextForPlayer(suspect, string, 5000, 5);
- VozDePrisao[suspect] = 0;
- ResetPlayerWeapons(suspect);
- if(IsACop(playerid))
- {
- format(string, sizeof(string), "Polícial %s prendeu o suspeito %s", sendername, giveplayer);
- OOCNews(COLOR_LIGHTRED, string);
- }
- TogglePlayerControllable(suspect, 0);
- SetPlayerVirtualWorld(suspect,0);
- SetPlayerInterior(suspect, 2);
- GameTextForPlayer(suspect, "~r~Carregando Objetos Penitenciaria...", 5000, 1);
- SetTimerEx("ObjetosLoadPro", 5000, 0, "i", suspect);
- PlayerInfo[suspect][pJailed] = 3;
- SetPlayerPos(suspect,1799.8832, -1607.2261, 1814.7620);
- SetPlayerWantedLevel(suspect, 0);
- PlayerInfo[suspect][pJailTime] += 60;
- PlayerInfo[suspect][pJailTime] += (WantedLevel[suspect])*(60);
- PlayerInfo[suspect][pMuted] = 0;
- VozDePrisao[suspect] = 0;
- PlayerCuffed[suspect] = 0;
- WantedPoints[suspect] = 0;
- PlayerInfo[suspect][pDrogas] = 0;
- PlayerInfo[suspect][pDrogas2] = 0;
- PlayerInfo[suspect][pDrogas3] = 0;
- PlayerInfo[suspect][pMats] = 0;
- return 1;
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Esse não é um jogador ativo.");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Você não é um Oficial !");
- return 1;
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment