gangzones.inc 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639
  1. /*
  2. Interactive Gangzones (gangzones.inc)
  3. * Add boders to your gangzones and fully customizable gangzones. New dynamic functions for gangzones.
  4. Author: (creator)
  5. * Gammix
  6. Contributors:
  7. * Pottus - Virtual world fixing
  8. * Y_Less - Hooking suggestion
  9. * Incognito - Streamer plugin, used dynamic areas
  10. (c) Copyright 2015
  11. * This file is provided as is (no warranties).
  12. */
  13. /*
  14. FUNCTIONS:
  15. native GangZoneCreate(Float:minx, Float:miny, Float:maxx, Float:maxy, color = -1, interior = -1, virtualworld = -1, Float:bordersize = 1.0, bordercolor = 0x00000060);
  16. native GangZoneDestory(zone);
  17. native GangZoneExist(zone);
  18. native GangZoneShowForPlayer(playerid, zone, color = -1, bordercolor = -1);
  19. native GangZoneShowForAll(zone, color = -1, bordercolor = -1);
  20. native GangZoneHideForPlayer(playerid, zone);
  21. native GangZoneHideForAll(zone);
  22. native GangZoneSetColorForPlayer(playerid, zone, color, bordercolor = -1);
  23. native GangZoneSetColorForAll(zone, color, bordercolor = -1);
  24. native GangZoneFlashForPlayer(playerid, zone, flashcolor);
  25. native GangZoneFlashForAll(zone, flashcolor);
  26. native GangZoneStopFlashForPlayer(playerid, zone);
  27. native GangZoneStopFlashForAll(zone);
  28. native GangZoneSetInterior(zone, interior);
  29. native GangZoneGetInterior(zone);
  30. native GangZoneSetVirtualWorld(zone, virtualworld);
  31. native GangZoneGetVirtualWorld(zone);
  32. native CountAllGangZones();
  33. native DestroyAllGangZones();
  34. native ShowAllGangZonesForPlayer(playerid, color = -1, bordercolor = -1);
  35. native ShowAllGangZonesForAll(color = -1, bordercolor = -1);
  36. native HideAllGangZonesForPlayer(playerid);
  37. native HideAllGangZonesForAll();
  38. native IsPlayerInGangZone(playerid, zone);
  39. native IsPlayerInAnyGangZone(playerid);
  40. native GetPlayerGangZone(playerid);
  41. CALLBACKS:
  42. public OnPlayerEnterGangZone(playerid, zone);
  43. public OnPlayerLeaveGangZone(playerid, zone);
  44. */
  45. #include <streamer>
  46. #define MAX_ZONES 1024//maximum gangzones your server can have, the limit is upto 1024 and minimum 5
  47. //Note: Creating one interactive gangzone makes total 5 zones, 4 for borders and 1 for the main zone!
  48. enum GangzoneInfo
  49. {
  50. bool:E_exist,
  51. E_border[4],
  52. E_interior,
  53. E_virtualworld,
  54. Float:E_minx,
  55. Float:E_miny,
  56. Float:E_maxx,
  57. Float:E_maxy,
  58. E_dynamic
  59. }
  60. static gGangzone[MAX_ZONES][GangzoneInfo];
  61. static bool:gPlayerShown[MAX_PLAYERS][MAX_ZONES];
  62. static gPlayerColor[MAX_PLAYERS][MAX_ZONES];
  63. static gPlayerBorderColor[MAX_PLAYERS][MAX_ZONES];
  64. static gPlayerWorld[MAX_PLAYERS];
  65. //Note: if you use this in a filterscript, please define "FILTERSCRIPT" in your script
  66. #if defined FILTERSCRIPT// if used in a filterscript
  67. public OnFilterScriptInit()
  68. {
  69. DestroyAllGangZones();//destory all gangzones
  70. #if defined GZ_OnFilterScriptInit
  71. GZ_OnFilterScriptInit();
  72. #endif
  73. return 1;
  74. }
  75. #if defined _ALS_OnFilterScriptInit
  76. #undef OnFilterScriptInit
  77. #else
  78. #define _ALS_OnFilterScriptInit
  79. #endif
  80. #define OnFilterScriptInit GZ_OnFilterScriptInit
  81. #if defined GZ_OnFilterScriptInit
  82. forward GZ_OnFilterScriptInit();
  83. #endif
  84. public OnFilterScriptExit()
  85. {
  86. DestroyAllGangZones();//destory all gangzones
  87. #if defined GZ_OnFilterScriptExit
  88. GZ_OnFilterScriptExit();
  89. #endif
  90. return 1;
  91. }
  92. #if defined _ALS_OnFilterScriptExit
  93. #undef OnFilterScriptExit
  94. #else
  95. #define _ALS_OnFilterScriptExit
  96. #endif
  97. #define OnFilterScriptExit GZ_OnFilterScriptExit
  98. #if defined GZ_OnFilterScriptExit
  99. forward GZ_OnFilterScriptExit();
  100. #endif
  101. #else// if used in a gamemode
  102. public OnGameModeInit()
  103. {
  104. DestroyAllGangZones();//destory all gangzones
  105. #if defined GZ_OnGameModeInit
  106. GZ_OnGameModeInit();
  107. #endif
  108. return 1;
  109. }
  110. #if defined _ALS_OnGameModeInit
  111. #undef OnGameModeInit
  112. #else
  113. #define _ALS_OnGameModeInit
  114. #endif
  115. #define OnGameModeInit GZ_OnGameModeInit
  116. #if defined GZ_OnGameModeInit
  117. forward GZ_OnGameModeInit();
  118. #endif
  119. public OnGameModeExit()
  120. {
  121. DestroyAllGangZones();//destory all gangzones
  122. #if defined GZ_OnGameModeExit
  123. GZ_OnGameModeExit();
  124. #endif
  125. return 1;
  126. }
  127. #if defined _ALS_OnGameModeExit
  128. #undef OnGameModeExit
  129. #else
  130. #define _ALS_OnGameModeExit
  131. #endif
  132. #define OnGameModeExit GZ_OnGameModeExit
  133. #if defined GZ_OnGameModeExit
  134. forward GZ_OnGameModeExit();
  135. #endif
  136. #endif
  137. stock GangZoneCreate_(Float:minx, Float:miny, Float:maxx, Float:maxy, color = -1, interior = -1, virtualworld = -1, Float:bordersize = 1.0, bordercolor = 0x00000060)
  138. {
  139. new E_zone = GangZoneCreate(minx, miny, maxx, maxy);//the main zone
  140. gGangzone[E_zone][E_minx] = minx;
  141. gGangzone[E_zone][E_miny] = miny;
  142. gGangzone[E_zone][E_maxx] = maxx;
  143. gGangzone[E_zone][E_maxy] = maxy;
  144. gGangzone[E_zone][E_interior] = interior;
  145. gGangzone[E_zone][E_virtualworld] = virtualworld;
  146. for(new players = 0; players < MAX_PLAYERS; players++)//setting player data
  147. {
  148. gPlayerShown[players][E_zone] = false;
  149. gPlayerColor[players][E_zone] = color;
  150. gPlayerBorderColor[players][E_zone] = bordercolor;
  151. }
  152. #define SEPERATION (2.0*bordersize)//the seperation value to differenciate borders from gangzone, set accordingly! (Default: 2.0)
  153. gGangzone[E_zone][E_border][0] = GangZoneCreate(minx - SEPERATION, miny, minx + SEPERATION, maxy);//border 1
  154. gGangzone[E_zone][E_border][1] = GangZoneCreate(minx - SEPERATION, maxy - SEPERATION, maxx, maxy + SEPERATION);//border 2
  155. gGangzone[E_zone][E_border][2] = GangZoneCreate(maxx - SEPERATION, miny, maxx + SEPERATION, maxy);//border 3
  156. gGangzone[E_zone][E_border][3] = GangZoneCreate(minx - SEPERATION, miny - SEPERATION, maxx, miny + SEPERATION);//border 4
  157. gGangzone[E_zone][E_dynamic] = CreateDynamicRectangle(minx, miny, maxx, maxy, virtualworld, interior, -1);//creating the dynamic zone
  158. gGangzone[E_zone][E_exist] = true;//finally, zone exists!
  159. return E_zone;
  160. }
  161. #if defined _ALS_GangZoneCreate
  162. #undef GangZoneCreate
  163. #else
  164. #define _ALS_GangZoneCreate
  165. #endif
  166. #define GangZoneCreate GangZoneCreate_
  167. stock GangZoneDestroy_(zone)
  168. {
  169. if(! gGangzone[zone][E_exist]) return false;//check if exists
  170. for(new players = 0; players < MAX_PLAYERS; players++)//remove player data
  171. {
  172. gPlayerColor[players][zone] = -1;
  173. gPlayerShown[players][zone] = false;
  174. gPlayerBorderColor[players][zone] = -1;
  175. }
  176. gGangzone[zone][E_minx] = 0.0;
  177. gGangzone[zone][E_miny] = 0.0;
  178. gGangzone[zone][E_maxx] = 0.0;
  179. gGangzone[zone][E_maxy] = 0.0;
  180. gGangzone[zone][E_interior] = -1;
  181. gGangzone[zone][E_virtualworld] = -1;
  182. gGangzone[zone][E_dynamic] = -1;
  183. GangZoneDestroy(zone);//destroy main zone
  184. for(new border = 0; border < 4; border++)//destroy all 4 borders
  185. {
  186. GangZoneDestroy(gGangzone[zone][E_border][border]);
  187. }
  188. DestroyDynamicArea(gGangzone[zone][E_dynamic]);//destory dynamic area
  189. gGangzone[zone][E_exist] = false;//finally, zone doesn't exists
  190. return true;
  191. }
  192. #if defined _ALS_GangZoneDestroy
  193. #undef GangZoneDestroy
  194. #else
  195. #define _ALS_GangZoneDestroy
  196. #endif
  197. #define GangZoneDestroy GangZoneDestroy_
  198. stock GangZoneExist(zone)
  199. {
  200. if(zone < 0 || zone >= MAX_ZONES)
  201. {
  202. printf("Error::GangZoneExist()::Out Of Bounds::%i", zone);//by pottus
  203. return false;//if invalid zone id
  204. }
  205. return gGangzone[zone][E_exist];//check if zone exists!
  206. }
  207. stock GangZoneShowForPlayer_(playerid, zone, color = -1, bordercolor = -1)
  208. {
  209. /*
  210. NOTE: if color is "-1" and if bordercolor is "-1", then the system will set
  211. the zone color automatically to default(the one set on creating the zone)!
  212. */
  213. if(! GangZoneExist(zone)) return false;
  214. if(color != -1) gPlayerColor[playerid][zone] = color;
  215. if(bordercolor != -1) gPlayerBorderColor[playerid][zone] = bordercolor;
  216. GangZoneShowForPlayer(playerid, zone, gPlayerColor[playerid][zone]);
  217. for(new border = 0; border < 4; border++) GangZoneShowForPlayer(playerid, gGangzone[zone][E_border][border], gPlayerBorderColor[playerid][zone]);
  218. gPlayerShown[playerid][zone] = true;
  219. return true;
  220. }
  221. #if defined _ALS_GangZoneShowForPlayer
  222. #undef GangZoneShowForPlayer
  223. #else
  224. #define _ALS_GangZoneShowForPlayer
  225. #endif
  226. #define GangZoneShowForPlayer GangZoneShowForPlayer_
  227. stock GangZoneShowForAll_(zone, color = -1, bordercolor = -1)
  228. {
  229. if(! GangZoneExist(zone)) return false;
  230. for(new players = 0; players < MAX_PLAYERS; players++)
  231. {
  232. GangZoneShowForPlayer(players, zone, color);
  233. for(new border = 0; border < 4; border++) GangZoneShowForPlayer(players, gGangzone[zone][E_border][border], bordercolor);
  234. }
  235. return true;
  236. }
  237. #if defined _ALS_GangZoneShowForAll
  238. #undef GangZoneShowForAll
  239. #else
  240. #define _ALS_GangZoneShowForAll
  241. #endif
  242. #define GangZoneShowForAll GangZoneShowForAll_
  243. stock GangZoneHideForPlayer_(playerid, zone)
  244. {
  245. if(! GangZoneExist(zone)) return false;
  246. GangZoneHideForPlayer(playerid, zone);
  247. for(new border = 0; border < 4; border++) GangZoneHideForPlayer(playerid, gGangzone[zone][E_border][border]);
  248. gPlayerShown[playerid][zone] = false;
  249. return true;
  250. }
  251. #if defined _ALS_GangZoneHideForPlayer
  252. #undef GangZoneHideForPlayer
  253. #else
  254. #define _ALS_GangZoneHideForPlayer
  255. #endif
  256. #define GangZoneHideForPlayer GangZoneHideForPlayer_
  257. stock GangZoneHideForAll_(zone)
  258. {
  259. if(! GangZoneExist(zone)) return false;
  260. GangZoneHideForAll(zone);
  261. for(new border = 0; border < 4; border++) GangZoneHideForAll(gGangzone[zone][E_border][border]);
  262. for(new players = 0; players < MAX_PLAYERS; players++) gPlayerShown[players][zone] = false;
  263. return true;
  264. }
  265. #if defined _ALS_GangZoneHideForAll
  266. #undef GangZoneHideForAll
  267. #else
  268. #define _ALS_GangZoneHideForAll
  269. #endif
  270. #define GangZoneHideForAll GangZoneHideForAll_
  271. stock GangZoneSetColorForPlayer(playerid, zone, color, bordercolor = -1)
  272. {
  273. if(! GangZoneExist(zone)) return false;
  274. if(gPlayerShown[playerid][zone]) GangZoneShowForPlayer(playerid, zone, color, bordercolor);
  275. return true;
  276. }
  277. stock GangZoneSetColorForAll(zone, color, bordercolor = -1)
  278. {
  279. if(! GangZoneExist(zone)) return false;
  280. for(new players = 0; players < MAX_PLAYERS; players++)
  281. {
  282. if(gPlayerShown[players][zone])
  283. {
  284. GangZoneShowForPlayer(players, zone, color, bordercolor);
  285. }
  286. }
  287. return true;
  288. }
  289. //the flashing functions are same as that of samp!
  290. // GangZoneFlashForPlayer(playerid, zone, flashcolor);
  291. // GangZoneFlashForAll(zone, flashcolor);
  292. // GangZoneStopFlashForPlayer(playerid, zone);
  293. // GangZoneStopFlashForAll(zone);
  294. stock GangZoneSetInterior(zone, interior)
  295. {
  296. /*
  297. NOTE: if interior is set to "-1", it means all the interiors, so the zone will be visible in all interiors!
  298. */
  299. if(! GangZoneExist(zone)) return false;
  300. gGangzone[zone][E_interior] = interior;
  301. return true;
  302. }
  303. stock GangZoneGetInterior(zone)
  304. {
  305. if(! GangZoneExist(zone)) return false;
  306. return gGangzone[zone][E_interior];
  307. }
  308. stock GangZoneSetVirtualWorld(zone, virtualworld)
  309. {
  310. /*
  311. NOTE: if virtualworld is set to "-1", it means all the virtualworld, so the zone will be visible in all virtualworld!
  312. */
  313. if(! GangZoneExist(zone)) return false;
  314. gGangzone[zone][E_virtualworld] = virtualworld;
  315. return true;
  316. }
  317. stock GangZoneGetVirtualWorld(zone)
  318. {
  319. if(! GangZoneExist(zone)) return false;
  320. return gGangzone[zone][E_virtualworld];
  321. }
  322. stock CountAllGangZones()
  323. {
  324. new count = 0;
  325. for(new zone = 0; zone < MAX_ZONES; zone++)
  326. {
  327. if(GangZoneExist(zone))
  328. {
  329. count ++;
  330. }
  331. }
  332. return count;
  333. }
  334. stock DestroyAllGangZones()
  335. {
  336. for(new zone = 0; zone < MAX_ZONES; zone++)
  337. {
  338. if(GangZoneExist(zone))
  339. {
  340. GangZoneDestroy(zone);
  341. }
  342. }
  343. return true;
  344. }
  345. stock ShowAllGangZonesForPlayer(playerid, color = -1, bordercolor = -1)
  346. {
  347. for(new zone = 0; zone < MAX_ZONES; zone++)
  348. {
  349. if(GangZoneExist(zone))
  350. {
  351. GangZoneShowForPlayer(playerid, zone, color, bordercolor);
  352. }
  353. }
  354. return true;
  355. }
  356. stock ShowAllGangZonesForAll(color = -1, bordercolor = -1)
  357. {
  358. for(new zone = 0; zone < MAX_ZONES; zone++)
  359. {
  360. if(GangZoneExist(zone))
  361. {
  362. GangZoneShowForAll(zone color, bordercolor);
  363. }
  364. }
  365. return true;
  366. }
  367. stock HideAllGangZonesForPlayer(playerid)
  368. {
  369. for(new zone = 0; zone < MAX_ZONES; zone++)
  370. {
  371. if(GangZoneExist(zone))
  372. {
  373. GangZoneHideForPlayer(playerid, zone);
  374. }
  375. }
  376. return true;
  377. }
  378. stock HideAllGangZonesForAll()
  379. {
  380. for(new zone = 0; zone < MAX_ZONES; zone++)
  381. {
  382. if(GangZoneExist(zone))
  383. {
  384. GangZoneHideForAll(zone);
  385. }
  386. }
  387. return true;
  388. }
  389. stock IsPlayerInGangZone(playerid, zone)
  390. {
  391. if(! GangZoneExist(zone)) return false;
  392. if(IsPlayerInDynamicArea(playerid, gGangzone[zone][E_dynamic])) return true;
  393. return false;
  394. }
  395. stock IsPlayerInAnyGangZone(playerid)
  396. {
  397. if(! IsPlayerConnected(playerid)) return false;
  398. if(IsPlayerInAnyDynamicArea(playerid)) return true;
  399. return false;
  400. }
  401. stock GetPlayerGangZone(playerid)
  402. {
  403. if(! IsPlayerConnected(playerid)) return false;
  404. return GetPlayerNumberDynamicAreas(playerid);
  405. }
  406. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  407. {
  408. for(new zone = 0; zone < MAX_ZONES; zone++)
  409. {
  410. if(GangZoneExist(zone))
  411. {
  412. if(gPlayerShown[playerid][zone])
  413. {
  414. if(gGangzone[zone][E_interior] != -1)
  415. {
  416. if(newinteriorid != gGangzone[zone][E_interior])
  417. {
  418. GangZoneHideForPlayer(playerid, zone);
  419. }
  420. }
  421. }
  422. }
  423. }
  424. #if defined GZ_OnPlayerInteriorChange
  425. GZ_OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid);
  426. #endif
  427. return 1;
  428. }
  429. #if defined _ALS_OnPlayerInteriorChange
  430. #undef OnPlayerInteriorChange
  431. #else
  432. #define _ALS_OnPlayerInteriorChange
  433. #endif
  434. #define OnPlayerInteriorChange GZ_OnPlayerInteriorChange
  435. #if defined GZ_OnPlayerInteriorChange
  436. forward GZ_OnPlayerInteriorChange(playerid);
  437. #endif
  438. stock SetPlayerVirtualWorld_(playerid, worldid)
  439. {
  440. gPlayerWorld[playerid] = worldid;
  441. return SetPlayerVirtualWorld(playerid, worldid);
  442. }
  443. #if defined _ALS_SetPlayerVirtualWorld
  444. #undef SetPlayerVirtualWorld
  445. #else
  446. #define _ALS_SetPlayerVirtualWorld
  447. #endif
  448. #define SetPlayerVirtualWorld SetPlayerVirtualWorld_
  449. public OnPlayerUpdate(playerid)
  450. {
  451. if(gPlayerWorld[playerid] != GetPlayerVirtualWorld(playerid))
  452. {
  453. CallLocalFunction("GZ_OnPlayerVirtualWorldChange", "iii", playerid, gPlayerWorld[playerid], GetPlayerVirtualWorld(playerid));
  454. gPlayerWorld[playerid] = GetPlayerVirtualWorld(playerid);
  455. }
  456. #if defined GZ_OnPlayerUpdate
  457. GZ_OnPlayerUpdate(playerid);
  458. #endif
  459. return 1;
  460. }
  461. #if defined _ALS_OnPlayerUpdate
  462. #undef OnPlayerUpdate
  463. #else
  464. #define _ALS_OnPlayerUpdate
  465. #endif
  466. #define OnPlayerUpdate GZ_OnPlayerUpdate
  467. #if defined GZ_OnPlayerUpdate
  468. forward GZ_OnPlayerUpdate(playerid);
  469. #endif
  470. forward GZ_OnPlayerVirtualWorldChange(playerid, newworld, oldword);
  471. public GZ_OnPlayerVirtualWorldChange(playerid, newworld, oldword)
  472. {
  473. for(new zone = 0; zone < MAX_ZONES; zone++)
  474. {
  475. if(GangZoneExist(zone))
  476. {
  477. if(gPlayerShown[playerid][zone])
  478. {
  479. if(gGangzone[zone][E_virtualworld] != -1)
  480. {
  481. if(newworld != gGangzone[zone][E_virtualworld])
  482. {
  483. GangZoneHideForPlayer(playerid, zone);
  484. }
  485. }
  486. }
  487. }
  488. }
  489. return 1;
  490. }
  491. public OnPlayerEnterDynamicArea(playerid, areaid)
  492. {
  493. for(new zone = 0; zone < MAX_ZONES; zone++)
  494. {
  495. if(GangZoneExist(zone))
  496. {
  497. if(areaid == gGangzone[zone][E_dynamic])
  498. {
  499. CallLocalFunction("OnPlayerEnterGangZone", "dd", playerid, zone);
  500. break;
  501. }
  502. }
  503. }
  504. #if defined GZ_OnPlayerEnterDynamicArea
  505. GZ_OnPlayerEnterDynamicArea(playerid, areaid);
  506. #endif
  507. return 1;
  508. }
  509. #if defined _ALS_OnPlayerEnterDynamicArea
  510. #undef OnPlayerEnterDynamicArea
  511. #else
  512. #define _ALS_OnPlayerEnterDynamicArea
  513. #endif
  514. #define OnPlayerEnterDynamicArea GZ_OnPlayerEnterDynamicArea
  515. #if defined GZ_OnPlayerEnterDynamicArea
  516. forward GZ_OnPlayerEnterDynamicArea(playerid, areaid);
  517. #endif
  518. //the system callback
  519. forward OnPlayerEnterGangZone(playerid, zone);
  520. public OnPlayerLeaveDynamicArea(playerid, areaid)
  521. {
  522. for(new zone = 0; zone < MAX_ZONES; zone++)
  523. {
  524. if(GangZoneExist(zone))
  525. {
  526. if(areaid == gGangzone[zone][E_dynamic])
  527. {
  528. CallLocalFunction("OnPlayerLeaveGangZone", "dd", playerid, zone);
  529. break;
  530. }
  531. }
  532. }
  533. #if defined GZ_OnPlayerLeaveDynamicArea
  534. GZ_OnPlayerLeaveDynamicArea(playerid, areaid);
  535. #endif
  536. return 1;
  537. }
  538. #if defined _ALS_OnPlayerLeaveDynamicArea
  539. #undef OnPlayerLeaveDynamicArea
  540. #else
  541. #define _ALS_OnPlayerLeaveDynamicArea
  542. #endif
  543. #define OnPlayerLeaveDynamicArea GZ_OnPlayerLeaveDynamicArea
  544. #if defined GZ_OnPlayerLeaveDynamicArea
  545. forward GZ_OnPlayerLeaveDynamicArea(playerid, areaid);
  546. #endif
  547. //the system callback
  548. forward OnPlayerLeaveGangZone(playerid, zone);