AloneZ

Untitled

Aug 14th, 2015
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 11.96 KB | None | 0 0
  1. if(strcmp(cmd, "/prender111", true) == 0)
  2.     {
  3.         if(IsPlayerConnected(playerid))
  4.         {
  5.             if(IsACop(playerid))
  6.             {
  7.                 if(!PlayerToPoint(12.0, playerid, 268.3327,77.8972,1001.03910) && !PlayerToPoint(12.0, playerid, 1545.4073,-1607.9791,13.3828)
  8.                 && !PlayerToPoint(12.0, playerid, 341.4560,-1499.6265,36.0390) && !PlayerToPoint(12.0, playerid, 920.5212,-1184.8267,16.9766)
  9.                 && !PlayerToPoint(12.0, playerid, 221.1459,115.3492,999.01560) && !PlayerToPoint(12.0, playerid, 193.9101,179.2799,1003.0234)
  10.                 && !PlayerToPoint(12.0, playerid, 1545.7220,-1609.4769,13.3828) && !PlayerToPoint(12.0, playerid, -1761.9185,-161.1813,3.5547)
  11.                 && !PlayerToPoint(12.0, playerid, 1019.6051,-317.6436,73.9922) && !PlayerToPoint(12.0, playerid, 195.5733,158.4008,1003.0234)
  12.                 && !PlayerToPoint(12.0, playerid, -84.3000,-2255.3999,11.1000) && !PlayerToPoint(12.0, playerid, -1298.8188,490.5014,11.1953)
  13.                 && !PlayerToPoint(12.0, playerid, 264.1557,77.5797,1001.03910) && !PlayerToPoint(12.0, playerid, 1361,175.1075,1003.0234)
  14.                 && !PlayerToPoint(12.0, playerid, 1504.2811,-680.8134,94.7500) && !PlayerToPoint(12.0, playerid, 1368.4421,-1666.0829,13.4968)
  15.                 && !PlayerToPoint(12.0, playerid, -2441.0391,527.3107,29.9149)&& !PlayerToPoint(12.0, playerid, 944.2126,-1695.3010,14.3798))
  16.                 {
  17.                     SendClientMessage(playerid, COLOR_GREY, "Você não está perto da cela, não pode prender o suspeito !");
  18.                     return 1;
  19.                 }
  20.                 tmp = strtok(cmdtext, idx);
  21.                 if(!strlen(tmp))
  22.                 {
  23.                      SendClientMessage(playerid, COLOR_GRAD2, "USE: /prender [id] [tempo]");
  24.                      return 1;
  25.                 }
  26.                 new suspect;
  27.                 new time;
  28.                 suspect = ReturnUser(tmp);
  29.                 tmp = strtok(cmdtext, idx);
  30.                 if(!strlen(tmp))
  31.                 {
  32.                      SendClientMessage(playerid, COLOR_GRAD2, "USE: /prender [id] [tempo]");
  33.                      return 1;
  34.                 }
  35.                 time = strval(tmp);
  36.                 if(time < 3 || time > 80)
  37.                 {
  38.                     SendClientMessage(playerid, COLOR_GREY, "O Tempo não pode ser menor que 3 e nem maior que 80 minutos !");
  39.                     return 1;
  40.                 }
  41.                 GetPlayerName(suspect, giveplayer, sizeof(giveplayer));
  42.                 GetPlayerName(playerid, sendername, sizeof(sendername));
  43.                 if(IsPlayerConnected(suspect))
  44.                 {
  45.                     if(GetDistanceBetweenPlayers(playerid,suspect) < 15)
  46.                     {
  47.                          if(IsACop(playerid))
  48.                          {
  49.                             GetPlayerName(suspect, giveplayer, sizeof(giveplayer));
  50.                             GetPlayerName(playerid, sendername, sizeof(sendername));
  51.                             if(WantedPoints[suspect] < 1)
  52.                             {
  53.                                  SendClientMessage(playerid, COLOR_GREY, "O Jogador deve ter no mínimo 1 nível de procurado!");
  54.                                  return 1;
  55.                             }
  56.                             else if(WantedPoints[suspect] == 1)
  57.                             {
  58.                                  if(time != 3)
  59.                                  {
  60.                                       SendClientMessage(playerid, COLOR_GRAD1, "Este jogador está com nivel [1] de procura, tempo de prisão 3 min(180 segundos) !");
  61.                                       return 1;
  62.                                  }
  63.                             }
  64.                             else if(WantedPoints[suspect] == 2)
  65.                             {
  66.                                  if(time != 6)
  67.                                  {
  68.                                       SendClientMessage(playerid, COLOR_GRAD1, "Este jogador está com nivel [2] de procura, tempo de prisão 6 min(360 segundos) !");
  69.                                       return 1;
  70.                                  }
  71.                             }
  72.                             else if(WantedPoints[suspect] == 3)
  73.                             {
  74.                                  if(time != 9)
  75.                                  {
  76.                                       SendClientMessage(playerid, COLOR_GRAD1, "Este jogador está com nivel [3] de procura, tempo de prisão 9 min(540 segundos) !");
  77.                                       return 1;
  78.                                  }
  79.                             }
  80.                             else if(WantedPoints[suspect] == 4)
  81.                             {
  82.                                  if(time != 12)
  83.                                  {
  84.                                       SendClientMessage(playerid, COLOR_GRAD1, "Este jogador está com nivel [4] de procura, tempo de prisão 12 min(720 segundos) !");
  85.                                       return 1;
  86.                                  }
  87.                             }
  88.                             else if(WantedPoints[suspect] == 5)
  89.                             {
  90.                                  if(time != 15)
  91.                                  {
  92.                                       SendClientMessage(playerid, COLOR_GRAD1, "Este jogador está com nivel [5] de procura, tempo de prisão 15 min(900 segundos) !");
  93.                                       return 1;
  94.                                  }
  95.                             }
  96.                             else if(WantedPoints[suspect] == 6)
  97.                             {
  98.                                  if(time != 18)
  99.                                  {
  100.                                       SendClientMessage(playerid, COLOR_GRAD1, "Este jogador está com nivel [6] de procura, tempo de prisão 18 min(1080 segundos) !");
  101.                                       return 1;
  102.                                  }
  103.                             }
  104.                             else if(WantedPoints[suspect] == 7)
  105.                             {
  106.                                  if(time != 21)
  107.                                  {
  108.                                       SendClientMessage(playerid, COLOR_GRAD1, "Este jogador está com nivel [7] de procura, tempo de prisão 21 min(1260 segundos) !");
  109.                                       return 1;
  110.                                  }
  111.                             }
  112.                             else if(WantedPoints[suspect] == 8)
  113.                             {
  114.                                  if(time != 24)
  115.                                  {
  116.                                       SendClientMessage(playerid, COLOR_GRAD1, "Este jogador está com nivel [8] de procura, tempo de prisão 24 min(1440 segundos) !");
  117.                                       return 1;
  118.                                  }
  119.                             }
  120.                             else if(WantedPoints[suspect] == 9)
  121.                             {
  122.                                  if(time != 27)
  123.                                  {
  124.                                       SendClientMessage(playerid, COLOR_GRAD1, "Este jogador está com nivel [9] de procura, tempo de prisão 27 min(1620 segundos) !");
  125.                                       return 1;
  126.                                  }
  127.                             }
  128.                             else if(WantedPoints[suspect] == 10)
  129.                             {
  130.                                  if(time != 30)
  131.                                  {
  132.                                       SendClientMessage(playerid, COLOR_GRAD1, "Este jogador está com nivel [10] de procura, tempo de prisão 30 min(1800 segundos) !");
  133.                                       return 1;
  134.                                  }
  135.                             }
  136.                             else if(WantedPoints[suspect] == 11)
  137.                             {
  138.                                  if(time != 33)
  139.                                  {
  140.                                       SendClientMessage(playerid, COLOR_GRAD1, "Este jogador está com nivel [11] de procura, tempo de prisão 33 min(1980 segundos) !");
  141.                                       return 1;
  142.                                  }
  143.                             }
  144.                             else if(WantedPoints[suspect] == 12)
  145.                             {
  146.                                  if(time != 36)
  147.                                  {
  148.                                       SendClientMessage(playerid, COLOR_GRAD1, "Este jogador está com nivel [12] de procura, tempo de prisão 36 min(2160 segundos) !");
  149.                                       return 1;
  150.                                  }
  151.                             }
  152.                             else if(WantedPoints[suspect] == 13)
  153.                             {
  154.                                  if(time != 39)
  155.                                  {
  156.                                       SendClientMessage(playerid, COLOR_GRAD1, "Este jogador está com nivel [13] de procura, tempo de prisão 39 min(2340 segundos) !");
  157.                                       return 1;
  158.                                  }
  159.                             }
  160.                             else if(WantedPoints[suspect] == 14)
  161.                             {
  162.                                  if(time != 42)
  163.                                  {
  164.                                       SendClientMessage(playerid, COLOR_GRAD1, "Este jogador está com nivel [14] de procura, tempo de prisão 42 min(2520 segundos) !");
  165.                                       return 1;
  166.                                  }
  167.                             }
  168.                             else if(WantedPoints[suspect] == 15)
  169.                             {
  170.                                  if(time != 45)
  171.                                  {
  172.                                       SendClientMessage(playerid, COLOR_GRAD1, "Este jogador está com nivel [15] de procura, tempo de prisão 45 min(2700 segundos) !");
  173.                                       return 1;
  174.                                  }
  175.                             }
  176.                             else if(WantedPoints[suspect] == 16)
  177.                             {
  178.                                  if(time != 48)
  179.                                  {
  180.                                       SendClientMessage(playerid, COLOR_GRAD1, "Este jogador está com nivel [16] de procura, tempo de prisão 48 min(2880 segundos) !");
  181.                                       return 1;
  182.                                  }
  183.                             }
  184.                             else if(WantedPoints[suspect] == 17)
  185.                             {
  186.                                  if(time != 51)
  187.                                  {
  188.                                       SendClientMessage(playerid, COLOR_GRAD1, "Este jogador está com nivel [17] de procura, tempo de prisão 51 min(3060 segundos) !");
  189.                                       return 1;
  190.                                  }
  191.                             }
  192.                             else if(WantedPoints[suspect] == 18)
  193.                             {
  194.                                  if(time != 54)
  195.                                  {
  196.                                       SendClientMessage(playerid, COLOR_GRAD1, "Este jogador está com nivel [18] de procura, tempo de prisão 54 min(3240 segundos) !");
  197.                                       return 1;
  198.                                  }
  199.                             }
  200.                             else if(WantedPoints[suspect] == 19)
  201.                             {
  202.                                  if(time != 57)
  203.                                  {
  204.                                       SendClientMessage(playerid, COLOR_GRAD1, "Este jogador está com nivel [19] de procura, tempo de prisão 57 min(3420 segundos) !");
  205.                                       return 1;
  206.                                  }
  207.                             }
  208.                             else if(WantedPoints[suspect] == 20)
  209.                             {
  210.                                  if(time != 60)
  211.                                  {
  212.                                       SendClientMessage(playerid, COLOR_GRAD1, "Este jogador está com nivel [20] de procura, tempo de prisão 60 min(3600 segundos) !");
  213.                                       return 1;
  214.                                  }
  215.                             }
  216.                             else if(WantedPoints[suspect] >= 21)
  217.                             {
  218.                                  if(time != 63)
  219.                                  {
  220.                                       SendClientMessage(playerid, COLOR_GRAD1, "Este jogador está com nivel [20+] de procura, tempo de prisão 63 min(3780 segundos) !");
  221.                                       return 1;
  222.                                  }
  223.                             }
  224.                             format(string, sizeof(string), "* Você prendeu o suspeito %s !", giveplayer);
  225.                             SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  226.                             format(string, sizeof(string), "~n~~w~Preso por %s", sendername);
  227.                             GameTextForPlayer(suspect, string, 2500, 5);
  228.                             VozDePrisao[suspect] = 0;
  229.                             ResetPlayerWeapons(suspect);
  230.                             if(IsACop(playerid))
  231.                             {
  232.                                 new price = WantedPoints[suspect] * 100;
  233.                                 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);
  234.                                 GivePlayerMoneyEx(playerid, price / 1);
  235.                                 OOCNews(COLOR_LIGHTRED, string);
  236.                             }
  237.                             PlayerInfo[suspect][pPreso] ++;
  238.                             SetPlayerSkin(suspect, 268);
  239.                             if(PlayerInfo[suspect][pSex] == 2)
  240.                             {  
  241.                                 SetPlayerSkin(suspect, 69);
  242.                             }
  243.                             if(PlayerInfo[suspect][pSocio] >= 1)
  244.                             {  
  245.                                 SetPlayerSkin(suspect, 42);
  246.                             }
  247.                             SetPlayerInterior(suspect, 2);
  248.                             new rand;
  249.                             rand = random(sizeof(gPresoFTSpawns));
  250.                             SetPlayerPos(suspect, gPresoFTSpawns[rand][0], gPresoFTSpawns[rand][1], gPresoFTSpawns[rand][2]); // Warp the player
  251.                             SetPlayerFacingAngle(suspect, gPresoFTSpawns[rand][3]);
  252.                             PlayerInfo[suspect][pJailTime] = time * 60;
  253.                             PlayerCuffed[suspect] = 0;
  254.                             PlayerInfo[suspect][pMuted] = 0;
  255.                             RemovePlayerAttachedObject(suspect, 4);
  256.                             SetPlayerSpecialAction(suspect, SPECIAL_ACTION_NONE);
  257.                             SetPlayerChatBubble(suspect, "*", COLOR_RED, 1, 1);
  258.                             format(string, sizeof(string), "Você foi preso por %d segundos. Precisa de um advogado? /servico advogado", PlayerInfo[suspect][pJailTime]);
  259.                             SendClientMessage(suspect, COLOR_LIGHTBLUE, string);
  260.                             PlayerInfo[suspect][pJailed] = 1;
  261.                             WantedPoints[suspect] = 0;
  262.                             SetPlayerWantedLevel(suspect, 0);
  263.                             PlayerInfo[suspect][pMuted] = 0;
  264.                             TogglePlayerControllable(suspect, 1);
  265.                             PlayerCuffed[suspect] = 0;
  266.                             PlayerInfo[suspect][pMaconha] = 0;
  267.                             PlayerInfo[suspect][pCocaina] = 0;
  268.                             PlayerInfo[suspect][pCrack] = 0;
  269.                             PlayerInfo[suspect][pMats] = 0;
  270.                             PlayerInfo[suspect][pDina] = 0;
  271.                             return 1;
  272.                         }
  273.                     }
  274.                 }
  275.                 else
  276.                 {
  277.                     SendClientMessage(playerid, COLOR_GREY, "Esse não é um jogador ativo !");
  278.                     return 1;
  279.                 }
  280.             }
  281.             else
  282.             {
  283.                 SendClientMessage(playerid, COLOR_GREY, "Você não é um Oficial !");
  284.                 return 1;
  285.             }
  286.         }//not connected
  287.         return 1;
  288.     }
Advertisement
Add Comment
Please, Sign In to add comment