SHARE
TWEET

Presidio Zcmd

a guest Nov 19th, 2012 188 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.  
  3.  
  4.  
  5. -[ FORUM SAMP ]-
  6.  
  7.  
  8. ============================================
  9. =                                          =
  10. =                                          =
  11. =Sistema de Presidio    =
  12. =                                          =
  13. =                                          =
  14. =    By:  JapaN_.   =
  15. =                                          =
  16. =   Não Remova os Créditos          =
  17. =                                          =
  18. =                                          =
  19. ============================================
  20.  
  21.  
  22.  
  23. */
  24.  
  25. //====Includes=====//
  26. #include    <a_samp>
  27. #include    <Zcmd>
  28.  
  29. //====News=====//
  30. new explodiracela[MAX_PLAYERS];
  31. new invadirporta[MAX_PLAYERS];
  32. new PortaoP;
  33. new cela;
  34. new SalaMaquinas;
  35. new pcela;
  36. new presidioum;
  37. new presidiodois;
  38. new dinamiteP1;
  39. new dinamiteP2;
  40. new dinamiteP3;
  41. new dinamiteP4;
  42. new dinamiteC1;
  43. new dinamiteC2;
  44. new dinamiteC3;
  45. new dinamiteC4;
  46. new dinamiteSM1;
  47. new dinamiteSM2;
  48. new dinamiteSM3;
  49. new dinamiteSM4;
  50.  
  51. //====Forwards=====//
  52. forward InvadirPortao(playerid);
  53. forward UsarPorta(playerid);
  54. forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
  55. forward PortaoReformado();
  56. forward explodircela(playerid);
  57. forward explodirSalaMaquinas(playerid);
  58. forward UsarCela(playerid);
  59. forward reformarcela();
  60. forward reformarSalaMaquinas();
  61. forward FecharCela(playerid);
  62. forward FecharPresidioum(playerid);
  63. forward FecharPresidiodois(playerid);
  64.  
  65. //====Defines=====//
  66. #define ForPlayers(%1) for(new %1 = 0; %1 < MAX_PLAYERS; %1++) if(IsPlayerConnected(%1) && !IsPlayerNPC(%1))
  67. #define COLOR_JAPAN 0x99CC00FF
  68.  
  69. //====Publics=====//
  70. public OnFilterScriptInit()
  71. {
  72.         print("\n(*********************************************)");
  73.         print(" Sistema de Presidio By: JapaN ");
  74.         print("            Não retire os créditos !!            ");
  75.         print("(*********************************************)\n");
  76.  
  77.         //====3DTextLabel====//
  78.         Create3DTextLabel("Para Explodir o Portão 1\nUse: {7EBD00}/invadirp",-1,2565.1624,-1301.8860,1031.4219,7.0,0);
  79.         Create3DTextLabel("Para Explodir o Portão da Cela\nUse: {7EBD00}/explodirportoes",-1,2526.9978,-1299.5741,1031.4219,7.0,0);
  80.         Create3DTextLabel("Para Explodir o Portão da Sala das Maquinas\nUse: {7EBD00}/explodirportoes",-1,2569.4700,-1300.7065,1037.7734,7.0,0);
  81.         Create3DTextLabel("Entrada Presidio\nAperte {7EBD00}'F'",-1,153.5901,1844.6500,17.6406,7.0,0);
  82.         Create3DTextLabel("Saida Presidio\nAperte {7EBD00}'F'",-1,2575.0811,-1287.0262,1037.7734,7.0,0);
  83.         //====Portoes====//
  84.         SalaMaquinas = CreateObject(2963,2569.39990234,-1300.00000000,1038.80004883,0.00000000,0.00000000,92.00000000); //object(freezer_door) (2)
  85.         PortaoP = CreateObject(2634,2565.69995117,-1302.90002441,1031.59997559,0.00000000,0.00000000,90.00000000); //object(ab_vaultdoor) (2)
  86.         pcela = CreateObject(2930,2527.89990234,-1300.00000000,1033.09997559,0.00000000,0.00000000,270.00000000); //object(chinatgate) (1)
  87.         presidioum = CreateObject(985,2529.10009766,-1294.00000000,1029.40002441,0.00000000,0.00000000,90.00000000); //object(gate_autor) (1)
  88.         presidiodois = CreateObject(968,2533.30004883,-1290.50000000,1031.90002441,0.00000000,90.00000000,270.00000000); //object(barrierturn) (2)
  89.         //====Pickups===//
  90.         CreatePickup(1318, 23, 153.5901,1844.6500,17.6406, -1);// Entrar Presidio
  91.         CreatePickup(1318, 23, 2575.0811,-1287.0262,1037.7734, -1);// Sair Presidio
  92.         //====Objetos====//
  93.         CreateObject(8957,2527.50000000,-1316.19995117,1032.09997559,0.00000000,0.00000000,270.00000000); //object(vgsespdr01) (1)
  94.         CreateObject(1491,2525.19995117,-1291.69995117,1030.40002441,0.00000000,0.00000000,0.00000000); //object(gen_doorint01) (2)
  95.         CreateObject(2004,2525.19995117,-1287.90002441,1032.30004883,0.00000000,0.00000000,0.00000000); //object(cr_safe_door) (1)
  96.         CreateObject(2634,2565.69995117,-1301.00000000,1031.59997559,0.00000000,0.00000000,90.00000000); //object(ab_vaultdoor) (3)
  97.         CreateObject(2609,2529.00000000,-1288.09997559,1031.19995117,0.00000000,0.00000000,270.00000000); //object(cj_p_fileing1) (1)
  98.         CreateObject(8957,2577.80004883,-1305.00000000,1039.40002441,0.00000000,0.00000000,178.00000000); //object(vgsespdr01) (2)
  99.         CreateObject(2930,2528.89990234,-1291.69995117,1033.09997559,0.00000000,0.00000000,270.00000000); //object(chinatgate) (4)
  100.         CreateObject(1557,2523.00000000,-1299.40002441,1030.40002441,0.00000000,0.00000000,89.99951172); //object(gen_doorext19) (2)
  101.         CreateObject(1557,2523.00000000,-1296.50000000,1030.40002441,0.00000000,0.00000000,269.99450684); //object(gen_doorext19) (3)
  102.         CreateObject(2609,2529.00000000,-1288.59997559,1031.19995117,0.00000000,0.00000000,270.00000000); //object(cj_p_fileing1) (3)
  103.         CreateObject(1598,2540.50000000,-1292.50000000,1030.69995117,0.00000000,0.00000000,0.00000000); //object(beachball) (1)
  104.         CreateObject(8957,2561.69995117,-1279.19995117,1031.59997559,0.00000000,0.00000000,269.99499512); //object(vgsespdr01) (3)
  105.         CreateObject(2567,2568.69995117,-1281.00000000,1038.69995117,0.00000000,0.00000000,0.00000000); //object(ab_warehouseshelf) (1)
  106.         CreateObject(3761,2572.19995117,-1283.00000000,1038.80004883,0.00000000,0.00000000,0.00000000); //object(industshelves) (1)
  107.         CreateObject(4642,2531.19995117,-1291.50000000,1032.09997559,0.00000000,0.00000000,0.00000000); //object(paypark_lan) (1)
  108.         CreateObject(4642,2531.19995117,-1296.40002441,1032.09997559,0.00000000,0.00000000,182.00000000); //object(paypark_lan) (2)
  109.         CreateObject(7232,2543.30004883,-1308.40002441,1033.59997559,0.00000000,0.00000000,0.00000000); //object(clwnpocksgn) (1)
  110.         CreateObject(968,2533.30004883,-1290.59997559,1033.59997559,0.00000000,90.00000000,270.00000000); //object(barrierturn) (1)
  111.         CreateObject(946,2547.50000000,-1299.19995117,1032.59997559,0.00000000,0.00000000,0.00000000); //object(bskball_lax) (1)
  112.         CreateObject(946,2547.50000000,-1288.69995117,1032.59997559,0.00000000,0.00000000,180.00000000); //object(bskball_lax) (2)
  113.         CreateObject(2114,2547.50000000,-1293.69995117,1030.59997559,0.00000000,0.00000000,0.00000000); //object(basketball) (1)
  114.         CreateObject(1892,2524.69995117,-1298.50000000,1030.40002441,0.00000000,0.00000000,270.00000000); //object(security_gatsh) (1)
  115.         CreateObject(1892,2524.69995117,-1296.40002441,1030.40002441,0.00000000,0.00000000,270.00000000); //object(security_gatsh) (2)
  116.         CreateObject(16780,2526.80004883,-1294.30004883,1036.40002441,0.00000000,0.00000000,0.00000000); //object(ufo_light03) (1)
  117.         CreateObject(2606,2527.50000000,-1287.90002441,1032.69995117,0.00000000,0.00000000,0.00000000); //object(cj_police_counter2) (1)
  118.         CreateObject(3089,2574.39990234,-1287.40002441,1038.09997559,0.00000000,0.00000000,0.00000000); //object(ab_casdorlok) (1)
  119.         CreateObject(2964,2560.80004883,-1286.80004883,1030.40002441,0.00000000,0.00000000,0.00000000); //object(k_pooltablesm) (1)
  120.         CreateObject(2614,2565.30004883,-1301.90002441,1034.19995117,0.00000000,0.00000000,270.00000000); //object(cj_us_flag) (1)
  121.         CreateObject(11245,2563.00000000,-1287.80004883,1037.59997559,0.00000000,0.00000000,178.00000000); //object(sfsefirehseflag) (1)
  122.         CreateObject(11245,2563.30004883,-1292.00000000,1037.59997559,0.00000000,0.00000000,180.00000000); //object(sfsefirehseflag) (2)
  123.         CreateObject(11245,2563.00000000,-1295.90002441,1037.69995117,0.00000000,0.00000000,180.00000000); //object(sfsefirehseflag) (3)
  124.         CreateObject(1886,2525.19995117,-1300.59997559,1036.40002441,0.00000000,0.00000000,40.00000000); //object(shop_sec_cam) (2)
  125.         CreateObject(1771,2528.10009766,-1314.00000000,1031.09997559,0.00000000,0.00000000,358.00000000); //object(cj_bunk_bed1) (1)
  126.         CreateObject(1771,2526.00000000,-1314.00000000,1031.09997559,0.00000000,0.00000000,358.00000000); //object(cj_bunk_bed1) (2)
  127.         CreateObject(1808,2523.30004883,-1308.69995117,1030.40002441,0.00000000,0.00000000,90.00000000); //object(cj_watercooler2) (1)
  128.         CreateObject(2514,2523.50000000,-1311.00000000,1030.40002441,0.00000000,0.00000000,90.00000000); //object(cj_toilet1) (3)
  129.         CreateObject(2514,2523.50000000,-1311.59997559,1030.40002441,0.00000000,0.00000000,90.00000000); //object(cj_toilet1) (4)
  130.         CreateObject(2515,2523.50000000,-1309.80004883,1031.69995117,0.00000000,0.00000000,90.00000000); //object(cj_bs_sink) (1)
  131.         CreateObject(2596,2525.19995117,-1308.09997559,1033.90002441,0.00000000,0.00000000,46.00000000); //object(cj_sex_tv) (1)
  132.         CreateObject(2820,2525.60009766,-1307.30004883,1030.40002441,0.00000000,0.00000000,0.00000000); //object(gb_kitchdirt01) (1)
  133.         CreateObject(2827,2525.89990234,-1314.19995117,1031.40002441,0.00000000,0.00000000,0.00000000); //object(gb_novels05) (1)
  134.         CreateObject(1432,2527.80004883,-1309.50000000,1030.40002441,0.00000000,0.00000000,0.00000000); //object(dyn_table_2) (1)
  135.         CreateObject(1715,2527.89990234,-1289.59997559,1030.40002441,0.00000000,0.00000000,0.00000000); //object(kb_swivelchair2) (1)
  136.         CreateObject(3092,2571.39990234,-1286.30004883,1037.69995117,0.00000000,0.00000000,144.00000000); //object(dead_tied_cop) (1)
  137.  
  138.         return 1;
  139. }
  140. public OnPlayerConnect(playerid)
  141. {
  142.         RemoveBuildingForPlayer(playerid, 1464, 2545.3281, -1300.6797, 1031.5781, 0.25);// Não Mexa (Objetos tirados do Interior do Big Smoke Palace)
  143.         RemoveBuildingForPlayer(playerid, 14442, 2547.4844, -1293.6484, 1030.5078, 0.25);// Não Mexa (Objetos tirados do Interior do Big Smoke Palace)
  144.         RemoveBuildingForPlayer(playerid, 944, 2567.3672, -1291.9063, 1030.7891, 0.25);// Não Mexa (Objetos tirados do Interior do Big Smoke Palace)
  145.         RemoveBuildingForPlayer(playerid, 925, 2572.1953, -1292.4297, 1031.4844, 0.25);// Não Mexa (Objetos tirados do Interior do Big Smoke Palace)
  146.         RemoveBuildingForPlayer(playerid, 1450, 2538.1172, -1287.5313, 1031.0156, 0.25);// Não Mexa (Objetos tirados do Interior do Big Smoke Palace)
  147.         RemoveBuildingForPlayer(playerid, 931, 2566.7891, -1286.9375, 1031.4766, 0.25);// Não Mexa (Objetos tirados do Interior do Big Smoke Palace)
  148.         RemoveBuildingForPlayer(playerid, 931, 2566.7891, -1284.5078, 1031.4766, 0.25);// Não Mexa (Objetos tirados do Interior do Big Smoke Palace)
  149.         RemoveBuildingForPlayer(playerid, 923, 2567.3906, -1281.5156, 1031.3125, 0.25);// Não Mexa (Objetos tirados do Interior do Big Smoke Palace)
  150.         RemoveBuildingForPlayer(playerid, 922, 2568.2734, -1280.5000, 1031.3125, 0.25);// Não Mexa (Objetos tirados do Interior do Big Smoke Palace)
  151.         RemoveBuildingForPlayer(playerid, 922, 2572.3203, -1281.5313, 1031.3125, 0.25);// Não Mexa (Objetos tirados do Interior do Big Smoke Palace)
  152.         RemoveBuildingForPlayer(playerid, 922, 2573.0313, -1280.5000, 1031.3125, 0.25);// Não Mexa (Objetos tirados do Interior do Big Smoke Palace)
  153.         RemoveBuildingForPlayer(playerid, 2063, 2576.2734, -1280.2422, 1037.6719, 0.25);// Não Mexa (Objetos tirados do Interior do Big Smoke Palace)
  154.         RemoveBuildingForPlayer(playerid, 931, 2576.7109, -1281.1797, 1031.4766, 0.25);// Não Mexa (Objetos tirados do Interior do Big Smoke Palace)
  155.         RemoveBuildingForPlayer(playerid, 2063, 2577.2813, -1286.1406, 1037.6719, 0.25);// Não Mexa (Objetos tirados do Interior do Big Smoke Palace)
  156.         RemoveBuildingForPlayer(playerid, 2063, 2577.2813, -1283.3516, 1037.6719, 0.25);// Não Mexa (Objetos tirados do Interior do Big Smoke Palace)
  157.         SendClientMessageToAll(COLOR_JAPAN, "[AVISO]Este Servidor esta usando uma FilterScripter Criada por: JapaN");
  158. }
  159. public OnPlayerKeyStateChange( playerid, newkeys, oldkeys )
  160. {
  161.         if(newkeys == KEY_SECONDARY_ATTACK)
  162.         {
  163.                 if (newkeys == KEY_SECONDARY_ATTACK)// Entrar em interiores apertando "F"
  164.                 {
  165.                         cmd_entrarp(playerid);// Entrar em interiores apertando "F"
  166.                 }
  167.                 if (newkeys == KEY_SECONDARY_ATTACK)// Entrar em interiores apertando "F"
  168.                 {
  169.                         cmd_sairp(playerid);// Entrar em interiores apertando "F"
  170.                 }
  171.                 return 1;
  172.         }
  173.         return true;
  174. }
  175.  
  176. //========[    Comandos    ]=========//
  177. CMD:invadirp(playerid, params[])
  178. {
  179.         new string[100];
  180.         if(invadirporta[playerid] == 1) return SendClientMessage(playerid, -1, "Você já invadiu o presidio, deve esperar 1 Minuto.");
  181.         if(!PlayerToPoint(15.0, playerid, 2565.1624,-1301.8860,1031.4219)) return SendClientMessage(playerid, -1, "Não está no local Certo pra Invadir o presidio !");
  182.         format(string, sizeof(string), "O{7EBD00} %s {f5f3f0}está tentando invadir o Portão 1 do Presidio",Nome(playerid));
  183.         SendClientMessageToAll(-1, string);
  184.         SendClientMessage(playerid, -1, "Aguarde 10 Segundos para invadir o Presidio.");
  185.         SetTimerEx("InvadirPortao", 10000, 0, "i", playerid);    // 10 Segundos !!!
  186.         SetTimer("UsarPorta", 60000, 0);    // 60 Segundos !!!
  187.         invadirporta[playerid] = 1;
  188.         dinamiteP1 = CreateObject(1654,2565.50000000,-1302.09997559,1030.69995117,0.00000000,0.00000000,270.00000000); //object(dynamite) (3)
  189.         dinamiteP2 = CreateObject(1654,2565.50000000,-1303.30004883,1030.69995117,0.00000000,0.00000000,270.00000000); //object(dynamite) (4)
  190.         dinamiteP3 = CreateObject(1654,2565.50000000,-1302.09997559,1032.69995117,0.00000000,0.00000000,270.00000000); //object(dynamite) (5)
  191.         dinamiteP4 = CreateObject(1654,2565.50000000,-1303.30004883,1032.69995117,0.00000000,0.00000000,270.00000000); //object(dynamite) (6)
  192.         return 1;
  193. }
  194. CMD:cela(playerid, params[])
  195. {
  196.         if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, -1, "Não está connectado pra usar esse comando !");
  197.         SetPlayerPos(playerid, 2526.6545,-1305.1188,1031.4219);
  198.         SetPlayerInterior(playerid, 2);
  199.         return 1;
  200. }
  201. CMD:creditos(playerid, params[])
  202. {
  203.         SendClientMessage(playerid, -1, "Creditos da FilterScript a: JapaN (Criador/Idealizador)");
  204.         SendClientMessage(playerid, -1, "É Creditos Totalmente a Voçê!");
  205.         return 1;
  206. }
  207. CMD:acela(playerid, params[])
  208. {
  209.         if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "Voçê Não é um Administrador!");
  210.         MoveObject(pcela,2529.3999023438,-1300.0000,1033.0999755859,3.0); //CORDENADAS DELE ABERTO
  211.         SendClientMessage(playerid,COLOR_JAPAN, "[Porteiro]Abrindo Porta da Cela");
  212.         DestroyObject(cela);
  213.         SetTimerEx("FecharCela", 5000, 0, "i", playerid);
  214.         return 1;
  215. }
  216. CMD:ap1(playerid, params[])
  217. {
  218.         if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "Voçê Não é um Administrador!");
  219.         MoveObject(presidioum,2529.1000976563,-1294.0000,1024.6999511719,3.0); //CORDENADAS DELE ABERTO
  220.         SendClientMessage(playerid,COLOR_JAPAN, "[Porteiro]Abrindo Portao 1 do Presidio");
  221.         SetTimerEx("FecharPresidioum", 5000, 0, "i", playerid);
  222.         return 1;
  223. }
  224. CMD:ap2(playerid, params[])
  225. {
  226.         if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "Voçê Não é um Administrador!");
  227.         MoveObject(presidiodois,2533.1999511719,-1285.5999755859,1031.9000244141,3.0); //CORDENADAS DELE ABERTO
  228.         SendClientMessage(playerid,COLOR_JAPAN, "[Porteiro]Abrindo Portao 2 do Presidio");
  229.         SetTimerEx("FecharPresidiodois", 5000, 0, "i", playerid);
  230.         return 1;
  231. }
  232. CMD:entrarp(playerid)
  233. {
  234.         if(PlayerToPoint(15.0, playerid, 153.5901,1844.6500,17.6406))
  235.         {
  236.                 SetPlayerInterior(playerid, 2);
  237.                 SetPlayerPos(playerid, 2575.0811,-1287.0262,1037.7734);
  238.         }
  239.         return 1;
  240. }
  241. CMD:sairp(playerid)
  242. {
  243.         if(PlayerToPoint(15.0, playerid, 2575.0811,-1287.0262,1037.7734))
  244.         {
  245.                 SetPlayerInterior(playerid, 0);
  246.                 SetPlayerPos(playerid, 153.5901,1844.6500,17.6406);
  247.         }
  248.         return 1;
  249. }
  250. //========[ Explodir Portoes ]=======//
  251. CMD:explodirportoes(playerid, params[])
  252. {
  253.         new string[100];
  254.         if (explodiracela[playerid] == 1) return SendClientMessage(playerid, -1, "Você já explodiu a cela, deve esperar 3 minutos.");
  255.         if(PlayerToPoint(15.0, playerid, 2526.9978,-1299.5741,1031.4219))
  256.         {
  257.                 format(string, sizeof(string), "O{7EBD00} %s {f5f3f0}está explodindo a Cela do Presidio",Nome(playerid));
  258.                 SendClientMessageToAll(-1, string);
  259.                 SendClientMessage(playerid, -1, "Aguarde 10 Segundos para explodir a cela.");
  260.                 SetTimerEx("explodircela", 10000, 0, "i", playerid);   // 10 Segundos
  261.                 SetTimer("UsarCela", 60000, 0); //60 segundos = 1 Minuto
  262.                 explodiracela[playerid] = 1;
  263.                 dinamiteC1 = CreateObject(1654,2527.80004883,-1299.90002441,1030.69995117,0.00000000,0.00000000,179.99450684); //object(dynamite) (7)
  264.                 dinamiteC2 = CreateObject(1654,2526.30004883,-1299.90002441,1030.69995117,0.00000000,0.00000000,179.99450684); //object(dynamite) (8)
  265.                 dinamiteC3 = CreateObject(1654,2527.80004883,-1299.80004883,1032.80004883,0.00000000,0.00000000,179.99450684); //object(dynamite) (9)
  266.                 dinamiteC4 = CreateObject(1654,2526.30004883,-1299.90002441,1032.80004883,0.00000000,0.00000000,179.99450684); //object(dynamite) (11)
  267.                 return 1;
  268.         }
  269.         else if(PlayerToPoint(15.0, playerid, 2569.4700,-1300.7065,1037.7734))
  270.         {
  271.                 format(string, sizeof(string), "O{7EBD00} %s {f5f3f0}está explodindo o Portão da Sala das Maquinas",Nome(playerid));
  272.                 SendClientMessageToAll(-1, string);
  273.                 SendClientMessage(playerid, -1, "Aguarde 10 Segundos para explodir o Sala das Maquinas.");
  274.                 SetTimerEx("explodirSalaMaquinas", 10000, 0, "i", playerid);   // 10 Segundos ...
  275.                 SetTimer("UsarCela", 60000, 0);        //60 segundos = 1 Minuto
  276.                 explodiracela[playerid] = 1;
  277.                 dinamiteSM1 = CreateObject(1654,2567.89990234,-1300.40002441,1040.00000000,0.00000000,0.00000000,0.00000000); //object(dynamite) (12)
  278.                 dinamiteSM2 = CreateObject(1654,2571.10009766,-1300.30004883,1040.00000000,0.00000000,0.00000000,0.00000000); //object(dynamite) (13)
  279.                 dinamiteSM3 = CreateObject(1654,2571.10009766,-1300.30004883,1037.30004883,0.00000000,0.00000000,0.00000000); //object(dynamite) (14)
  280.                 dinamiteSM4 = CreateObject(1654,2567.89990234,-1300.40002441,1037.30004883,0.00000000,0.00000000,0.00000000); //object(dynamite) (15)
  281.                 }
  282.         return 1;
  283. }
  284. public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
  285. {
  286. if(IsPlayerConnected(playerid))
  287. {
  288.         new Float:oldposx, Float:oldposy, Float:oldposz;
  289.         new Float:tempposx, Float:tempposy, Float:tempposz;
  290.         GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  291.         tempposx = (oldposx -x);
  292.         tempposy = (oldposy -y);
  293.         tempposz = (oldposz -z);
  294.         if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  295.         {
  296.                 return true;
  297.         }
  298. }
  299. return 0;
  300. }
  301.  
  302. //=====Stocks====//
  303. stock Nome(playerid)
  304. {
  305. new Name[MAX_PLAYERS];
  306. GetPlayerName(playerid, Name, sizeof(Name));
  307. return Name;
  308. }
  309. public UsarPorta(playerid)
  310. {
  311. invadirporta[playerid] = 0;
  312. }
  313. public explodircela(playerid)
  314. {
  315. new string[256];
  316. if(!PlayerToPoint(30.0, playerid, 2526.9978,-1299.5741,1031.4219))
  317. {
  318.         format(string, sizeof(string), "O{7EBD00} %s {f5f3f0}Não conseguiu Explodir a Cela.",Nome(playerid));
  319.         SendClientMessageToAll(-1, string);
  320.         explodiracela[playerid] = 1;
  321.         return 1;
  322. }
  323. ForPlayers(i)
  324. {
  325.         if(PlayerToPoint(30.0, playerid, 2526.9978,-1299.5741,1031.4219))
  326.         {
  327.                 format(string, sizeof(string), "O{7EBD00} %s {f5f3f0}Conseguiu Explodir a Cela.",Nome(playerid));
  328.                 SendClientMessageToAll(-1, string);
  329.                 DestroyObject(cela);
  330.                 DestroyObject(pcela);
  331.                 DestroyObject(dinamiteC1);
  332.                 DestroyObject(dinamiteC2);
  333.                 DestroyObject(dinamiteC3);
  334.                 DestroyObject(dinamiteC4);
  335.                 CreateExplosion(2526.9978,-1299.5741,1031.4219,12,1.0);
  336.                 explodiracela[playerid] = 1;
  337.                 SetTimer("reformarcela", 30000, 0);
  338.                 return 1;
  339.         }
  340. }
  341. return 1;
  342. }
  343. public explodirSalaMaquinas(playerid)
  344. {
  345. new playername[MAX_PLAYER_NAME];
  346. new string[256];
  347. GetPlayerName(playerid,playername,sizeof(playername));
  348. if(!PlayerToPoint(30.0, playerid, 2569.4700,-1300.7065,1037.7734))
  349. {
  350.         format(string, sizeof(string), "O{7EBD00} %s {f5f3f0}Não conseguiu explodir o Portão da Sala das Maquinas.",playername);
  351.         SendClientMessageToAll(-1, string);
  352.         explodiracela[playerid] = 1;
  353.         return 1;
  354. }
  355. ForPlayers(i)
  356. {
  357.         if(PlayerToPoint(30.0, playerid, 2569.4700,-1300.7065,1037.7734))
  358.         {
  359.                 format(string, sizeof(string), "O{7EBD00} %s {f5f3f0}Conseguiu explodir Portão da Sala das Maquinas.",playername);
  360.                 SendClientMessageToAll(-1, string);
  361.                 DestroyObject(SalaMaquinas);
  362.                 DestroyObject(dinamiteSM1);
  363.                 DestroyObject(dinamiteSM2);
  364.                 DestroyObject(dinamiteSM3);
  365.                 DestroyObject(dinamiteSM4);
  366.                 CreateExplosion(2569.4700,-1300.7065,1037.7734,12,1.0);
  367.                 explodiracela[playerid] = 1;
  368.                 SetTimer("reformarSalaMaquinas", 30000, 0);
  369.                 return 1;
  370.         }
  371. }
  372. return 1;
  373. }
  374. public InvadirPortao(playerid)
  375. {
  376. new string[256];
  377. if(!PlayerToPoint(30.0, playerid, 2565.1624,-1301.8860,1031.4219))
  378. {
  379.         format(string, sizeof(string), "O{7EBD00} %s {f5f3f0}Não conseguiu invadir o Portão 1 do Presidio",Nome(playerid));
  380.         SendClientMessageToAll(-1, string);
  381.         invadirporta[playerid] = 1;
  382.         return 1;
  383. }
  384. ForPlayers(i)
  385. {
  386.         if(PlayerToPoint(30.0, playerid, 2565.1624,-1301.8860,1031.4219))
  387.         {
  388.                 format(string, sizeof(string), "O{7EBD00} %s {f5f3f0}Invadiu o Portão 1 do Presidio",Nome(playerid));
  389.                 SendClientMessageToAll(-1, string);
  390.                 DestroyObject(PortaoP);
  391.                 DestroyObject(dinamiteP1);
  392.                 DestroyObject(dinamiteP2);
  393.                 DestroyObject(dinamiteP3);
  394.                 DestroyObject(dinamiteP4);
  395.                 CreateExplosion(2565.1624,-1301.8860,1031.4219,12,1.0);
  396.                 invadirporta[playerid] = 1;
  397.                 SetTimer("PortaoReformado", 30000, 0); // 30 Segundos !!!
  398.                 return 1;
  399.         }
  400. }
  401. return 1;
  402. }
  403. public PortaoReformado()
  404. {
  405. PortaoP = CreateObject(2634,2565.69995117,-1302.90002441,1031.59997559,0.00000000,0.00000000,90.00000000);
  406. SendClientMessageToAll(COLOR_JAPAN, "[AVISO]Portão do Presidio de Los Santos foi Reformado Pela Prefeitura.");
  407. }
  408. public UsarCela(playerid)
  409. {
  410. explodiracela[playerid] = 0;
  411. }
  412. public reformarcela()
  413. {
  414. cela = CreateObject(2930,2527.89990234,-1300.00000000,1033.09997559,0.00000000,0.00000000,270.00000000);
  415. pcela = CreateObject(2930,2527.89990234,-1300.00000000,1033.09997559,0.00000000,0.00000000,270.00000000);
  416. SendClientMessageToAll(COLOR_JAPAN, "[AVISO]Cela do Presidio de Los Santos foi Reformada Pela Prefeitura.");
  417. }
  418. public reformarSalaMaquinas()
  419. {
  420. SalaMaquinas = CreateObject(2963,2569.39990234,-1300.00000000,1038.80004883,0.00000000,0.00000000,92.00000000);
  421. SendClientMessageToAll(COLOR_JAPAN, "[AVISO]Portão da Sala das Maquinas do Presidio de Los Santos foi Reformado Pela Prefeitura.");
  422. }
  423. public FecharCela(playerid)
  424. {
  425. MoveObject(pcela,2527.89990234,-1300.00000000,1033.09997559,3.0); //CORDENADAS DELE FECHADO
  426. SendClientMessage(playerid,COLOR_JAPAN, "[Porteiro]Fechando Porta da Cela");
  427. return 1;
  428. }
  429. public FecharPresidioum(playerid)
  430. {
  431. MoveObject(presidioum,2529.10009766,-1294.00000000,1029.40002441,3.0); //CORDENADAS DELE FECHADO
  432. SendClientMessage(playerid,COLOR_JAPAN, "[Porteiro]Fechando Portao 1 do Presidio");
  433. return 1;
  434. }
  435. public FecharPresidiodois(playerid)
  436. {
  437. MoveObject(presidiodois,2533.30004883,-1290.50000000,1031.90002441,3.0); //CORDENADAS DELE FECHADO
  438. SendClientMessage(playerid,COLOR_JAPAN, "[Porteiro]Fechando Portao 2 do Presidio");
  439. return 1;
  440. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top