naturaldisaster.pwn 67 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483
  1. /*
  2. /$$ /$$ /$$$$$$ /$$$$$$$ /$$$$$$$
  3. | $$$ | $$ /$$__ $$ | $$__ $$| $$__ $$
  4. | $$$$| $$| $$ \__/ | $$ \ $$| $$ \ $$
  5. | $$ $$ $$| $$ /$$$$ /$$$$$$| $$$$$$$/| $$$$$$$/
  6. | $$ $$$$| $$|_ $$|______/| $$__ $$| $$____/
  7. | $$\ $$$| $$ \ $$ | $$ \ $$| $$
  8. | $$ \ $$| $$$$$$/ | $$ | $$| $$
  9. |__/ \__/ \______/ |__/ |__/|__/
  10. Next Generation Gaming, LLC
  11. (created by Next Generation Gaming Development Team)
  12. Developers:
  13. - Jingles
  14. * Copyright (c) 2014, Next Generation Gaming, LLC
  15. *
  16. * All rights reserved.
  17. *
  18. * Redistribution and use in source and binary forms, with or without modification,
  19. * are not permitted in any case.
  20. *
  21. *
  22. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  23. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  24. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  25. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  26. * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  27. * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  28. * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  29. * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  30. * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  31. * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  32. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  33. */
  34. new const gLocalZones[][SAZONE_MAIN] = {
  35. // NAME
  36. {"The Big Ear", {-410.00,1403.30,-3.00,-137.90,1681.20,200.00}},
  37. {"Angel Pine", {-2324.90,-2584.20,-6.10,-1964.20,-2212.10,200.00}},
  38. {"Bayside", {-2741.00,2175.10,0.00,-2353.10,2722.70,200.00}},
  39. {"Blueberry", {19.60,-404.10,3.80,349.60,-220.10,200.00}},
  40. {"City Hall", {-2867.80,277.40,-9.10,-2593.40,458.40,200.00}},
  41. {"Dillimore", {580.70,-674.80,-9.50,861.00,-404.70,200.00}},
  42. {"Doherty", {-2270.00,-324.10,-0.00,-1794.90,-222.50,200.00}},
  43. {"Downtown", {-1993.20,265.20,-9.10,-1794.90,578.30,200.00}},
  44. {"Downtown Los Santos", {1463.90,-1430.80,-89.00,1724.70,-1290.80,110.90}},
  45. {"East Beach", {2632.80,-1852.80,-89.00,2959.30,-1668.10,110.90}},
  46. {"Flint Intersection", {-187.70,-1596.70,-89.00,17.00,-1276.60,110.90}},
  47. {"Flint Range", {-594.10,-1648.50,0.00,-187.70,-1276.60,200.00}},
  48. {"Ganton", {2222.50,-1722.30,-89.00,2632.80,-1628.50,110.90}},
  49. {"Glen Park", {1812.60,-1350.70,-89.00,2056.80,-1100.80,110.90}},
  50. {"Hilltop Farm", {967.30,-450.30,-3.00,1176.70,-217.90,200.00}},
  51. {"Idlewood", {1971.60,-1852.80,-89.00,2222.50,-1742.30,110.90}},
  52. {"Jefferson", {2056.80,-1449.60,-89.00,2266.20,-1372.00,110.90}},
  53. {"Little Mexico", {1758.90,-1722.20,-89.00,1812.60,-1577.50,110.90}},
  54. {"Los Santos International", {2051.60,-2597.20,-39.00,2152.40,-2394.30,60.90}},
  55. {"Marina", {807.90,-1577.50,-89.00,926.90,-1416.20,110.90}},
  56. {"Market", {787.40,-1416.20,-89.00,1072.60,-1310.20,110.90}},
  57. {"Montgomery", {1119.50,119.50,-3.00,1451.40,493.30,200.00}},
  58. {"Montgomery Intersection", {1582.40,347.40,0.00,1664.60,401.70,200.00}},
  59. {"Mulholland", {1414.00,-768.00,-89.00,1667.60,-452.40,110.90}},
  60. {"Mulholland Intersection", {1463.90,-1150.80,-89.00,1812.60,-768.00,110.90}},
  61. {"Ocean Docks", {2324.00,-2145.10,-89.00,2703.50,-2059.20,110.90}},
  62. {"Palomino Creek", {2160.20,-149.00,0.00,2576.90,228.30,200.00}},
  63. {"Pershing Square", {1440.90,-1722.20,-89.00,1583.50,-1577.50,110.90}},
  64. {"Richman", {647.50,-1118.20,-89.00,787.40,-954.60,110.90}},
  65. {"Rodeo", {334.50,-1406.00,-89.00,466.20,-1292.00,110.90}},
  66. {"Santa Maria Beach", {342.60,-2173.20,-89.00,647.70,-1684.60,110.90}},
  67. {"Temple", {1252.30,-1130.80,-89.00,1378.30,-1026.30,110.90}},
  68. {"The Panopticon", {-947.90,-304.30,-1.10,-319.60,327.00,200.00}},
  69. {"The Sherman Dam", {-968.70,1929.40,-3.00,-481.10,2155.20,200.00}},
  70. {"Unity Station", {1692.60,-1971.80,-20.40,1812.60,-1932.80,79.50}},
  71. {"Verdant Bluffs", {1249.60,-2179.20,-89.00,1692.60,-1842.20,110.90}},
  72. {"Verona Beach", {647.70,-2173.20,-89.00,930.20,-1804.20,110.90}},
  73. {"Vinewood", {787.40,-1310.20,-89.00,952.60,-1130.80,110.90}},
  74. {"Willowfield", {2541.70,-2059.20,-89.00,2703.50,-1941.40,110.90}}
  75. };
  76. #include <YSI\y_hooks>
  77. #define TYPE_EARTHQUAKE 0
  78. #define TYPE_SANDSTORM 1
  79. #define TYPE_FLOOD 2
  80. #define TYPE_HURRICANE 3
  81. #define TYPE_NUKE 4
  82. #define TYPE_ALIENS 5
  83. #define MAX_NATDIS_ZONES 20
  84. #define MAX_NATDIS_MAPS 5
  85. #define NATDIS_MAPAREA_DOWNTOWNLS 0
  86. #define NATDIS_MAPAREA_EASTLS 1
  87. #define NATDIS_MAPAREA_COMMERCE 2
  88. #define NATDIS_MAPAREA_MARKET 3
  89. #define NATDIS_MAPAREA_BRIDGES 5
  90. enum eNatDis {
  91. nat_iGZID,
  92. nat_iAreaID,
  93. nat_iTypeID,
  94. nat_iZoneTypeID,
  95. nat_iZoneID,
  96. nat_iStatus
  97. }
  98. new NatDis[MAX_NATDIS_ZONES][eNatDis];
  99. new Float:g_aMarketExplosions[][3] = {
  100. {1239.3417, -1376.6849, 13.4054},
  101. {1127.2487, -1406.5330, 9.3318},
  102. {1053.9044, -1321.9883, 21.8503},
  103. {1241.3762, -1287.0360, 13.6125},
  104. {347.5374, -1527.9596, 34.8646}
  105. };
  106. new Float:g_aCommerceExplosions[][3] = {
  107. {1477.1429, -1634.7776, 18.3358},
  108. {1494.6349, -1727.6606, 13.7819},
  109. {1546.6965, -1727.1017, 13.3416},
  110. {1400.1318, -1728.5299, 14.7573},
  111. {1573.1984, -1597.7356, 13.1397}
  112. };
  113. new Float:g_aLSDowntownExplosions[][3] = {
  114. {1328.9755, -1505.3248, 18.2389},
  115. {1406.4028, -1447.6858, 13.8323},
  116. {1536.9622, -1426.4609, 17.2701},
  117. {1684.0129, -1435.5986, 15.7439},
  118. {1619.4305, -1602.2864, 14.7449}
  119. };
  120. new Float:g_aEastLSExplosions[][3] = {
  121. {2087.3225, -1765.4458, 14.6534},
  122. {2321.2729, -1730.1904, 13.5186},
  123. {2497.6470, -1688.1013, -8.7726},
  124. {2429.4832, -1631.7568, 15.9447},
  125. {2103.8589, -1821.1707, 14.8629}
  126. };
  127. new Float:g_aBridgesExplosions[][3] = {
  128. {1699.8018, 415.0071, 30.2675},
  129. {2767.1348, 324.4352, 5.5794},
  130. {611.6396, 347.4425, 15.9124},
  131. {-193.2310, 259.4931, 11.3849},
  132. {53.9346, -1534.0623, 4.0346}
  133. };
  134. new natdis_ptCam[MAX_PLAYERS];
  135. hook OnPlayerConnect(playerid)
  136. {
  137. GetPlayerNatDisZones(playerid);
  138. KillTimer(natdis_ptCam[playerid]);
  139. natdis_ptCam[playerid] = 0;
  140. return 1;
  141. }
  142. hook OnPlayerDisconnect(playerid, reason) {
  143. KillTimer(natdis_ptCam[playerid]);
  144. natdis_ptCam[playerid] = -1;
  145. }
  146. hook OnGameModeExit()
  147. {
  148. for(new i; i < MAX_NATDIS_ZONES; ++i)
  149. {
  150. GangZoneDestroy(NatDis[i][nat_iGZID]);
  151. DestroyDynamicArea(NatDis[i][nat_iAreaID]);
  152. }
  153. return 1;
  154. }
  155. GetPlayerNatDisZones(playerid)
  156. {
  157. for(new i; i < MAX_NATDIS_MAPS; ++i) {
  158. if(GetGVarInt("_NatDis_gMapLoaded", i))
  159. {
  160. NatDis_RemoveBuildings(playerid, TYPE_EARTHQUAKE, i);
  161. }
  162. }
  163. for(new i; i < MAX_NATDIS_ZONES; ++i)
  164. {
  165. if(IsValidDynamicArea(NatDis[i][nat_iAreaID]))
  166. {
  167. switch(NatDis[i][nat_iStatus])
  168. {
  169. case 1: GangZoneShowForPlayer(playerid, NatDis[i][nat_iGZID], COLOR_RED);
  170. case 2: GangZoneShowForPlayer(playerid, NatDis[i][nat_iGZID], COLOR_YELLOW);
  171. case 3: GangZoneShowForPlayer(playerid, NatDis[i][nat_iGZID], COLOR_GREEN);
  172. }
  173. GangZoneFlashForPlayer(playerid, NatDis[i][nat_iGZID], COLOR_BLACK);
  174. SetTimerEx("NatDis_StopFlash", 20000, false, "ii", i, playerid);
  175. NatDis_Effects(playerid, i, NatDis[i][nat_iTypeID], 2);
  176. }
  177. }
  178. }
  179. CheckNatDisZone(playerid, iTypeID, iZoneTypeID, iZoneID, iStatus)
  180. {
  181. szMiscArray[0] = 0;
  182. new id = -1;
  183. for(new i; i < sizeof(NatDis); ++i)
  184. {
  185. if(NatDis[i][nat_iTypeID] == iTypeID && NatDis[i][nat_iZoneTypeID] == iZoneTypeID && NatDis[i][nat_iZoneID] == iZoneID)
  186. {
  187. id = i;
  188. }
  189. }
  190. if(iStatus == 0 || iStatus == 5) return DeleteNatDisZone(playerid, id);
  191. format(szMiscArray, sizeof(szMiscArray), "SELECT * FROM `natdiszones` WHERE `id` = %d", id+1);
  192. return mysql_tquery(MainPipeline, szMiscArray, true, "OnCheckNatDisZone", "iiiiii", playerid, id, iTypeID, iZoneTypeID, iZoneID, iStatus);
  193. }
  194. forward OnCheckNatDisZone(playerid, id, iTypeID, iZoneTypeID, iZoneID, iStatus);
  195. public OnCheckNatDisZone(playerid, id, iTypeID, iZoneTypeID, iZoneID, iStatus)
  196. {
  197. new iRows = cache_get_row_count(MainPipeline);
  198. if(!iRows) CreateNatDisZone(playerid, iTypeID, iZoneTypeID, iZoneID, iStatus);
  199. else
  200. {
  201. UpdateNatDisZone(playerid, id, iTypeID, iZoneTypeID, iZoneID, iStatus);
  202. }
  203. return 1;
  204. }
  205. CreateNatDisZone(playerid, iTypeID, iZoneTypeID, iZoneID, iStatus) {
  206. szMiscArray[0] = 0;
  207. for(new i; i < MAX_NATDIS_ZONES; ++i)
  208. {
  209. if(!IsValidDynamicArea(NatDis[i][nat_iAreaID])) {
  210. format(szMiscArray, sizeof(szMiscArray), "UPDATE `natdiszones` SET `type` = '%d', `zonetype` = '%d', `zoneid` = '%d', `zonestatus` = '%d' WHERE `id` = '%d'",
  211. iTypeID,
  212. iZoneTypeID,
  213. iZoneID,
  214. iStatus,
  215. i+1);
  216. return mysql_tquery(MainPipeline, szMiscArray, true, "OnCreateNatDisZone", "iiiiii", playerid, i, iTypeID, iZoneTypeID, iZoneID, iStatus);
  217. }
  218. }
  219. SendClientMessage(playerid, COLOR_GRAD1, "There are no more natural disaster zones available. Please try again at a later moment.");
  220. return 1;
  221. }
  222. forward OnCreateNatDisZone(playerid, i, iTypeID, iZoneTypeID, iZoneID, iStatus);
  223. public OnCreateNatDisZone(playerid, i, iTypeID, iZoneTypeID, iZoneID, iStatus)
  224. {
  225. szMiscArray[0] = 0;
  226. GetPlayerName(playerid, szMiscArray, sizeof(szMiscArray));
  227. switch(iZoneTypeID)
  228. {
  229. case 1:
  230. {
  231. format(szMiscArray, sizeof(szMiscArray), "[NATDIS ZONE] [Deployed by: %s] [Location: %s]", szMiscArray, gMainZones[iZoneID][SAZONE_NAME]);
  232. }
  233. case 2:
  234. {
  235. format(szMiscArray, sizeof(szMiscArray), "[NATDIS ZONE] [Deployed by: %s] [Location: %s]", szMiscArray, gMainZones[iZoneID][SAZONE_NAME]);
  236. }
  237. }
  238. Log("logs/NatDisZones.log", szMiscArray);
  239. ProcessNatDisZone(i, iTypeID, iZoneTypeID, iZoneID, iStatus);
  240. return 1;
  241. }
  242. DeleteNatDisZone(playerid, id) {
  243. format(szMiscArray, sizeof(szMiscArray), "UPDATE `natdiszones` SET `zonestatus` = WHERE `id` = %d", id);
  244. return mysql_tquery(MainPipeline, szMiscArray, true, "OnDeleteNatDisZone", "ii", playerid, id);
  245. }
  246. forward OnDeleteNatDisZone(playerid, id);
  247. public OnDeleteNatDisZone(playerid, id)
  248. {
  249. GangZoneDestroy(NatDis[id][nat_iGZID]);
  250. DestroyDynamicArea(NatDis[id][nat_iAreaID]);
  251. NatDis[id][nat_iTypeID] = 0;
  252. NatDis[id][nat_iZoneTypeID] = 0;
  253. NatDis[id][nat_iZoneID] = 0;
  254. NatDis[id][nat_iStatus] = 0;
  255. if(playerid == INVALID_PLAYER_ID) return 1;
  256. format(szMiscArray, sizeof szMiscArray, "You have successfully destroyed zone ID %i.", id);
  257. SendClientMessage(playerid, COLOR_GRAD1, szMiscArray);
  258. return 1;
  259. }
  260. LoadNatDisZones() {
  261. format(szMiscArray, sizeof(szMiscArray), "SELECT * FROM `natdiszones`");
  262. return mysql_tquery(MainPipeline, szMiscArray, true, "OnLoadNatDisZones", "");
  263. }
  264. forward OnLoadNatDisZones();
  265. public OnLoadNatDisZones() {
  266. new
  267. iFields,
  268. iRows,
  269. iCount,
  270. i;
  271. cache_get_data(iRows, iFields, MainPipeline);
  272. while(iCount < iRows) {
  273. i = cache_get_field_content_int(iCount, "id", MainPipeline);
  274. if(!(0 <= i < MAX_NATDIS_ZONES)) break;
  275. ProcessNatDisZone(i, cache_get_field_content_int(iCount, "type", MainPipeline), cache_get_field_content_int(iCount, "zonetype", MainPipeline),
  276. cache_get_field_content_int(iCount, "zoneid", MainPipeline), cache_get_field_content_int(iCount, "zonestatus", MainPipeline));
  277. iCount++;
  278. }
  279. printf("[NatDis Zones] Loaded %d Natural Disaster Zones", iCount);
  280. return 1;
  281. }
  282. UpdateNatDisZone(playerid, i, iTypeID, iZoneTypeID, iZoneID, iStatus) {
  283. szMiscArray[0] = 0;
  284. format(szMiscArray, sizeof(szMiscArray), "UPDATE `natdiszones` SET `type` = %d, `zonetype` = %d, `zoneid` = %d, `zonestatus` = %d WHERE id = %d", iTypeID, iZoneTypeID, iZoneID, iStatus, i+1);
  285. mysql_tquery(MainPipeline, szMiscArray, false, "OnQueryFinish", "i", SENDDATA_THREAD);
  286. format(szMiscArray, sizeof(szMiscArray), "Updated ID: %d | TypeID: %d, ZoneID: %d, Status: %d", i, iTypeID, iZoneID, iStatus);
  287. SendClientMessage(playerid, COLOR_GRAD1, szMiscArray);
  288. GangZoneDestroy(NatDis[i][nat_iGZID]);
  289. DestroyDynamicArea(NatDis[i][nat_iAreaID]);
  290. ProcessNatDisZone(i, iTypeID, iZoneTypeID, iZoneID, iStatus);
  291. return 1;
  292. }
  293. ProcessNatDisZone(i, iTypeID, iZoneTypeID, iZoneID, iStatus) {
  294. if(iStatus) {
  295. NatDis[i][nat_iTypeID] = iTypeID;
  296. NatDis[i][nat_iZoneTypeID] = iZoneTypeID;
  297. NatDis[i][nat_iZoneID] = iZoneID;
  298. NatDis[i][nat_iStatus] = iStatus;
  299. switch(iZoneTypeID) {
  300. case 1: {
  301. NatDis[i][nat_iGZID] = GangZoneCreate(gMainZones[iZoneID][SAZONE_AREA][0], gMainZones[iZoneID][SAZONE_AREA][1], gMainZones[iZoneID][SAZONE_AREA][3], gMainZones[iZoneID][SAZONE_AREA][4]);
  302. NatDis[i][nat_iAreaID] = CreateDynamicRectangle(gMainZones[iZoneID][SAZONE_AREA][0], gMainZones[iZoneID][SAZONE_AREA][1], gMainZones[iZoneID][SAZONE_AREA][3], gMainZones[iZoneID][SAZONE_AREA][4]);
  303. }
  304. case 2:
  305. {
  306. NatDis[i][nat_iGZID] = GangZoneCreate(gLocalZones[iZoneID][SAZONE_AREA][0], gLocalZones[iZoneID][SAZONE_AREA][1], gLocalZones[iZoneID][SAZONE_AREA][3], gLocalZones[iZoneID][SAZONE_AREA][4]);
  307. NatDis[i][nat_iAreaID] = CreateDynamicRectangle(gLocalZones[iZoneID][SAZONE_AREA][0], gLocalZones[iZoneID][SAZONE_AREA][1], gLocalZones[iZoneID][SAZONE_AREA][3], gLocalZones[iZoneID][SAZONE_AREA][4]);
  308. }
  309. }
  310. switch(iStatus) {
  311. case 1: GangZoneShowForAll(NatDis[i][nat_iGZID], COLOR_RED);
  312. case 2: GangZoneShowForAll(NatDis[i][nat_iGZID], COLOR_YELLOW);
  313. case 3: GangZoneShowForAll(NatDis[i][nat_iGZID], COLOR_GREEN);
  314. }
  315. GangZoneFlashForAll(NatDis[i][nat_iGZID], COLOR_BLACK);
  316. SetTimerEx("NatDis_StopFlash", 20000, false, "ii", i, INVALID_PLAYER_ID);
  317. foreach(new playerid : Player) SetTimerEx("NatDis_StartEffects", 2000, false, "iiii", playerid, i, TYPE_EARTHQUAKE, 2);
  318. }
  319. }
  320. forward NatDis_StartEffects(playerid, i, iTypeID, choice);
  321. public NatDis_StartEffects(playerid, i, iTypeID, choice)
  322. {
  323. NatDis_Effects(playerid, i, iTypeID, choice);
  324. return 1;
  325. }
  326. forward NatDis_StopFlash(i, playerid);
  327. public NatDis_StopFlash(i, playerid)
  328. {
  329. if(playerid != INVALID_PLAYER_ID) GangZoneStopFlashForPlayer(playerid, NatDis[i][nat_iGZID]);
  330. else GangZoneStopFlashForAll(NatDis[i][nat_iGZID]);
  331. return 1;
  332. }
  333. NatDis_MainMenu(playerid)
  334. {
  335. szMiscArray[0] = 0;
  336. new szStatus[6][24];
  337. if(GetGVarInt("_NatDis_GID", TYPE_EARTHQUAKE)) szStatus[0] = "{00FF00} ACTIVE"; else szStatus[0] = "{FF0000} INACTIVE";
  338. if(GetGVarInt("_NatDis_GID", TYPE_SANDSTORM)) szStatus[1] ="{00FF00} ACTIVE"; else szStatus[1] = "{FF0000} INACTIVE";
  339. if(GetGVarInt("_NatDis_GID", TYPE_FLOOD)) szStatus[2] = "{00FF00} ACTIVE"; else szStatus[2] = "{FF0000} INACTIVE";
  340. if(GetGVarInt("_NatDis_GID", TYPE_HURRICANE)) szStatus[3] = "{00FF00} ACTIVE"; else szStatus[3] = "{FF0000} INACTIVE";
  341. if(GetGVarInt("_NatDis_GID", TYPE_NUKE)) szStatus[4] = "{00FF00} ACTIVE"; else szStatus[4] = "{FF0000} INACTIVE";
  342. if(GetGVarInt("_NatDis_GID", TYPE_ALIENS)) szStatus[5] = "{00FF00} ACTIVE"; else szStatus[5] = "{FF0000} INACTIVE";
  343. format(szMiscArray, sizeof(szMiscArray), "Earthquake\t%s\n\
  344. Sandstorm\t%s\n\
  345. Flood\t%s\n\
  346. Hurricane / Thunderstorm\t%s\n\
  347. Nuke\t%s\n\
  348. Aliens\t%s", szStatus[0], szStatus[1], szStatus[2], szStatus[3], szStatus[4], szStatus[5]);
  349. return ShowPlayerDialogEx(playerid, DIALOG_NATDIS_MAIN, DIALOG_STYLE_TABLIST, "Natural Disaster Menu", szMiscArray, "Cancel", "Select");
  350. }
  351. NatDis_EditDialog(playerid, iDialogID)
  352. {
  353. szMiscArray[0] = 0;
  354. new szTitle[32];
  355. switch(iDialogID)
  356. {
  357. case DIALOG_NATDIS_EARTHQUAKE:
  358. {
  359. if(!GetGVarInt("_NatDis_GID", TYPE_EARTHQUAKE)) SetGVarInt("_NatDis_GID", 1, TYPE_EARTHQUAKE);
  360. SetPVarInt(playerid, "_EditingNasType", TYPE_EARTHQUAKE);
  361. format(szTitle, sizeof(szTitle), "Natural Disasters | Earthquake");
  362. format(szMiscArray, sizeof(szMiscArray), "\
  363. Initiate weather\n\
  364. Initiate sound\n\
  365. Initiate global effects\n\
  366. Load Area Mapping\n\
  367. Edit zones\n\
  368. ___________________\n\
  369. Reset program");
  370. }
  371. case DIALOG_NATDIS_SANDSTORM:
  372. {
  373. if(!GetGVarInt("_NatDis_GID", TYPE_SANDSTORM)) SetGVarInt("_NatDis_GID", 1, TYPE_SANDSTORM);
  374. SetPVarInt(playerid, "_EditingNasType", TYPE_SANDSTORM);
  375. format(szTitle, sizeof(szTitle), "Natural Disasters | Sandstorm");
  376. format(szMiscArray, sizeof(szMiscArray), "\
  377. Initiate weather\n\
  378. Initiate sound\n\
  379. ___________________\n\
  380. Reset program");
  381. }
  382. case DIALOG_NATDIS_FLOOD:
  383. {
  384. if(!GetGVarInt("_NatDis_GID", TYPE_FLOOD)) SetGVarInt("_NatDis_GID", 1, TYPE_FLOOD);
  385. SetPVarInt(playerid, "_EditingNasType", TYPE_FLOOD);
  386. format(szTitle, sizeof(szTitle), "Natural Disasters | Sandstorm");
  387. format(szMiscArray, sizeof(szMiscArray), "\
  388. Initiate weather\n\
  389. Initiate sound\n\
  390. Initiate global effects\n\
  391. Load Area Mapping\n\
  392. Edit zones\n\
  393. ___________________\n\
  394. Reset program");
  395. }
  396. case DIALOG_NATDIS_NUKE: {
  397. if(!GetGVarInt("_NatDis_GID", TYPE_NUKE)) SetGVarInt("_NatDis_GID", 1, TYPE_NUKE);
  398. SetPVarInt(playerid, "_EditingNasType", TYPE_NUKE);
  399. format(szTitle, sizeof(szTitle), "Natural Disasters | Nuke");
  400. format(szMiscArray, sizeof(szMiscArray), "\
  401. Initiate program\n\
  402. Edit zones\n\
  403. ___________________\n\
  404. Reset program");
  405. }
  406. case DIALOG_NATDIS_ALIENS: {
  407. if(!GetGVarInt("_NatDis_GID", TYPE_ALIENS)) SetGVarInt("_NatDis_GID", 1, TYPE_ALIENS);
  408. SetPVarInt(playerid, "_EditingNasType", TYPE_ALIENS);
  409. format(szTitle, sizeof(szTitle), "Natural Disasters | Nuke");
  410. format(szMiscArray, sizeof(szMiscArray), "\
  411. Spawn Ufo & Initiate Program\n\
  412. Edit zones\n\
  413. ___________________\n\
  414. Reset program");
  415. }
  416. }
  417. return ShowPlayerDialogEx(playerid, iDialogID, DIALOG_STYLE_LIST, szTitle, szMiscArray, "Back", "Select");
  418. }
  419. NatDis_Reset(iTypeID)
  420. {
  421. NatDis_PropertyExplosions(0);
  422. switch(iTypeID)
  423. {
  424. case TYPE_EARTHQUAKE:
  425. {
  426. DeleteGVar("_NatDis_GID", TYPE_EARTHQUAKE);
  427. foreach(new i : Player) NatDis_Effects(i, 0, TYPE_EARTHQUAKE, 0);
  428. for(new i; i < MAX_NATDIS_ZONES; ++i)
  429. {
  430. GangZoneDestroy(NatDis[i][nat_iGZID]);
  431. DestroyDynamicArea(NatDis[i][nat_iAreaID]);
  432. DeleteNatDisZone(INVALID_PLAYER_ID, i);
  433. }
  434. }
  435. case TYPE_SANDSTORM:
  436. {
  437. DeleteGVar("_NatDis", TYPE_SANDSTORM);
  438. foreach(new i : Player) NatDis_Effects(i, 0, TYPE_SANDSTORM, 0);
  439. for(new i; i < MAX_NATDIS_ZONES; ++i)
  440. {
  441. GangZoneDestroy(NatDis[i][nat_iGZID]);
  442. DestroyDynamicArea(NatDis[i][nat_iAreaID]);
  443. DeleteNatDisZone(INVALID_PLAYER_ID, i);
  444. }
  445. }
  446. case TYPE_NUKE: {
  447. DeleteGVar("_NatDis", TYPE_NUKE);
  448. foreach(new i : Player) NatDis_Effects(i, 0, TYPE_EARTHQUAKE, 0);
  449. for(new i; i < MAX_NATDIS_ZONES; ++i)
  450. {
  451. GangZoneDestroy(NatDis[i][nat_iGZID]);
  452. DestroyDynamicArea(NatDis[i][nat_iAreaID]);
  453. DeleteNatDisZone(INVALID_PLAYER_ID, i);
  454. }
  455. }
  456. case TYPE_ALIENS: {
  457. DeleteGVar("_NatDis", TYPE_NUKE);
  458. foreach(new i : Player) NatDis_Effects(i, 0, TYPE_EARTHQUAKE, 0);
  459. for(new i; i < MAX_NATDIS_ZONES; ++i)
  460. {
  461. GangZoneDestroy(NatDis[i][nat_iGZID]);
  462. DestroyDynamicArea(NatDis[i][nat_iAreaID]);
  463. DeleteNatDisZone(INVALID_PLAYER_ID, i);
  464. }
  465. //Ufo_DestroyAdminUfo();
  466. }
  467. }
  468. }
  469. NatDis_PropertyExplosions(choice)
  470. {
  471. switch(choice)
  472. {
  473. case 0:
  474. {
  475. DeleteGVar("_NatDis_PropertyExplosions");
  476. KillTimer(GetGVarInt("_NatDis_PropExplTimer"));
  477. DeleteGVar("_NatDis_PropExplTimer");
  478. return 1;
  479. }
  480. case 1:
  481. {
  482. if(!GetGVarInt("_NatDis_PropertyExplosions")) return 1;
  483. {
  484. SetGVarInt("_NatDis_PropertyExplosions", 1);
  485. }
  486. if(!GetGVarInt("_NatDis_PropExplTimer"))
  487. SetGVarInt("_NatDis_PropExplTimer", SetTimerEx("NatDis_PropertyExplosions", 60000, true, "i", choice));
  488. for(new i; i < sizeof(HouseInfo); ++i)
  489. {
  490. if(IsPointInDynamicArea(NatDis[i][nat_iAreaID], HouseInfo[i][hExteriorX], HouseInfo[i][hExteriorY], HouseInfo[i][hExteriorZ]))
  491. {
  492. CreateExplosion(HouseInfo[i][hExteriorX], HouseInfo[i][hExteriorY], HouseInfo[i][hExteriorZ], 7, 8.0);
  493. }
  494. }
  495. for(new i; i < sizeof(Businesses); ++i)
  496. {
  497. if(IsPointInDynamicArea(NatDis[i][nat_iAreaID], Businesses[i][bExtPos][0], Businesses[i][bExtPos][1], Businesses[i][bExtPos][2]))
  498. {
  499. CreateExplosion(Businesses[i][bExtPos][0], Businesses[i][bExtPos][1], Businesses[i][bExtPos][2], 7, 8.0);
  500. }
  501. }
  502. return 1;
  503. }
  504. }
  505. return 1;
  506. }
  507. NatDis_Effects(playerid, i, iTypeID, choice) {
  508. switch(choice) {
  509. case 0: return NatDis_StopEffects(playerid);
  510. case 1: {
  511. KillTimer(natdis_ptCam[playerid]);
  512. natdis_ptCam[playerid] = -1;
  513. natdis_ptCam[playerid] = SetTimerEx("CameraShaker", 100, true, "i", playerid);
  514. SetTimerEx("NatDis_StopEffects", 20000, false, "i", playerid);
  515. NatDis_AnimEffects(playerid);
  516. return 1;
  517. }
  518. case 2: // not working yet
  519. {
  520. switch(iTypeID)
  521. {
  522. case TYPE_EARTHQUAKE:
  523. {
  524. if(IsPlayerInDynamicArea(playerid, NatDis[i][nat_iAreaID]))
  525. {
  526. KillTimer(natdis_ptCam[playerid]);
  527. natdis_ptCam[playerid] = SetTimerEx("CameraShaker", 100, true, "i", playerid);
  528. SetTimerEx("NatDis_StopEffects", 10000, false, "i", playerid);
  529. NatDis_AnimEffects(playerid);
  530. SendClientMessageToAll(COLOR_WHITE, "EFFECTS");
  531. SetTimerEx("NatDis_StartEffects", 2000, false, "iiii", playerid, i, iTypeID, 2);
  532. }
  533. }
  534. }
  535. }
  536. }
  537. return 1;
  538. }
  539. NatDis_AnimEffects(playerid)
  540. {
  541. new Float:fTemp[3];
  542. if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  543. {
  544. new iVehID = GetPlayerVehicleID(playerid);
  545. GetVehicleVelocity(iVehID, fTemp[0], fTemp[1], fTemp[2]);
  546. SetVehicleVelocity(iVehID, fTemp[0] + 0.3, fTemp[1] + 0.2, fTemp[2] + 0.1);
  547. SetVehicleAngularVelocity(iVehID, 0.0, 0.0, 0.1);
  548. }
  549. else
  550. {
  551. SetPlayerVelocity(playerid, random(10) / 100, random(10) / 100, random(10) / 100);
  552. switch(random(3))
  553. {
  554. case 0: ApplyAnimation(playerid, "SWEET", "Sweet_injuredloop", 4.0, 0, 0, 0, 0, 6000, 1);
  555. case 1: ApplyAnimation(playerid, "PED", "KO_shot_face", 4.0, 0, 1, 1, 1, 6000, 1);
  556. case 2: ApplyAnimation(playerid, "PED", "KO_shot_stom", 4.0, 0, 1, 1, 1, 6000, 1);
  557. }
  558. }
  559. }
  560. forward NatDis_StopEffects(playerid);
  561. public NatDis_StopEffects(playerid)
  562. {
  563. ResetCameraShake(playerid);
  564. KillTimer(natdis_ptCam[playerid]);
  565. natdis_ptCam[playerid] = -1;
  566. return 1;
  567. }
  568. forward CameraShaker(playerid);
  569. public CameraShaker(playerid)
  570. {
  571. if(natdis_ptCam[playerid] == -1) return 1;
  572. SetPlayerDrunkLevel(playerid, 2003);
  573. return 1;
  574. }
  575. hook OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
  576. if(arrAntiCheat[playerid][ac_iFlags][AC_DIALOGSPOOFING] > 0) return 1;
  577. switch(dialogid)
  578. {
  579. case DIALOG_NATDIS_MAIN:
  580. {
  581. if(!response)
  582. {
  583. DeletePVar(playerid, "_EditingZone");
  584. DeletePVar(playerid, "_EditingZoneType");
  585. DeletePVar(playerid, "_EditingNasType");
  586. return 1;
  587. }
  588. switch(listitem)
  589. {
  590. case 0: return NatDis_EditDialog(playerid, DIALOG_NATDIS_EARTHQUAKE);
  591. case 1: return NatDis_EditDialog(playerid, DIALOG_NATDIS_SANDSTORM);
  592. case 2: return NatDis_EditDialog(playerid, DIALOG_NATDIS_FLOOD);
  593. case 3: return 1;
  594. case 4: NatDis_EditDialog(playerid, DIALOG_NATDIS_NUKE);
  595. case 5: NatDis_EditDialog(playerid, DIALOG_NATDIS_ALIENS);
  596. }
  597. }
  598. case DIALOG_NATDIS_EARTHQUAKE:
  599. {
  600. if(!response) return NatDis_MainMenu(playerid);
  601. switch(listitem)
  602. {
  603. case 0: { gWeather = 43; SetWeather(43); }
  604. case 1: foreach(new i : Player) PlayAudioStreamForPlayer(i, "http://localhost/audio/earthquake_siren.mp3");
  605. case 2:
  606. {
  607. foreach(new i : Player) NatDis_Effects(i, 0, TYPE_EARTHQUAKE, 1);
  608. for(new iex; iex < MAX_NATDIS_MAPS; ++iex) NatDis_Explosions(iex, 1);
  609. NatDis_PropertyExplosions(1);
  610. }
  611. case 3: NatDis_LoadMaps(playerid);
  612. case 4: ShowPlayerDialogEx(playerid, DIALOG_NATDIS_EDITZONES, DIALOG_STYLE_LIST, "Natural Disaster | Edit Zones", "Cities / Mainland\nLocal Areas", "Back", "Select");
  613. case 5: return NatDis_MainMenu(playerid);
  614. case 6: NatDis_Reset(TYPE_EARTHQUAKE);
  615. }
  616. return 1;
  617. }
  618. case DIALOG_NATDIS_SANDSTORM:
  619. {
  620. if(!response) return NatDis_MainMenu(playerid);
  621. switch(listitem)
  622. {
  623. case 0: { gWeather = 19; SetWeather(19); }
  624. case 1: foreach(new i : Player) PlayAudioStreamForPlayer(i, "http://localhost/audio/earthquake_siren.mp3");
  625. case 5: NatDis_MainMenu(playerid);
  626. case 6: NatDis_Reset(TYPE_SANDSTORM);
  627. }
  628. }
  629. case DIALOG_NATDIS_FLOOD:
  630. {
  631. if(!response) return NatDis_MainMenu(playerid);
  632. switch(listitem)
  633. {
  634. case 0: { gWeather = 16; SetWeather(16); }
  635. case 1: foreach(new i : Player) PlayAudioStreamForPlayer(i, "http://localhost/audio/earthquake_siren.mp3");
  636. case 2: foreach(new i : Player) NatDis_Effects(i, 0, TYPE_FLOOD, 1);
  637. case 3: NatDis_LoadMaps(playerid);
  638. case 4: ShowPlayerDialogEx(playerid, DIALOG_NATDIS_EDITZONES, DIALOG_STYLE_LIST, "Natural Disaster | Edit Zones", "Cities / Mainland\nLocal Areas", "Back", "Select");
  639. case 5: NatDis_MainMenu(playerid);
  640. case 6: NatDis_Reset(TYPE_FLOOD);
  641. }
  642. }
  643. case DIALOG_NATDIS_NUKE: {
  644. if(!response) return NatDis_MainMenu(playerid);
  645. switch(listitem)
  646. {
  647. case 0: InitiateProgram(playerid, TYPE_NUKE);
  648. case 1: ShowPlayerDialogEx(playerid, DIALOG_NATDIS_EDITZONES, DIALOG_STYLE_LIST, "Natural Disaster | Edit Zones", "Cities / Mainland\nLocal Areas", "Back", "Select");
  649. case 2: NatDis_MainMenu(playerid);
  650. case 3: NatDis_Reset(TYPE_NUKE);
  651. }
  652. }
  653. case DIALOG_NATDIS_ALIENS: {
  654. if(!response) return NatDis_EditDialog(playerid, DIALOG_NATDIS_EARTHQUAKE);
  655. switch(listitem)
  656. {
  657. case 0: InitiateProgram(playerid, TYPE_ALIENS);
  658. case 1: ShowPlayerDialogEx(playerid, DIALOG_NATDIS_EDITZONES, DIALOG_STYLE_LIST, "Natural Disaster | Edit Zones", "Cities / Mainland\nLocal Areas", "Back", "Select");
  659. case 2: NatDis_MainMenu(playerid);
  660. case 3: NatDis_Reset(TYPE_ALIENS);
  661. }
  662. }
  663. case DIALOG_NATDIS_EDITZONES:
  664. {
  665. if(!response) return NatDis_EditDialog(playerid, DIALOG_NATDIS_EARTHQUAKE);
  666. switch(listitem)
  667. {
  668. case 0: return NatDis_EditZones(playerid, 1);
  669. case 1: return NatDis_EditZones(playerid, 2);
  670. }
  671. }
  672. case DIALOG_NATDIS_EDITZONE:
  673. {
  674. if(!response) return NatDis_EditDialog(playerid, DIALOG_NATDIS_EARTHQUAKE);
  675. SetPVarInt(playerid, "_EditingZone", listitem);
  676. switch(GetPVarInt(playerid, "_EditingNasType"))
  677. {
  678. case TYPE_EARTHQUAKE:
  679. {
  680. ShowPlayerDialogEx(playerid, DIALOG_NATDIS_EQFINAL, DIALOG_STYLE_LIST, "Earthquake Menu | Edit Zone", "\
  681. Inactive Zone\n\
  682. Quake Zone\n\
  683. Evacuation Zone\n\
  684. Safe Zone\n\
  685. _______________\n\
  686. Delete Zone\n",
  687. "Back", "Select");
  688. }
  689. }
  690. }
  691. case DIALOG_NATDIS_EQFINAL:
  692. {
  693. if(!response) return ShowPlayerDialogEx(playerid, DIALOG_NATDIS_EDITZONES, DIALOG_STYLE_LIST, "Natural Disaster | Edit Zones", "Cities / Mainland\nLocal Areas", "Back", "Select");
  694. new iZoneTypeID = GetPVarInt(playerid, "_EditingZoneType");
  695. CheckNatDisZone(playerid, GetPVarInt(playerid, "_EditingNasType"), iZoneTypeID, GetPVarInt(playerid, "_EditingZone"), listitem);
  696. return NatDis_EditZones(playerid, iZoneTypeID);
  697. }
  698. case DIALOG_NATDIS_LOADMAPS:
  699. {
  700. if(!response) return NatDis_MainMenu(playerid);
  701. return NatDis_LoadMapping(playerid, GetPVarInt(playerid, "_EditingNasType"), listitem);
  702. }
  703. }
  704. return 0;
  705. }
  706. NatDis_LoadMaps(playerid) {
  707. return ShowPlayerDialogEx(playerid, DIALOG_NATDIS_LOADMAPS, DIALOG_STYLE_LIST, "Natural Disaster | Load Mapping", "\
  708. Load LS Downtown\n\
  709. Load LS East\n\
  710. Load LS Commerce\n\
  711. Load LS Market\n\
  712. Load Bridges", "Cancel", "Select");
  713. }
  714. NatDis_LoadMapping(playerid, iNasType, iArea) {
  715. szMiscArray[0] = 0;
  716. new szChoice[20];
  717. if(GetGVarInt("_NatDis_gMapLoaded", iArea) == 1) {
  718. SendClientMessage(playerid, COLOR_RED, "This map is already loaded.");
  719. return NatDis_MainMenu(playerid);
  720. }
  721. SetGVarInt("_NatDis_gMapLoaded", 1, iArea);
  722. switch(iArea) {
  723. case 0: szChoice = "Downtown";
  724. case 1: szChoice = "East Los Santos";
  725. case 2: szChoice = "Commerce";
  726. case 3: szChoice = "Market";
  727. case 4: szChoice = "Destroyed Bridges";
  728. }
  729. NatDis_Streamer(iNasType, iArea);
  730. foreach(new i : Player) NatDis_RemoveBuildings(i, iNasType, iArea);
  731. format(szMiscArray, sizeof(szMiscArray), "Successfully loaded mapping: %s", szChoice);
  732. SendClientMessage(playerid, COLOR_YELLOW, szMiscArray);
  733. NatDis_LoadMaps(playerid);
  734. return 1;
  735. }
  736. forward NatDis_Explosions(iArea, choice);
  737. public NatDis_Explosions(iArea, choice)
  738. {
  739. // if(!GetGVarInt("_NatDis_GID"), iArea) return 1;
  740. new rand = random(sizeof(g_aLSDowntownExplosions));
  741. if(choice == 0) SetTimerEx("NatDis_Explosions", 60000, false, "ii", iArea, 0);
  742. switch(iArea)
  743. {
  744. case NATDIS_MAPAREA_DOWNTOWNLS:
  745. {
  746. CreateExplosion(g_aLSDowntownExplosions[rand][0], g_aLSDowntownExplosions[rand][1], g_aLSDowntownExplosions[rand][2], 7, 10.0);
  747. }
  748. case NATDIS_MAPAREA_COMMERCE:
  749. {
  750. CreateExplosion(g_aCommerceExplosions[rand][0], g_aCommerceExplosions[rand][1], g_aCommerceExplosions[rand][2], 7, 10.0);
  751. }
  752. case NATDIS_MAPAREA_EASTLS:
  753. {
  754. CreateExplosion(g_aEastLSExplosions[rand][0], g_aEastLSExplosions[rand][1], g_aEastLSExplosions[rand][2], 7, 10.0);
  755. }
  756. case NATDIS_MAPAREA_MARKET:
  757. {
  758. CreateExplosion(g_aMarketExplosions[rand][0], g_aMarketExplosions[rand][1], g_aMarketExplosions[rand][2], 7, 10.0);
  759. }
  760. case NATDIS_MAPAREA_BRIDGES:
  761. {
  762. CreateExplosion(g_aBridgesExplosions[rand][0], g_aBridgesExplosions[rand][1], g_aBridgesExplosions[rand][2], 7, 10.0);
  763. }
  764. }
  765. return 1;
  766. }
  767. InitiateProgram(playerid, iNasType) {
  768. switch(iNasType) {
  769. case TYPE_NUKE: {
  770. SetWorldTime(1);
  771. SetWeather(125);
  772. foreach(new i : Player) {
  773. BroadcastLastInt[i] = GetPlayerInterior(i);
  774. BroadcastLastVW[i] = GetPlayerVirtualWorld(i);
  775. GetPlayerFacingAngle(i, PlayerInfo[i][pPos_r]);
  776. GetPlayerPos(playerid, BroadcastFloats[i][1], BroadcastFloats[i][2], BroadcastFloats[i][3]);
  777. PlayerInfo[i][pInt] = BroadcastLastInt[i];
  778. PlayerInfo[i][pVW] = BroadcastLastVW[i];
  779. PlayerInfo[i][pPos_r] = BroadcastFloats[i][0];
  780. PlayerInfo[i][pPos_x] = BroadcastFloats[i][1];
  781. PlayerInfo[i][pPos_y] = BroadcastFloats[i][2];
  782. PlayerInfo[i][pPos_z] = BroadcastFloats[i][2];
  783. SetPlayerPos(i, 0.0, 0.0, 100000000);
  784. PlayAudioStreamForPlayer(i, "http://localhost/audio/nuke.mp3");
  785. defer ReturnPlayer(i);
  786. }
  787. }
  788. case TYPE_ALIENS: {
  789. //Ufo_CreateAdminUfo(playerid);
  790. SetWorldTime(1);
  791. SetWeather(125);
  792. PlayAudioStreamForPlayer(playerid, "http://localhost/audio/aliens.mp3");
  793. SetPlayerDrunkLevel(playerid, 1000);
  794. }
  795. }
  796. defer NatDisProgram(iNasType);
  797. }
  798. timer ReturnPlayer[30000](i) {
  799. Player_StreamPrep(i, BroadcastFloats[i][1], BroadcastFloats[i][2], BroadcastFloats[i][3], FREEZE_TIME);
  800. SetPlayerVirtualWorld(i, PlayerInfo[i][pVW]);
  801. SetPlayerInterior(i, PlayerInfo[i][pInt]);
  802. }
  803. timer NatDisProgram[30000](iNasType) {
  804. switch(iNasType) {
  805. case TYPE_NUKE: {
  806. SetWorldTime(4);
  807. SetWeather(23);
  808. }
  809. case TYPE_ALIENS: {
  810. foreach(new i : Player) SetPlayerDrunkLevel(i, 0);
  811. }
  812. }
  813. }
  814. NatDis_Streamer(iNasType, iArea)
  815. {
  816. NatDis_Explosions(iArea, 0);
  817. switch(iNasType)
  818. {
  819. case TYPE_EARTHQUAKE:
  820. {
  821. switch(iArea)
  822. {
  823. case NATDIS_MAPAREA_DOWNTOWNLS: // somehow including map .pwn files only loads the first object?
  824. {
  825. CreateDynamicObject(8647, -2135.2, -149.5, 2000, 0, 0, 0);
  826. CreateDynamicObject(14437, -2147.5, -137.10001, 2011.22, 0, 0, 0);
  827. CreateDynamicObject(14408, -2135.3, -144.5, 2018.5466, 0, 0, 0);
  828. CreateDynamicObject(7191, -2149.3999, -114.6, 2011.2, 0, 0, 0);
  829. CreateDynamicObject(7191, -2145.5, -114.6, 2011.2, 0, 0, 0);
  830. CreateDynamicObject(2930, -2146.6001, -137, 2011.8, 0, 0, 270);
  831. CreateDynamicObject(1968, -2147.2, -141.10001, 2009.7, 0, 0, 0);
  832. CreateDynamicObject(14439, -2141.7, -143.60001, 2020.3, 0, 0, 2);
  833. CreateDynamicObject(1771, -2148.3, -134.39999, 2009.8, 358, 1.001, 358.535);
  834. CreateDynamicObject(7191, -2145.3, -172.7, 2011.1, 0, 0, 180);
  835. CreateDynamicObject(7191, -2149.3999, -172.7, 2011, 0, 0, 179.995);
  836. CreateDynamicObject(14437, -2147.3, -166.39999, 2011.2, 0, 0, 0);
  837. CreateDynamicObject(1771, -2147.2, -156, 2009.8, 0, 0, 0);
  838. CreateDynamicObject(1810, -2148.7, -153.60001, 2009.2, 0, 0, 192);
  839. CreateDynamicObject(2747, -2148.8, -152.39999, 2009.5, 0, 0, 267.75);
  840. CreateDynamicObject(7191, -2129.5, -118.5, 2015.3, 0, 0, 0);
  841. CreateDynamicObject(7191, -2129.5, -168.3, 2009.8, 0, 0, 179.995);
  842. CreateDynamicObject(7191, -2145.5, -114.6, 2015.5, 0, 0, 0);
  843. CreateDynamicObject(7191, -2149.3999, -114.6, 2015.5, 0, 0, 0);
  844. CreateDynamicObject(14437, -2147.5, -137.10001, 2015.1, 0, 0, 0);
  845. CreateDynamicObject(14437, -2143.6001, -137.2, 2015.1, 0, 0, 0);
  846. CreateDynamicObject(7191, -2141.3, -114.6, 2015.5, 0, 0, 0);
  847. CreateDynamicObject(14437, -2139.5, -137.3, 2015.1, 0, 0, 0);
  848. CreateDynamicObject(7191, -2137.2, -114.6, 2015.5, 0, 0, 0);
  849. CreateDynamicObject(14437, -2151.6001, -137.3, 2015.1, 0, 0, 0);
  850. CreateDynamicObject(7191, -2153.1001, -114.6, 2015.5, 0, 0, 0);
  851. CreateDynamicObject(14437, -2154.8, -137.2, 2015.1, 0, 0, 0);
  852. CreateDynamicObject(7191, -2156.3999, -114.6, 2015.4, 0, 0, 0);
  853. CreateDynamicObject(14437, -2135.3999, -137.2, 2015.1, 0, 0, 0);
  854. CreateDynamicObject(14437, -2151.6001, -137.3, 2011.1, 0, 0, 0);
  855. CreateDynamicObject(7191, -2153.1001, -114.8, 2011, 0, 0, 0);
  856. CreateDynamicObject(7191, -2141.3, -114.6, 2011, 0, 0, 0);
  857. CreateDynamicObject(7191, -2137.2, -114.6, 2011.1, 0, 0, 0);
  858. CreateDynamicObject(14437, -2143.7, -137.2, 2011.2, 0, 0, 0);
  859. CreateDynamicObject(14437, -2139.2, -137.3, 2011.2, 0, 0, 0);
  860. CreateDynamicObject(14437, -2135.3999, -137.2, 2011.2, 0, 0, 0);
  861. CreateDynamicObject(7191, -2151.69995, -135.3, 2013.40002, 0, 90, 270);
  862. CreateDynamicObject(7191, -2152.3999, -131.39999, 2013.4, 0, 90, 90);
  863. CreateDynamicObject(7191, -2152.3, -132.8, 2014.4, 0, 0, 90);
  864. CreateDynamicObject(7191, -2152.3999, -132.8, 2010.5, 0, 0, 90);
  865. CreateDynamicObject(7191, -2147.7, -137.3, 2019, 0, 180, 270);
  866. CreateDynamicObject(7191, -2152.3, -132.7, 2018.3, 0, 0, 90);
  867. CreateDynamicObject(7191, -2151.6001, -135.3, 2017.1, 0, 270, 270);
  868. CreateDynamicObject(7191, -2152.1001, -131.39999, 2017.5, 0, 90, 90);
  869. CreateDynamicObject(18092, -2155.6001, -137.5, 2009.7, 0, 0, 180);
  870. CreateDynamicObject(2339, -2154.8999, -133.39999, 2009.3, 0, 0, 0);
  871. CreateDynamicObject(2136, -2153.7, -135.3, 2009.2, 0, 0, 269.75);
  872. CreateDynamicObject(14445, -2133.3, -137, 2015.2, 0, 0, 0);
  873. CreateDynamicObject(16645, -2140.7, -138.2, 2013.4, 0, 0, 0);
  874. CreateDynamicObject(14437, -2143.6001, -166.39999, 2011.2, 0, 0, 0);
  875. CreateDynamicObject(14437, -2139.3, -166.39999, 2011.2, 0, 0, 0);
  876. CreateDynamicObject(14437, -2135.5, -166.39999, 2011.2, 0, 0, 0);
  877. CreateDynamicObject(7191, -2141.3, -172.8, 2011.2, 0, 0, 179.995);
  878. CreateDynamicObject(7191, -2137.2, -172.8, 2010.7, 0, 0, 179.995);
  879. CreateDynamicObject(7191, -2139.6001, -152.60001, 2013.19995, 0, 90, 90);
  880. CreateDynamicObject(7191, -2145.3, -172.7, 2015.1, 0, 0, 179.995);
  881. CreateDynamicObject(7191, -2137.2, -172.8, 2015, 0, 0, 179.995);
  882. CreateDynamicObject(7191, -2153, -173.2, 2015.1, 0, 0, 179.995);
  883. CreateDynamicObject(7191, -2149.3999, -172.7, 2014.9, 0, 0, 179.995);
  884. CreateDynamicObject(7191, -2141.3, -172.8, 2015.2, 0, 0, 179.995);
  885. CreateDynamicObject(14408, -2135.6001, -158.2, 2030.2, 0, 0, 0);
  886. CreateDynamicObject(14437, -2135.5, -166.89999, 2015.3, 0, 0, 0);
  887. CreateDynamicObject(14437, -2139.3, -166.89999, 2015.3, 0, 0, 0);
  888. CreateDynamicObject(14437, -2143.6001, -166.89999, 2015.3, 0, 0, 0);
  889. CreateDynamicObject(14437, -2147.3, -166.89999, 2015.3, 0, 0, 0);
  890. CreateDynamicObject(14437, -2151.3999, -166.89999, 2015.3, 0, 0, 0);
  891. CreateDynamicObject(7191, -2151.3, -156.39999, 2015.1, 0, 0, 270);
  892. CreateDynamicObject(7191, -2139.5, -156.5, 2013.2, 0, 90, 90);
  893. CreateDynamicObject(16645, -2137, -149.8, 2013.2, 0, 0, 180.747);
  894. CreateDynamicObject(7191, -2147.6001, -150.39999, 2018.6, 0, 0, 269.25);
  895. CreateDynamicObject(7191, -2151.6001, -152.89999, 2016.8, 0, 270, 270);
  896. CreateDynamicObject(7191, -2151.7, -156.5, 2016.8, 0, 270, 270);
  897. CreateDynamicObject(14437, -2154.7, -166.89999, 2015.3, 0, 0, 0);
  898. CreateDynamicObject(7191, -2156.5, -172.8, 2015.1, 0, 0, 179.995);
  899. CreateDynamicObject(7191, -2159.3, -150.14, 2035.9, 90, 180, 90);
  900. CreateDynamicObject(7191, -2159.7, -150.2, 2035.9, 90, 179.995, 90);
  901. CreateDynamicObject(7191, -2129.5, -118.5, 2009.8, 0, 0, 0);
  902. CreateDynamicObject(7191, -2129.5, -168.3, 2015.1, 0, 0, 180);
  903. CreateDynamicObject(14437, -2131.5, -167.10001, 2015.3, 0, 0, 0);
  904. CreateDynamicObject(7191, -2133.3, -173.3, 2010.7, 0, 0, 179.995);
  905. CreateDynamicObject(14437, -2131.5, -166.39999, 2011.2, 0, 0, 0);
  906. CreateDynamicObject(14437, -2131.5, -137.3, 2011.2, 0, 0, 0);
  907. CreateDynamicObject(14437, -2131.5, -137.3, 2015.2, 0, 0, 0);
  908. CreateDynamicObject(16645, -2145, -149.89999, 2013.2, 0, 0, 180.747);
  909. CreateDynamicObject(16645, -2149.6001, -138.2, 2013.4, 0, 0, 0);
  910. CreateDynamicObject(7191, -2159.3, -137.3, 2036.1, 90, 0, 90);
  911. CreateDynamicObject(7191, -2161.1001, -137.28999, 2036.1, 90, 0, 90);
  912. CreateDynamicObject(3657, -2154, -156.39999, 2009.7, 0, 0, 88);
  913. CreateDynamicObject(3657, -2153.8, -151.5, 2009.7, 0, 0, 87.995);
  914. CreateDynamicObject(3657, -2157.6001, -156.39999, 2009.7, 0, 0, 92.495);
  915. CreateDynamicObject(14532, -2150.6001, -154.10001, 2010.2, 0, 0, 89.25);
  916. CreateDynamicObject(7191, -2147.1001, -150.89999, 2021.7, 0, 0, 270);
  917. CreateDynamicObject(7191, -2129.5, -118.5, 2012.2, 0, 0, 0);
  918. CreateDynamicObject(7191, -2129.5, -168.3, 2011.3, 0, 0, 179.995);
  919. CreateDynamicObject(7191, -2147.7002, -137.2998, 2019, 179.995, 0, 90);
  920. CreateDynamicObject(7191, -2147.7, -137.3, 2022.9, 179.995, 0, 90);
  921. CreateDynamicObject(7191, -2125.6001, -114.7, 2018.1, 0.005, 180, 0);
  922. CreateDynamicObject(7191, -2127.5, -137.39999, 2031.1, 90, 0, 90);
  923. CreateDynamicObject(7191, -2125.6001, -114.7, 2015.3, 0, 179.995, 0);
  924. CreateDynamicObject(7191, -2125.6001, -114.7, 2010.3, 0, 179.995, 0);
  925. CreateDynamicObject(1969, -2138.3999, -140.60001, 2009.7, 0, 0, 0);
  926. CreateDynamicObject(2909, -2129.5, -143.3, 2013, 0, 0, 0);
  927. CreateDynamicObject(2909, -2129.5, -143.3, 2010.4, 0, 0, 0);
  928. CreateDynamicObject(4100, -2129.5, -143.2, 2016, 0, 0, 50.5);
  929. CreateDynamicObject(4100, -2129.5, -143.2, 2018.9, 0, 0, 50.499);
  930. CreateDynamicObject(4100, -2129.5, -143.2, 2021.6, 0, 0, 50.499);
  931. CreateDynamicObject(1536, -2168.1001, -150.39999, 2009.2, 0, 0, 90);
  932. CreateDynamicObject(1536, -2168.1001, -147.39999, 2009.2, 0, 0, 269.25);
  933. CreateDynamicObject(971, -2166.1001, -151.60001, 2012.3, 0, 0, 181.25);
  934. CreateDynamicObject(1497, -2161.8, -146.2, 2009.1, 0, 0, 328);
  935. CreateDynamicObject(1497, -2161.7, -143.3, 2009.1, 0, 0, 33.997);
  936. CreateDynamicObject(1500, -2165.8999, -142.60001, 2009.2, 0, 0, 0);
  937. CreateDynamicObject(985, -2165.8, -142.60001, 2010.9, 0, 0, 0);
  938. CreateDynamicObject(4106, -2159.5, -148.10001, 2011.8, 0, 0, 90.25);
  939. CreateDynamicObject(4106, -2127.5, -140, 2011.8, 0, 0, 269.997);
  940. CreateDynamicObject(4106, -2159.6001, -140.5, 2014.3, 0, 0, 0.495);
  941. CreateDynamicObject(4007, 1417.5, -1471.5, 12, 6.299, 345.662, 338.106);
  942. CreateDynamicObject(4113, 1327.3, -1550.7, 25.8, 0, 319.5, 0);
  943. CreateDynamicObject(4570, 1489.5, -1268, 23.2, 0, 336, 8);
  944. CreateDynamicObject(4563, 1568.7, -1254, 39, 0, 18, 0);
  945. CreateDynamicObject(4662, 1621.1, -1230.2, 18.8, 0, 34, 0);
  946. CreateDynamicObject(4602, 1656.6, -1345.9, 37.9, 0, 344, 0);
  947. CreateDynamicObject(4586, 1405.1, -1191.2, 85.3, 0, 0, 0);
  948. CreateDynamicObject(4586, 1416.8, -1193.1, 40.4, 0, 26, 2);
  949. CreateDynamicObject(10986, 1752.5, -1439.3, 13.8, 0, 0, 0);
  950. CreateDynamicObject(10777, 1711.4, -1444.2, 7.3, 0, 0, 354);
  951. CreateDynamicObject(11340, 1761, -1456.6, 9.4, 0, 0, 0);
  952. CreateDynamicObject(10394, 1737.4, -1561.9, 15.1, 0, 0, 86);
  953. CreateDynamicObject(3998, 1737.2, -1557.6, 12.7, 0, 26, 0);
  954. CreateDynamicObject(4079, 1786, -1563.6, 23.4, 355.503, 357.994, 354.838);
  955. CreateDynamicObject(11340, 1858.2, -1417.9, 10.2, 2, 0.25, 352.491);
  956. CreateDynamicObject(3866, 1824.3, -1432.9, 20.1, 0, 0, 90);
  957. CreateDynamicObject(3887, 1822.7, -1414.1, 20.7, 0, 0, 0);
  958. CreateDynamicObject(11340, 1854.8, -1338.7, 10.2, 2, 0.247, 172.991);
  959. CreateDynamicObject(7347, 1893.4, -1363.9, 8.9, 35.476, 287.388, 132.649);
  960. CreateDynamicObject(1337, 1807.4238, -1344.0625, 21.79014, 0, 0, 0);
  961. CreateDynamicObject(7916, 1826.2, -1336.8, 1.4, 0, 334, 248);
  962. CreateDynamicObject(7347, 1890.1, -1356.7, 9.6, 35.475, 287.386, 142.649);
  963. CreateDynamicObject(11340, 1541.7, -1253.1, 11.4, 0, 358, 0);
  964. CreateDynamicObject(11340, 1516.4, -1250.1, 11.4, 0, 357.995, 6);
  965. CreateDynamicObject(10985, 1510.5, -1277.8, 15.4, 0, 0, 0);
  966. CreateDynamicObject(4666, 1614.1, -1036.4, 9, 342.756, 1.571, 0.716);
  967. CreateDynamicObject(12824, 1694.5, -1046.5, -56.7, 63.415, 110.691, 61.881);
  968. CreateDynamicObject(12824, 1541.6, -1056, -59, 67.162, 94.819, 252.546);
  969. CreateDynamicObject(7347, 1600.2, -1013.7, 4.7, 43.865, 5.552, 356.146);
  970. CreateDynamicObject(4683, 1614, -1186.2, 28, 7, 359.748, 0.281);
  971. CreateDynamicObject(4708, 1544.5, -1186.9, 29.7, 0, 6.5, 0);
  972. CreateDynamicObject(13717, 1595.5, -1158.6, 4, 354.017, 355.727, 359.554);
  973. CreateDynamicObject(11340, 1587.8, -1177.9, 19.1, 0.5, 359.747, 184.002);
  974. CreateDynamicObject(11340, 1649.6, -1174.9, 19.5, 358.75, 359.492, 182.484);
  975. CreateDynamicObject(11340, 1529.2, -1183.2, 18.9, 0.494, 359.742, 183.999);
  976. CreateDynamicObject(11340, 1503.3, -1164.7, 20.7, 357.744, 359.491, 183.977);
  977. CreateDynamicObject(18450, 1562.7, -1135.4, 25.2, 41.874, 5.375, 92.406);
  978. CreateDynamicObject(4664, 1643.3, -1130.2, 26.6, 358.002, 2.501, 0.087);
  979. CreateDynamicObject(4666, 1614.7, -1030.2, 19.3, 350.77, 3.799, 359.61);
  980. CreateDynamicObject(4131, 1588.4, -1509.1, 19.8, 351, 0, 0);
  981. CreateDynamicObject(10777, 1614.7, -1429.5, 2.8, 0, 352, 343.996);
  982. CreateDynamicObject(11340, 1641.5, -1462.1, 11.4, 0, 357.995, 0);
  983. CreateDynamicObject(11340, 1595.5, -1463.4, 10.6, 0, 357.995, 0);
  984. CreateDynamicObject(10777, 1550, -1413.7, 8, 0, 359.996, 356.743);
  985. CreateDynamicObject(11340, 1455.4, -1262.5, 11.2, 0, 357.99, 5.999);
  986. CreateDynamicObject(11340, 1452.3, -1302.5, 11.4, 0, 353.24, 5.999);
  987. CreateDynamicObject(18450, 1534.8, -1301.2, 13.4, 359.75, 2.25, 352.76);
  988. CreateDynamicObject(11340, 1493.3, -1315, 13.1, 355.26, 356.225, 86.436);
  989. CreateDynamicObject(7347, 1538.2, -1348.5, -10.8, 68.994, 358.605, 356.552);
  990. CreateDynamicObject(11340, 1540.7, -1287.1, 13.9, 358.502, 356.232, 86.649);
  991. CreateDynamicObject(11340, 1607.2, -1327.3, 14.4, 355.259, 356.221, 250.435);
  992. CreateDynamicObject(7347, 1497.8, -1329, -14.1, 68.994, 358.605, 356.55);
  993. CreateDynamicObject(7347, 1433.5, -1300.1, -40, 72.984, 177.437, 91.449);
  994. CreateDynamicObject(1337, 1468.9717, -1301.3135, 12.93676, 0, 0, 0);
  995. CreateDynamicObject(7916, 1476.3, -1302.4, 14.3, 0, 7.75, 74.75);
  996. CreateDynamicObject(7347, 1431.8, -1308.9, -40, 72.982, 177.435, 91.445);
  997. CreateDynamicObject(3990, 1594, -1416.4, 30.1, 359.256, 7.501, 0.098);
  998. CreateDynamicObject(4679, 1607.6, -1326, 33.6, 0, 8.5, 0);
  999. CreateDynamicObject(11340, 1615.4, -1566, 12.4, 1.986, 353.241, 0.235);
  1000. CreateDynamicObject(11340, 1580.8, -1567.9, 12.4, 1.983, 353.238, 0.231);
  1001. CreateDynamicObject(17622, 1576.5, -1591.6, 3.8, 10.063, 343.235, 269.513);
  1002. CreateDynamicObject(17622, 1642.4, -1595.6, 3.8, 9.935, 19.042, 84.341);
  1003. CreateDynamicObject(11340, 1551, -1567.9, 12.4, 1.983, 353.238, 0.231);
  1004. CreateDynamicObject(11340, 1519, -1556.5, 11.9, 1.983, 353.238, 0.231);
  1005. CreateDynamicObject(11340, 1536.5, -1414.1, 10.6, 0, 357.995, 0);
  1006. CreateDynamicObject(11340, 1499.5, -1465.6, 10.6, 0, 358, 0);
  1007. CreateDynamicObject(11340, 1398.8, -1491.6, 9.1, 0, 359.745, 254);
  1008. CreateDynamicObject(11340, 1549.6, -1286.4, 14.4, 355.259, 356.221, 71.933);
  1009. CreateDynamicObject(4113, 1295.8, -1547.9, 51.2, 354.169, 298.712, 356.743);
  1010. CreateDynamicObject(11340, 1307.9, -1566.4, 11.1, 358.248, 357.99, 95.684);
  1011. CreateDynamicObject(3866, 1332.1, -1592.6, 19.9, 0, 0, 349.5);
  1012. CreateDynamicObject(7344, 1359.6, -1518.2, -8.4, 58, 0, 52);
  1013. CreateDynamicObject(11340, 1363.7, -1515.2, 9.6, 0.5, 359.74, 336.998);
  1014. CreateDynamicObject(7344, 1372.6, -1470.3, -6.4, 53.331, 6.288, 56.945);
  1015. CreateDynamicObject(11340, 1372.2, -1488.5, 9.2, 0.494, 359.736, 350.995);
  1016. CreateDynamicObject(5995, 1128.8, -1400.8, 3.4, 0, 9.25, 0);
  1017. CreateDynamicObject(5995, 1130.9, -1400.7, 8.2, 0.249, 355.495, 0.02);
  1018. CreateDynamicObject(16303, 1167.9, -1381.1, 6.6, 0, 0, 10);
  1019. }
  1020. case NATDIS_MAPAREA_EASTLS:
  1021. {
  1022. CreateDynamicObject(7347, 2160.3, -1777, 3.3, 0, 98.25, 42);
  1023. CreateDynamicObject(11340, 2103.7, -1795.5, 9.7, 0, 0, 0);
  1024. CreateDynamicObject(11340, 2176.1001, -1773.9, 9.7, 0, 0.25, 0);
  1025. CreateDynamicObject(11340, 2111.2, -1730, 10.6, 0, 358.997, 0);
  1026. CreateDynamicObject(11340, 2046.5, -1738.2, 10.3, 0, 358.995, 176);
  1027. CreateDynamicObject(10985, 2104.3, -1817.3, 14, 0, 0, 0);
  1028. CreateDynamicObject(10985, 2106.1001, -1795.9, 13.9, 0, 0, 0);
  1029. CreateDynamicObject(10985, 2092.5, -1768.9, 13.9, 0, 0, 0);
  1030. CreateDynamicObject(10985, 2081.2, -1767.5, 13.9, 0, 0, 0);
  1031. CreateDynamicObject(10985, 2072.6001, -1769.3, 13.1, 0, 0, 0);
  1032. CreateDynamicObject(18450, 2020.9, -1752.4, -10.8, 0, 310, 0);
  1033. CreateDynamicObject(18450, 2049.7, -1750.2, 9.4, 336.35, 349.615, 355.795);
  1034. CreateDynamicObject(18450, 2139.5, -1747.3, 9.4, 336.276, 9.284, 3.761);
  1035. CreateDynamicObject(18450, 2081.5, -1835.1, 9.4, 336.346, 349.612, 88.792);
  1036. CreateDynamicObject(18450, 2110.3, -1686.2, 10.1, 35.964, 357.206, 182.642);
  1037. CreateDynamicObject(3865, 2083.8999, -1696.3, 14.3, 0, 0, 0);
  1038. CreateDynamicObject(3865, 2100.3, -1719.1, 13.2, 316.135, 93.854, 95.552);
  1039. CreateDynamicObject(3865, 2090.5, -1763.5, 13.2, 316.132, 93.851, 163.548);
  1040. CreateDynamicObject(3865, 2089, -1775, 13.2, 352.017, 90.561, 26.038);
  1041. CreateDynamicObject(3865, 2079.3999, -1773.2, 13.2, 352.013, 90.56, 334.038);
  1042. CreateDynamicObject(3865, 2083.7, -1773.5, 12.9, 352.007, 90.555, 0.034);
  1043. CreateDynamicObject(3865, 2083.7002, -1773.5, 12.9, 352.002, 90.549, 0.033);
  1044. CreateDynamicObject(7916, 2081.3, -1784.8, 11.5, 0, 0, 0);
  1045. CreateDynamicObject(3865, 2111, -1772.8, 15.4, 352.013, 90.56, 358.038);
  1046. CreateDynamicObject(3865, 2108, -1771.9, 15.4, 352.007, 90.555, 326.033);
  1047. CreateDynamicObject(10985, 2116.5, -1765.1, 13.9, 0, 0, 0);
  1048. CreateDynamicObject(10985, 2123.1001, -1779.7, 13.9, 0, 0, 0);
  1049. CreateDynamicObject(10985, 2110.8, -1767.4, 15.4, 21.992, 1.618, 359.394);
  1050. CreateDynamicObject(18450, 2135.6001, -1755.9, 6.4, 282.772, 51.711, 51.006);
  1051. CreateDynamicObject(18450, 2084.7, -1701.3, 10.1, 336.346, 349.612, 259.792);
  1052. CreateDynamicObject(11340, 2525, -1668.9, -10.4, 0, 0, 0);
  1053. CreateDynamicObject(11340, 2480.5, -1667.5, -10.8, 0, 0, 0);
  1054. CreateDynamicObject(18450, 2431.8999, -1654.2, 8.3, 318.237, 337.619, 328.663);
  1055. CreateDynamicObject(18450, 2463.7, -1663.6, 7.1, 316.003, 358.954, 83.275);
  1056. CreateDynamicObject(16057, 2433.3, -1616.5, -26, 1.747, 356.498, 236.357);
  1057. CreateDynamicObject(16057, 2413.8999, -1694, -23.4, 0, 353.5, 295.499);
  1058. CreateDynamicObject(16057, 2434, -1739.3, -23.5, 0.249, 355.996, 336.261);
  1059. CreateDynamicObject(16057, 2538, -1600.2, -25.8, 352.497, 358.484, 152.05);
  1060. CreateDynamicObject(18450, 2471.5, -1693.4, 3.8, 276.134, 191.825, 201.758);
  1061. CreateDynamicObject(18450, 2512.1001, -1689.2, 4.5, 276.13, 191.821, 267.758);
  1062. CreateDynamicObject(18450, 2500.3999, -1652.5, 4.9, 276.125, 191.821, 327.753);
  1063. CreateDynamicObject(18450, 2504.5, -1649.1, 4.4, 276.816, 151.489, 287.653);
  1064. CreateDynamicObject(18450, 2486.6001, -1676.4, -15.6, 355.038, 44.962, 273.431);
  1065. CreateDynamicObject(18450, 2484.1001, -1648.2, 4.9, 276.125, 191.821, 7.75);
  1066. CreateDynamicObject(17026, 2489.3999, -1649.7, -8.5, 0, 0, 38);
  1067. CreateDynamicObject(17026, 2467, -1684.3, -7, 0, 0, 37.996);
  1068. CreateDynamicObject(17026, 2458.6001, -1682.9, -7, 0, 0, 37.996);
  1069. CreateDynamicObject(3865, 2485, -1661.8, 4.7, 0, 0, 62);
  1070. CreateDynamicObject(7916, 2470.5, -1675.3, 6.6, 0, 2, 56);
  1071. CreateDynamicObject(7916, 2487.3999, -1677.4, 2.3, 0, 2, 55.997);
  1072. CreateDynamicObject(3865, 2486.3999, -1658.4, 4.7, 0, 0, 61.996);
  1073. CreateDynamicObject(3865, 2466.8, -1656.8, 8.9, 0, 0, 83.996);
  1074. CreateDynamicObject(3865, 2466.3999, -1660.3, 8.9, 0, 0, 83.99);
  1075. CreateDynamicObject(3865, 2467.1001, -1666.1, 8.9, 0, 0, 57.99);
  1076. CreateDynamicObject(17026, 2479.8999, -1654.9, -19, 0, 336, 301.996);
  1077. CreateDynamicObject(11340, 2417, -1689.9, 9.3, 0, 0, 0);
  1078. CreateDynamicObject(11340, 2296.8999, -1745.5, 9.3, 0, 0, 180.5);
  1079. CreateDynamicObject(11340, 2292.7, -1755.2, 9.2, 0, 0, 4.5);
  1080. CreateDynamicObject(11340, 2235.8999, -1758.9, 9.3, 0, 359.25, 4.499);
  1081. CreateDynamicObject(18450, 2294.1001, -1727.6, 8.3, 318.235, 337.615, 328.662);
  1082. CreateDynamicObject(18450, 2266.3, -1753.5, 8.3, 318.235, 337.615, 156.662);
  1083. CreateDynamicObject(5513, 2201, -1749.9, 11.5, 354.409, 333.363, 357.202);
  1084. CreateDynamicObject(11340, 2235, -1800.9, 9.4, 0, 359.247, 4.499);
  1085. CreateDynamicObject(18450, 2199.5, -1759.2, 11.1, 25.625, 354.17, 268.784);
  1086. CreateDynamicObject(17657, 2431.3, -1601.7, 14.4, 11.747, 1.277, 359.74);
  1087. CreateDynamicObject(18450, 2423.5, -1629, -12.1, 357.505, 273.439, 242.325);
  1088. CreateDynamicObject(18450, 2434.6001, -1630.4, -9.1, 357.501, 273.433, 268.325);
  1089. CreateDynamicObject(11340, 2428.6001, -1661.8, 9.5, 359.251, 357.5, 269.967);
  1090. CreateDynamicObject(10985, 2361.1001, -1656.5, 13.1, 0, 0, 0);
  1091. CreateDynamicObject(10985, 2383.1001, -1659.6, 13.1, 0, 0, 0);
  1092. CreateDynamicObject(10985, 2353.8, -1729.6, 13.1, 0, 0, 0);
  1093. CreateDynamicObject(10985, 2351.6001, -1755.6, 13.1, 0, 0, 0);
  1094. CreateDynamicObject(10985, 2325.2, -1743, 13.1, 0, 0, 0);
  1095. CreateDynamicObject(10985, 2248.3, -1731.6, 13.1, 0, 0, 0);
  1096. CreateDynamicObject(10985, 2177.8, -1734.8, 13.1, 0, 0, 0);
  1097. CreateDynamicObject(10985, 2184.7, -1737.5, 13.1, 0, 0, 0);
  1098. CreateDynamicObject(10985, 2206.8999, -1726, 12.4, 0, 0, 0);
  1099. }
  1100. case NATDIS_MAPAREA_COMMERCE:
  1101. {
  1102. CreateDynamicObject(11340, 1513.4, -1631.4, 8.7, 0, 0, 0);
  1103. CreateDynamicObject(11340, 1434.4, -1626.8, 10.4, 0, 0, 180);
  1104. CreateDynamicObject(11340, 1436.3, -1691, 10, 0, 0, 179.995);
  1105. CreateDynamicObject(11340, 1522, -1689.3, 9.7, 0, 0, 0.245);
  1106. CreateDynamicObject(11340, 1485.7, -1651.9, 10.1, 0, 0, 266.75);
  1107. CreateDynamicObject(11340, 1603.3, -1696.5, 9.3, 0, 0, 0.242);
  1108. CreateDynamicObject(10985, 1554.4, -1700.5, 14.4, 0, 0, 0);
  1109. CreateDynamicObject(10985, 1557.4, -1662.2, 14.4, 0, 0, 0);
  1110. CreateDynamicObject(10985, 1548.2, -1719.2, 13.4, 0, 0, 0);
  1111. CreateDynamicObject(10985, 1544.6, -1734.2, 13.4, 0, 0, 186);
  1112. CreateDynamicObject(10985, 1587.3, -1731.6, 13.4, 0, 0, 185.999);
  1113. CreateDynamicObject(10985, 1521.6, -1717.5, 12.9, 0, 0, 185.999);
  1114. CreateDynamicObject(10985, 1531.2, -1653.5, 12.9, 0, 0, 185.999);
  1115. CreateDynamicObject(17034, 1474.2, -1647.1, -2.6, 0, 0, 0);
  1116. CreateDynamicObject(17034, 1481.2, -1643.2, -2.6, 0, 0, 92);
  1117. CreateDynamicObject(17034, 1489.8, -1636.7, -2.6, 0, 0, 186);
  1118. CreateDynamicObject(17034, 1489, -1630.4, -7.3, 0, 356, 185.999);
  1119. CreateDynamicObject(17034, 1469.5, -1643.7, -2.6, 0, 358, 58);
  1120. CreateDynamicObject(17034, 1477.9, -1651.5, -1.6, 0, 355.995, 57.997);
  1121. CreateDynamicObject(17034, 1490.9, -1622.8, -2.6, 0, 0, 92);
  1122. CreateDynamicObject(18450, 1528.5, -1636.9, 6.4, 67.657, 349.426, 97.796);
  1123. CreateDynamicObject(18450, 1488.1, -1595.4, 6.4, 272.655, 318.74, 315.769);
  1124. CreateDynamicObject(18450, 1526.9, -1683.7, 6.4, 67.948, 356, 91.707);
  1125. CreateDynamicObject(18450, 1482.2, -1732.3, 6.4, 67.945, 355.995, 3.703);
  1126. CreateDynamicObject(18450, 1427.1, -1731.4, 10.2, 66.726, 340.031, 21.693);
  1127. CreateDynamicObject(11340, 1391.3, -1759.7, 9.2, 0, 0, 179.995);
  1128. CreateDynamicObject(11340, 1443, -1764.4, 9.2, 0, 0, 179.995);
  1129. CreateDynamicObject(11340, 1479.9, -1752.8, 9.2, 0, 0, 201.495);
  1130. CreateDynamicObject(10985, 1475.5, -1737.7, 12.9, 0, 0, 185.999);
  1131. CreateDynamicObject(10985, 1399.7, -1729, 12.9, 0, 0, 185.999);
  1132. CreateDynamicObject(10985, 1462.4, -1728.9, 13.5, 0, 0, 185.999);
  1133. CreateDynamicObject(4186, 1482.43201, -1696.39392, 12.08902, 356.85840, 0.00000, 5.90668);
  1134. CreateDynamicObject(3985, 1470.64819, -1632.44666, 9.40672, 356.85840, 0.00000, 3.14159);
  1135. }
  1136. case NATDIS_MAPAREA_MARKET:
  1137. {
  1138. CreateDynamicObject(16303, 1142.8, -1380.7, 7.4, 0, 6.5, 9.998);
  1139. CreateDynamicObject(16084, 1121.9, -1399.6, 3.7, 0, 344.75, 4);
  1140. CreateDynamicObject(18451, 1113.4, -1404.9, 7.1, 0, 7.5, 174);
  1141. CreateDynamicObject(17565, 1130.5, -1402, 9.9, 0, 0, 270);
  1142. CreateDynamicObject(17565, 1101, -1402.1, 9.9, 0, 0, 270);
  1143. CreateDynamicObject(16302, 1111.8, -1385.8, 7, 0, 0, 0);
  1144. CreateDynamicObject(16302, 1175.3, -1420.2, 12.5, 0, 0, 0);
  1145. CreateDynamicObject(16766, 1113.7, -1414.1, 9.9, 0, 1, 0);
  1146. CreateDynamicObject(16766, 1115.3, -1392.6, 9.9, 0, 1, 10);
  1147. CreateDynamicObject(16384, 1110.9, -1383.9, 4.6, 89.099, 236.312, 123.691);
  1148. CreateDynamicObject(16384, 1102.4, -1418.1, 4.6, 89.44, 153.941, 26.554);
  1149. CreateDynamicObject(11340, 1139.4, -1409.5, 5.3, 0, 0.495, 0);
  1150. CreateDynamicObject(18450, 1173.1, -1400.1, -5.2, 17.44, 51.445, 342.892);
  1151. CreateDynamicObject(16302, 1157.1, -1400.1, 10.3, 0, 342, 0);
  1152. CreateDynamicObject(11340, 1171.3, -1404.7, 6.1, 354.005, 357.733, 273.763);
  1153. CreateDynamicObject(16302, 1134.4, -1411.4, 8.8, 0, 0, 0);
  1154. CreateDynamicObject(3865, 1110.8, -1387.7, 9, 0, 0, 0);
  1155. CreateDynamicObject(3865, 1088, -1406.7, 9, 334.223, 8.056, 91.522);
  1156. CreateDynamicObject(7347, 1142.5, -1419.5, -23.2, 72.381, 296.265, 62.627);
  1157. CreateDynamicObject(7916, 1109.2, -1396.1, 8.4, 0, 2, 0);
  1158. CreateDynamicObject(7916, 1097.6, -1410, 8.4, 0, 2, 84);
  1159. CreateDynamicObject(11340, 1083.3, -1387.8, 8.1, 0, 351.494, 338.25);
  1160. CreateDynamicObject(3865, 1084.9, -1397.8, 9, 334.221, 8.053, 91.522);
  1161. CreateDynamicObject(3865, 1091.4, -1384.5, 9, 334.221, 8.053, 61.522);
  1162. CreateDynamicObject(18450, 1087.5, -1400.8, -12.4, 332.558, 61.865, 197.497);
  1163. CreateDynamicObject(5811, 1127.3, -1380.5, 13.5, 355.114, 287.345, 344.746);
  1164. CreateDynamicObject(16302, 1124.4, -1379.5, 9.6, 328.542, 348.253, 193.807);
  1165. CreateDynamicObject(615, 1150, -1418.2, 11.9, 0, 324, 347.397);
  1166. CreateDynamicObject(11340, 1247.8, -1372, 5.3, 354.001, 357.731, 269.763);
  1167. CreateDynamicObject(11340, 1252, -1323.6, 5.3, 353.996, 357.731, 269.758);
  1168. CreateDynamicObject(11340, 1212, -1291.4, 5.6, 354.01, 355.469, 89.522);
  1169. CreateDynamicObject(1395, 1228.3, -1316.8, 15.5, 359.336, 276.466, 69.287);
  1170. CreateDynamicObject(16084, 1211.8, -1348.9, 7, 0, 359.995, 255.999);
  1171. CreateDynamicObject(16084, 1226.9, -1322.3, 6.2, 6.748, 1.253, 71.851);
  1172. CreateDynamicObject(10675, 1238.4, -1376.9, 9.7, 0, 0, 0);
  1173. CreateDynamicObject(11340, 1253.2, -1393.3, 5.3, 353.995, 357.983, 269.785);
  1174. CreateDynamicObject(16302, 1221.4, -1293.2, 11.3, 0, 0, 0);
  1175. CreateDynamicObject(16084, 1225.7, -1289.7, 6.2, 6.628, 349.171, 27.263);
  1176. CreateDynamicObject(899, 1225.3, -1371.6, 7.5, 0, 0, 0);
  1177. CreateDynamicObject(899, 1231.2, -1352.7, 8.8, 0, 0, 72);
  1178. CreateDynamicObject(899, 1230.4, -1331.5, 8.8, 0, 0, 71.999);
  1179. CreateDynamicObject(899, 1226.6, -1318, 8.8, 0, 0, 85.999);
  1180. CreateDynamicObject(899, 1231.3, -1301.6, 8.3, 0, 354, 197.995);
  1181. CreateDynamicObject(623, 1034, -1391.1, 11.4, 318.031, 2.69, 187.8);
  1182. CreateDynamicObject(10985, 1031.3, -1388.9, 13.1, 0, 0, 0);
  1183. CreateDynamicObject(10985, 951.90002, -1410.8, 13.1, 0, 0, 0);
  1184. CreateDynamicObject(10985, 873.09998, -1413.6, 13.1, 0, 0, 0);
  1185. CreateDynamicObject(10985, 825.79999, -1393.2, 13.1, 0, 0, 0);
  1186. CreateDynamicObject(621, 873.90002, -1412.4, 11.6, 0, 84, 141.995);
  1187. CreateDynamicObject(621, 828.20001, -1388.9, 11.9, 0, 86.746, 239.993);
  1188. CreateDynamicObject(621, 956.29999, -1413.6, 11.6, 0, 73.996, 141.993);
  1189. CreateDynamicObject(6342, 324, -1513.5, 54.2, 358.253, 356.498, 359.393);
  1190. CreateDynamicObject(10985, 346.60001, -1491.3, 35.2, 356.503, 2.254, 37.638);
  1191. CreateDynamicObject(10985, 314.5, -1520.9, 36.6, 2.994, 358.494, 52.828);
  1192. CreateDynamicObject(16303, 350.20001, -1466.2, 30.9, 0, 354, 313.25);
  1193. CreateDynamicObject(16303, 288.10001, -1556, 31.4, 0, 348.996, 7.248);
  1194. CreateDynamicObject(11340, 333.5, -1509.2, 29.7, 0, 358.494, 66);
  1195. CreateDynamicObject(18450, 335, -1547.1, 5.9, 0, 302, 48);
  1196. CreateDynamicObject(18450, 359.10001, -1507.9, 5.9, 0, 301.998, 249.999);
  1197. CreateDynamicObject(10985, 366.70001, -1527.9, 32.5, 356.501, 2.252, 253.634);
  1198. CreateDynamicObject(10985, 359.10001, -1505, 32.5, 356.501, 2.247, 331.63);
  1199. CreateDynamicObject(10985, 347.39999, -1562.8, 32.5, 356.501, 2.241, 331.628);
  1200. CreateDynamicObject(6300, 378.5, -2050.2, 2.2, 352.532, 5.295, 0.69);
  1201. CreateDynamicObject(6189, 850, -1998.2, 1.4, 0, 38, 0);
  1202. CreateDynamicObject(6189, 826, -1998.7, 2.9, 0, 317.996, 358);
  1203. CreateDynamicObject(6188, 852.09998, -1874.4, 1, 0, 9.75, 0);
  1204. CreateDynamicObject(6188, 824, -1871.4, 1, 0, 325.745, 0);
  1205. CreateDynamicObject(5481, 486.89999, -1712.6, 8.2, 0, 354, 0);
  1206. CreateDynamicObject(5481, 580, -1752.7, 5.4, 2.979, 6.755, 332.147);
  1207. CreateDynamicObject(10985, 524.20001, -1727.8, 12.3, 0, 0, 0);
  1208. CreateDynamicObject(10985, 458.20001, -1700.1, 10.6, 0, 0, 0);
  1209. CreateDynamicObject(10985, 453.39999, -1713, 10.6, 3.498, 357.996, 0.122);
  1210. CreateDynamicObject(17026, 616.5, -1185.5, 5.9, 0, 0, 256);
  1211. CreateDynamicObject(17026, 590.5, -1177.1, 7.9, 0, 0, 111.998);
  1212. CreateDynamicObject(17026, 618.5, -1173.3, 7.9, 0, 0, 111.995);
  1213. CreateDynamicObject(17026, 106.4, -1270.3, 7.1, 0, 0, 0);
  1214. CreateDynamicObject(17026, 100.8, -1246.5, 7.1, 0, 0, 0);
  1215. CreateDynamicObject(11340, 1019.9, -1371.6, 9.9, 0, 358.741, 0.247);
  1216. CreateDynamicObject(11340, 1031.4, -1291.5, 10.6, 0, 358.737, 179.992);
  1217. CreateDynamicObject(7347, 1026.8, -1339.5, -4.7, 49.212, 346.534, 282.276);
  1218. CreateDynamicObject(7347, 1067.1, -1322.5, -43.5, 30.191, 165.502, 47.403);
  1219. CreateDynamicObject(5995, 1131.20349, -1400.71777, 2.77620, 0.00000, 350.00000, 0.00000);
  1220. CreateDynamicObject(5995, 1129.14209, -1400.70569, 2.56870, 0.00000, 10.00000, 0.00000);
  1221. }
  1222. case NATDIS_MAPAREA_BRIDGES:
  1223. {
  1224. CreateDynamicObject(16430, 567.40002, 405.5, 7.1, 0, 352, 304.997);
  1225. CreateDynamicObject(3331, 535, 433.5, -4.1, 329.5, 0, 34.997);
  1226. CreateDynamicObject(8056, 1737.6, 519.70001, 27.1, 1.486, 7.753, 0.298);
  1227. CreateDynamicObject(8128, 1736.1, 519, 6.2, 0.495, 8, 359.18);
  1228. CreateDynamicObject(3411, 2770.7, 361.60001, -7.5, 0, 350, 0);
  1229. CreateDynamicObject(16358, -220.7, 169.39999, -8.1, 0, 347, 75.245);
  1230. CreateDynamicObject(16358, -225.89999, 149, -7.6, 0, 350.998, 75.24);
  1231. CreateDynamicObject(17002, 53.5, -1533.9, 6.6, 9.93, 353.147, 12.233);
  1232. CreateDynamicObject(17034, 40.6, -1515.1, -14.1, 0, 0, 0);
  1233. CreateDynamicObject(17034, 43.4, -1511.7, -14.1, 0, 4, 336);
  1234. CreateDynamicObject(17034, 46.4, -1538.1, -14.1, 0, 3.999, 335.995);
  1235. CreateDynamicObject(17034, 49.7, -1514.4, -9.4, 0, 181.999, 335.995);
  1236. }
  1237. }
  1238. }
  1239. }
  1240. }
  1241. NatDis_RemoveBuildings(playerid, iNasType, iArea)
  1242. {
  1243. switch(iNasType)
  1244. {
  1245. case TYPE_EARTHQUAKE:
  1246. {
  1247. switch(iArea)
  1248. {
  1249. case 0:
  1250. {
  1251. // #include "Map_NatDis/Earthquake/RemoveBuildings/EQ_Downtown.pwn"
  1252. RemoveBuildingForPlayer(playerid, 1290, 1614.9844, -1303.9375, 42.6797, 100.0);
  1253. RemoveBuildingForPlayer(playerid, 3999, 1785.9766, -1564.8594, 25.2500, 0.25);
  1254. RemoveBuildingForPlayer(playerid, 4009, 1421.3750, -1477.6016, 42.2031, 0.25);
  1255. RemoveBuildingForPlayer(playerid, 4042, 1593.9531, -1416.3516, 26.6641, 0.25);
  1256. RemoveBuildingForPlayer(playerid, 4081, 1734.3047, -1560.7109, 18.8828, 0.25);
  1257. RemoveBuildingForPlayer(playerid, 4116, 1345.6250, -1552.9609, 48.5156, 0.25);
  1258. RemoveBuildingForPlayer(playerid, 4131, 1588.4453, -1509.1406, 27.3125, 0.25);
  1259. RemoveBuildingForPlayer(playerid, 4132, 1588.4453, -1509.1406, 27.3125, 0.25);
  1260. RemoveBuildingForPlayer(playerid, 4221, 1406.7109, -1499.5625, 69.1563, 0.25);
  1261. RemoveBuildingForPlayer(playerid, 4113, 1345.6250, -1552.9609, 48.5156, 0.25);
  1262. RemoveBuildingForPlayer(playerid, 4007, 1421.3750, -1477.6016, 42.2031, 0.25);
  1263. RemoveBuildingForPlayer(playerid, 3990, 1593.9531, -1416.3516, 26.6641, 0.25);
  1264. RemoveBuildingForPlayer(playerid, 3998, 1734.3047, -1560.7109, 18.8828, 0.25);
  1265. RemoveBuildingForPlayer(playerid, 4079, 1785.9766, -1564.8594, 25.2500, 0.25);
  1266. RemoveBuildingForPlayer(playerid, 4563, 1567.6016, -1248.6953, 102.5234, 0.25);
  1267. RemoveBuildingForPlayer(playerid, 4566, 1567.6016, -1248.6953, 102.5234, 0.25);
  1268. RemoveBuildingForPlayer(playerid, 4578, 1496.8203, -1265.9531, 61.3516, 0.25);
  1269. RemoveBuildingForPlayer(playerid, 4580, 1671.5078, -1343.3359, 87.5391, 0.25);
  1270. RemoveBuildingForPlayer(playerid, 4606, 1825.0000, -1413.9297, 12.5547, 0.25);
  1271. RemoveBuildingForPlayer(playerid, 4629, 1405.1172, -1191.4063, 85.0313, 0.25);
  1272. RemoveBuildingForPlayer(playerid, 4663, 1624.8203, -1229.8594, 34.0859, 0.25);
  1273. RemoveBuildingForPlayer(playerid, 4664, 1643.1641, -1128.2344, 41.5625, 0.25);
  1274. RemoveBuildingForPlayer(playerid, 4665, 1643.1641, -1128.2344, 41.5625, 0.25);
  1275. RemoveBuildingForPlayer(playerid, 4715, 1567.7188, -1248.6953, 102.5234, 0.25);
  1276. RemoveBuildingForPlayer(playerid, 4723, 1496.8203, -1265.9531, 61.3516, 0.25);
  1277. RemoveBuildingForPlayer(playerid, 4725, 1406.2266, -1194.4063, 22.8203, 0.25);
  1278. RemoveBuildingForPlayer(playerid, 4747, 1671.5078, -1343.3359, 87.5391, 0.25);
  1279. RemoveBuildingForPlayer(playerid, 4586, 1405.1172, -1191.4063, 85.0313, 0.25);
  1280. RemoveBuildingForPlayer(playerid, 4570, 1496.8203, -1265.9531, 61.3516, 0.25);
  1281. RemoveBuildingForPlayer(playerid, 4594, 1825.0000, -1413.9297, 12.5547, 0.25);
  1282. RemoveBuildingForPlayer(playerid, 4602, 1671.5078, -1343.3359, 87.5391, 0.25);
  1283. RemoveBuildingForPlayer(playerid, 1290, 1624.4297, -1226.6484, 56.1016, 0.25);
  1284. RemoveBuildingForPlayer(playerid, 4662, 1624.8203, -1229.8594, 34.0859, 0.25);
  1285. }
  1286. case 1:
  1287. {
  1288. // #include "Map_NatDis/Earthquake/RemoveBuildings/EQ_EastLS.pwn"
  1289. RemoveBuildingForPlayer(playerid, 17835, 2431.0391, -1603.4922, 20.2031, 0.25);
  1290. RemoveBuildingForPlayer(playerid, 17858, 2489.2969, -1668.5000, 12.2969, 0.25);
  1291. RemoveBuildingForPlayer(playerid, 17613, 2489.2969, -1668.5000, 12.2969, 0.25);
  1292. RemoveBuildingForPlayer(playerid, 17971, 2484.5313, -1667.6094, 21.4375, 0.25);
  1293. RemoveBuildingForPlayer(playerid, 17657, 2431.0391, -1603.4922, 20.2031, 0.25);
  1294. RemoveBuildingForPlayer(playerid, 17898, 2431.0391, -1603.4922, 20.2031, 0.25);
  1295. }
  1296. case 2:
  1297. {
  1298. // #include "Map_NatDis/Earthquake/RemoveBuildings/EQ_Commerce.pwn"
  1299. RemoveBuildingForPlayer(playerid, 4057, 1479.5547, -1693.1406, 19.5781, 0.25);
  1300. RemoveBuildingForPlayer(playerid, 4210, 1479.5625, -1631.4531, 12.0781, 0.25);
  1301. RemoveBuildingForPlayer(playerid, 4186, 1479.5547, -1693.1406, 19.5781, 0.25);
  1302. RemoveBuildingForPlayer(playerid, 3985, 1479.5625, -1631.4531, 12.0781, 0.25);
  1303. }
  1304. case 3:
  1305. {
  1306. // #include "Map_NatDis/Earthquake/RemoveBuildings/EQ_Market.pwn"
  1307. RemoveBuildingForPlayer(playerid, 1297, 1161.1563, -1390.1172, 15.6406, 100.25);
  1308. RemoveBuildingForPlayer(playerid, 5812, 1230.8906, -1337.9844, 12.5391, 0.25);
  1309. RemoveBuildingForPlayer(playerid, 5995, 1130.0547, -1400.7031, 12.5234, 0.25);
  1310. RemoveBuildingForPlayer(playerid, 5997, 1130.0547, -1400.7031, 12.5234, 0.25);
  1311. RemoveBuildingForPlayer(playerid, 5811, 1131.1953, -1380.4219, 17.0703, 0.25);
  1312. RemoveBuildingForPlayer(playerid, 6475, 322.4219, -1514.9922, 55.2891, 0.25);
  1313. RemoveBuildingForPlayer(playerid, 6342, 322.4219, -1514.9922, 55.2891, 0.25);
  1314. }
  1315. case 4:
  1316. {
  1317. // #include "Map_NatDis/Earthquake/RemoveBuildings/EQ_Bridges.pwn"
  1318. RemoveBuildingForPlayer(playerid, 8028, 1735.8594, 519.1563, 25.1563, 0.25);
  1319. RemoveBuildingForPlayer(playerid, 8056, 1735.8594, 519.1563, 25.1563, 0.25);
  1320. RemoveBuildingForPlayer(playerid, 8128, 1735.8750, 519.0078, 4.3594, 0.25);
  1321. RemoveBuildingForPlayer(playerid, 8129, 1735.8750, 519.0078, 4.3594, 0.25);
  1322. RemoveBuildingForPlayer(playerid, 3332, 537.1953, 434.4063, 24.5547, 0.25);
  1323. RemoveBuildingForPlayer(playerid, 16432, 566.8984, 406.3750, 17.5859, 0.25);
  1324. RemoveBuildingForPlayer(playerid, 3382, -176.3516, 367.5234, 17.6953, 0.25);
  1325. RemoveBuildingForPlayer(playerid, 3382, -196.7891, 290.1797, 17.6953, 0.25);
  1326. RemoveBuildingForPlayer(playerid, 16688, -168.3203, 367.2422, 10.6641, 0.25);
  1327. RemoveBuildingForPlayer(playerid, 3381, -196.7891, 290.1797, 17.6953, 0.25);
  1328. RemoveBuildingForPlayer(playerid, 3381, -176.3516, 367.5234, 17.6953, 0.25);
  1329. RemoveBuildingForPlayer(playerid, 16358, -168.3203, 367.2422, 10.6641, 0.25);
  1330. RemoveBuildingForPlayer(playerid, 3331, 537.1953, 434.4063, 24.5547, 0.25);
  1331. RemoveBuildingForPlayer(playerid, 16430, 566.8984, 406.3750, 17.5859, 0.25);
  1332. RemoveBuildingForPlayer(playerid, 13317, 2766.8594, 468.0469, 7.3203, 0.25);
  1333. RemoveBuildingForPlayer(playerid, 3413, 2766.7578, 364.9531, -4.4922, 0.25);
  1334. RemoveBuildingForPlayer(playerid, 3413, 2766.7578, 463.9922, -4.4922, 0.25);
  1335. RemoveBuildingForPlayer(playerid, 12831, 2766.8594, 468.0469, 7.3203, 0.25);
  1336. RemoveBuildingForPlayer(playerid, 3411, 2766.7578, 463.9922, -4.4922, 0.25);
  1337. RemoveBuildingForPlayer(playerid, 3412, 2766.7578, 464.1563, -4.4922, 0.25);
  1338. RemoveBuildingForPlayer(playerid, 17002, 52.8906, -1532.0313, 7.7422, 0.25);
  1339. RemoveBuildingForPlayer(playerid, 4250, -188.9609, 288.2578, -44.9922, 0.25);
  1340. RemoveBuildingForPlayer(playerid, 4385, -188.9609, 288.2578, -44.9922, 0.25);
  1341. }
  1342. }
  1343. }
  1344. }
  1345. format(szMiscArray, sizeof(szMiscArray), "Successfully loaded mapping: NastType: %i | Area: %i", iNasType, iArea);
  1346. SendClientMessage(playerid, COLOR_YELLOW, szMiscArray);
  1347. }
  1348. NatDis_EditZones(playerid, iZoneTypeID) {
  1349. szMiscArray[0] = 0;
  1350. new szStatus[32];
  1351. SetPVarInt(playerid, "_EditingZoneType", iZoneTypeID);
  1352. switch(iZoneTypeID)
  1353. {
  1354. case 1:
  1355. {
  1356. for(new i; i < sizeof(gMainZones); ++i) {
  1357. switch(NatDis[i][nat_iStatus]) // needs rework
  1358. {
  1359. case 1: szStatus = "{FF0000}Quake Zone";
  1360. case 2: szStatus = "{FFF000}Evacuation Zone";
  1361. case 3: szStatus = "{00FF00}Safe Zone";
  1362. default: szStatus = "{FFFFFF}Inactive Zone";
  1363. }
  1364. format(szMiscArray, sizeof(szMiscArray), "{FFFFFF}%s%s\t%s\n", szMiscArray, gMainZones[i][SAZONE_NAME], szStatus);
  1365. }
  1366. }
  1367. case 2:
  1368. {
  1369. for(new i; i < sizeof(gLocalZones); ++i)
  1370. {
  1371. switch(NatDis[i][nat_iStatus]) // needs rework
  1372. {
  1373. case 1: szStatus = "{FF0000}Quake Zone";
  1374. case 2: szStatus = "{FFF000}Evacuation Zone";
  1375. case 3: szStatus = "{00FF00}Safe Zone";
  1376. default: szStatus = "{FFFFFF}Inactive Zone";
  1377. }
  1378. format(szMiscArray, sizeof(szMiscArray), "{FFFFFF}%s%s\t%s\n", szMiscArray, gLocalZones[i][SAZONE_NAME], szStatus);
  1379. }
  1380. }
  1381. }
  1382. return ShowPlayerDialogEx(playerid, DIALOG_NATDIS_EDITZONE, DIALOG_STYLE_TABLIST, "Natural Disaster | Edit Zones", szMiscArray, "Cancel", "Select");
  1383. }
  1384. CMD:natdis(playerid, params[])
  1385. {
  1386. if(!IsAdminLevel(playerid, ADMIN_EXECUTIVE)) return 1;
  1387. NatDis_MainMenu(playerid);
  1388. return 1;
  1389. }