Advertisement
Guest User

Presidio Strcmp

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