Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(strcmp(cmd, "/prender111", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(IsACop(playerid))
- {
- 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á perto da cela, não pode prender o suspeito !");
- return 1;
- }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USE: /prender [id] [tempo]");
- return 1;
- }
- new suspect;
- new time;
- suspect = ReturnUser(tmp);
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USE: /prender [id] [tempo]");
- return 1;
- }
- time = strval(tmp);
- if(time < 3 || time > 80)
- {
- SendClientMessage(playerid, COLOR_GREY, "O Tempo não pode ser menor que 3 e nem maior que 80 minutos !");
- return 1;
- }
- GetPlayerName(suspect, giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- 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;
- }
- else if(WantedPoints[suspect] == 1)
- {
- if(time != 3)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Este jogador está com nivel [1] de procura, tempo de prisão 3 min(180 segundos) !");
- return 1;
- }
- }
- else if(WantedPoints[suspect] == 2)
- {
- if(time != 6)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Este jogador está com nivel [2] de procura, tempo de prisão 6 min(360 segundos) !");
- return 1;
- }
- }
- else if(WantedPoints[suspect] == 3)
- {
- if(time != 9)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Este jogador está com nivel [3] de procura, tempo de prisão 9 min(540 segundos) !");
- return 1;
- }
- }
- else if(WantedPoints[suspect] == 4)
- {
- if(time != 12)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Este jogador está com nivel [4] de procura, tempo de prisão 12 min(720 segundos) !");
- return 1;
- }
- }
- else if(WantedPoints[suspect] == 5)
- {
- if(time != 15)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Este jogador está com nivel [5] de procura, tempo de prisão 15 min(900 segundos) !");
- return 1;
- }
- }
- else if(WantedPoints[suspect] == 6)
- {
- if(time != 18)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Este jogador está com nivel [6] de procura, tempo de prisão 18 min(1080 segundos) !");
- return 1;
- }
- }
- else if(WantedPoints[suspect] == 7)
- {
- if(time != 21)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Este jogador está com nivel [7] de procura, tempo de prisão 21 min(1260 segundos) !");
- return 1;
- }
- }
- else if(WantedPoints[suspect] == 8)
- {
- if(time != 24)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Este jogador está com nivel [8] de procura, tempo de prisão 24 min(1440 segundos) !");
- return 1;
- }
- }
- else if(WantedPoints[suspect] == 9)
- {
- if(time != 27)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Este jogador está com nivel [9] de procura, tempo de prisão 27 min(1620 segundos) !");
- return 1;
- }
- }
- else if(WantedPoints[suspect] == 10)
- {
- if(time != 30)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Este jogador está com nivel [10] de procura, tempo de prisão 30 min(1800 segundos) !");
- return 1;
- }
- }
- else if(WantedPoints[suspect] == 11)
- {
- if(time != 33)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Este jogador está com nivel [11] de procura, tempo de prisão 33 min(1980 segundos) !");
- return 1;
- }
- }
- else if(WantedPoints[suspect] == 12)
- {
- if(time != 36)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Este jogador está com nivel [12] de procura, tempo de prisão 36 min(2160 segundos) !");
- return 1;
- }
- }
- else if(WantedPoints[suspect] == 13)
- {
- if(time != 39)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Este jogador está com nivel [13] de procura, tempo de prisão 39 min(2340 segundos) !");
- return 1;
- }
- }
- else if(WantedPoints[suspect] == 14)
- {
- if(time != 42)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Este jogador está com nivel [14] de procura, tempo de prisão 42 min(2520 segundos) !");
- return 1;
- }
- }
- else if(WantedPoints[suspect] == 15)
- {
- if(time != 45)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Este jogador está com nivel [15] de procura, tempo de prisão 45 min(2700 segundos) !");
- return 1;
- }
- }
- else if(WantedPoints[suspect] == 16)
- {
- if(time != 48)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Este jogador está com nivel [16] de procura, tempo de prisão 48 min(2880 segundos) !");
- return 1;
- }
- }
- else if(WantedPoints[suspect] == 17)
- {
- if(time != 51)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Este jogador está com nivel [17] de procura, tempo de prisão 51 min(3060 segundos) !");
- return 1;
- }
- }
- else if(WantedPoints[suspect] == 18)
- {
- if(time != 54)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Este jogador está com nivel [18] de procura, tempo de prisão 54 min(3240 segundos) !");
- return 1;
- }
- }
- else if(WantedPoints[suspect] == 19)
- {
- if(time != 57)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Este jogador está com nivel [19] de procura, tempo de prisão 57 min(3420 segundos) !");
- return 1;
- }
- }
- else if(WantedPoints[suspect] == 20)
- {
- if(time != 60)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Este jogador está com nivel [20] de procura, tempo de prisão 60 min(3600 segundos) !");
- return 1;
- }
- }
- else if(WantedPoints[suspect] >= 21)
- {
- if(time != 63)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Este jogador está com nivel [20+] de procura, tempo de prisão 63 min(3780 segundos) !");
- return 1;
- }
- }
- format(string, sizeof(string), "* Você prendeu o suspeito %s !", giveplayer);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- format(string, sizeof(string), "~n~~w~Preso por %s", sendername);
- GameTextForPlayer(suspect, string, 2500, 5);
- VozDePrisao[suspect] = 0;
- ResetPlayerWeapons(suspect);
- if(IsACop(playerid))
- {
- new price = WantedPoints[suspect] * 100;
- format(string, sizeof(string), "[%s] %s prendeu o suspeito: %s, Crimes[%d] Tempo[%d] e ganhou R$[%d].",NomeORG(playerid),PlayerName(playerid),giveplayer,WantedPoints[suspect],PlayerInfo[suspect][pJailTime],price);
- GivePlayerMoneyEx(playerid, price / 1);
- OOCNews(COLOR_LIGHTRED, string);
- }
- PlayerInfo[suspect][pPreso] ++;
- SetPlayerSkin(suspect, 268);
- if(PlayerInfo[suspect][pSex] == 2)
- {
- SetPlayerSkin(suspect, 69);
- }
- if(PlayerInfo[suspect][pSocio] >= 1)
- {
- SetPlayerSkin(suspect, 42);
- }
- SetPlayerInterior(suspect, 2);
- new rand;
- rand = random(sizeof(gPresoFTSpawns));
- SetPlayerPos(suspect, gPresoFTSpawns[rand][0], gPresoFTSpawns[rand][1], gPresoFTSpawns[rand][2]); // Warp the player
- SetPlayerFacingAngle(suspect, gPresoFTSpawns[rand][3]);
- PlayerInfo[suspect][pJailTime] = time * 60;
- PlayerCuffed[suspect] = 0;
- PlayerInfo[suspect][pMuted] = 0;
- RemovePlayerAttachedObject(suspect, 4);
- SetPlayerSpecialAction(suspect, SPECIAL_ACTION_NONE);
- SetPlayerChatBubble(suspect, "*", COLOR_RED, 1, 1);
- format(string, sizeof(string), "Você foi preso por %d segundos. Precisa de um advogado? /servico advogado", PlayerInfo[suspect][pJailTime]);
- SendClientMessage(suspect, COLOR_LIGHTBLUE, string);
- PlayerInfo[suspect][pJailed] = 1;
- WantedPoints[suspect] = 0;
- SetPlayerWantedLevel(suspect, 0);
- PlayerInfo[suspect][pMuted] = 0;
- TogglePlayerControllable(suspect, 1);
- PlayerCuffed[suspect] = 0;
- PlayerInfo[suspect][pMaconha] = 0;
- PlayerInfo[suspect][pCocaina] = 0;
- PlayerInfo[suspect][pCrack] = 0;
- PlayerInfo[suspect][pMats] = 0;
- PlayerInfo[suspect][pDina] = 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;
- }
- }//not connected
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment