y_incognitostreamer.inc 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621
  1. /*----------------------------------------------------------------------------*\
  2. =========================================
  3. y_incognitostream - y_groups + streamer
  4. =========================================
  5. Description:
  6. This file unites the YSI y_groups system with Incognito's streamer plugin so
  7. that you can use more objects/areas etc with y_groups style permissions.
  8. Legal:
  9. Version: MPL 1.1
  10. The contents of this file are subject to the Mozilla Public License Version
  11. 1.1 (the "License"); you may not use this file except in compliance with
  12. the License. You may obtain a copy of the License at
  13. http://www.mozilla.org/MPL/
  14. Software distributed under the License is distributed on an "AS IS" basis,
  15. WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  16. for the specific language governing rights and limitations under the
  17. License.
  18. The Original Code is the YSI classes include.
  19. The Initial Developer of the Original Code is Alex "Y_Less" Cole.
  20. Portions created by the Initial Developer are Copyright (C) 2011
  21. the Initial Developer. All Rights Reserved.
  22. Contributors:
  23. ZeeX, koolk, JoeBullet/Google63, g_aSlice/Slice
  24. Thanks:
  25. JoeBullet/Google63 - Handy arbitrary ASM jump code using SCTRL.
  26. ZeeX - Very productive conversations.
  27. koolk - IsPlayerinAreaEx code.
  28. TheAlpha - Danish translation.
  29. breadfish - German translation.
  30. Fireburn - Dutch translation.
  31. yom - French translation.
  32. 50p - Polish translation.
  33. Zamaroht - Spanish translation.
  34. Dracoblue, sintax, mabako, Xtreme, other coders - Producing other modes
  35. for me to strive to better.
  36. Pixels^ - Running XScripters where the idea was born.
  37. Matite - Pestering me to release it and using it.
  38. Very special thanks to:
  39. Thiadmer - PAWN, whose limits continue to amaze me!
  40. Kye/Kalcor - SA:MP.
  41. SA:MP Team past, present and future - SA:MP.
  42. Version:
  43. 0.1
  44. Changelog:
  45. 20/10/12:
  46. First version.
  47. Functions:
  48. Public:
  49. -
  50. Core:
  51. -
  52. Stock:
  53. -
  54. Static:
  55. -
  56. Inline:
  57. -
  58. API:
  59. -
  60. Callbacks:
  61. -
  62. Definitions:
  63. -
  64. Enums:
  65. -
  66. Macros:
  67. -
  68. Tags:
  69. -
  70. Variables:
  71. Global:
  72. -
  73. Static:
  74. -
  75. Commands:
  76. -
  77. Compile options:
  78. -
  79. Operators:
  80. -
  81. \*----------------------------------------------------------------------------*/
  82. #include "y_plugins"
  83. static stock const
  84. YSI_gscEmpty[2] = {-1, -1};
  85. #if IPS_MAX_OBJECTS != 0
  86. #undef _GROUP_MAKE_NAME
  87. #undef _GROUP_MAKE_LIMIT
  88. #define _GROUP_MAKE_NAME<%0...%1> %0SObject%1
  89. #define _GROUP_MAKE_LIMIT IPS_MAX_OBJECTS
  90. // Include the second half of the file for the methods.
  91. #include "y_groupsingle"
  92. #include "y_groupsecond"
  93. /*------------------------------------------------------------------------*\
  94. Function:
  95. SObject_SetPlayer
  96. Params:
  97. o - Object to set.
  98. p - Player to set.
  99. bool:s - Add or remove this object from this player.
  100. Return:
  101. -
  102. Notes:
  103. Translate the YSI permissions system to the streamer plugin permissions
  104. system.
  105. \*------------------------------------------------------------------------*/
  106. foreign void:SObject_SetPlayer(o,p,bool:s);
  107. global void:SObject_SetPlayer(o,p,bool:s)
  108. {
  109. if (s) Streamer_AppendArrayData(STREAMER_TYPE_OBJECT, o, E_STREAMER_PLAYER_ID, p);
  110. else Streamer_RemoveArrayData(STREAMER_TYPE_OBJECT, o, E_STREAMER_PLAYER_ID, p);
  111. //return s;
  112. }
  113. /*------------------------------------------------------------------------*\
  114. Function:
  115. IPS_CreateDynamicObject
  116. Params:
  117. -
  118. Return:
  119. -
  120. Notes:
  121. Hook the streamer creation function so that we can initialise the groups
  122. system for this thing. The remainder of this file is just these two
  123. functions in various forms repeatedly.
  124. \*------------------------------------------------------------------------*/
  125. stock IPS_CreateDynamicObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 100.0)
  126. {
  127. // Create an object for no players.
  128. new
  129. id = CreateDynamicObject(modelid, x, y, z, rx, ry, rz, worldid, interiorid, playerid, streamdistance);
  130. Streamer_SetArrayData(STREAMER_TYPE_OBJECT, id, E_STREAMER_PLAYER_ID, YSI_gscEmpty, 0);
  131. SObject_InitialiseFromGroups(id);
  132. return id;
  133. }
  134. #if defined _ALS_CreateDynamicObject
  135. #undef CreateDynamicObject
  136. #else
  137. #define _ALS_CreateDynamicObject
  138. #endif
  139. #define CreateDynamicObject IPS_CreateDynamicObject
  140. stock IPS_CreateDynamicObjectEx(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, Float:drawdistance = 0.0, Float:streamdistance = 200.0, worlds[] = { -1 }, interiors[] = { -1 }, players[] = { -1 }, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players)
  141. {
  142. // Create an object for no players.
  143. new
  144. id = CreateDynamicObjectEx(modelid, x, y, z, rx, ry, rz, drawdistance, streamdistance, worlds, interiors, players, maxworlds, maxinteriors, maxplayers);
  145. Streamer_SetArrayData(STREAMER_TYPE_OBJECT, id, E_STREAMER_PLAYER_ID, YSI_gscEmpty, 0);
  146. SObject_InitialiseFromGroups(id);
  147. return id;
  148. }
  149. #if defined _ALS_CreateDynamicObjectEx
  150. #undef CreateDynamicObjectEx
  151. #else
  152. #define _ALS_CreateDynamicObjectEx
  153. #endif
  154. #define CreateDynamicObjectEx IPS_CreateDynamicObjectEx
  155. #endif
  156. #if IPS_MAX_PICKUPS != 0
  157. #undef _GROUP_MAKE_NAME
  158. #undef _GROUP_MAKE_LIMIT
  159. #define _GROUP_MAKE_NAME<%0...%1> %0SPickup%1
  160. #define _GROUP_MAKE_LIMIT IPS_MAX_PICKUPS
  161. // Include the second half of the file for the methods.
  162. #include "y_groupsingle"
  163. #include "y_groupsecond"
  164. foreign void:SPickup_SetPlayer(o,p,bool:s);
  165. global void:SPickup_SetPlayer(o,p,bool:s)
  166. {
  167. if (s) Streamer_AppendArrayData(STREAMER_TYPE_PICKUP, o, E_STREAMER_PLAYER_ID, p);
  168. else Streamer_RemoveArrayData(STREAMER_TYPE_PICKUP, o, E_STREAMER_PLAYER_ID, p);
  169. //return s;
  170. }
  171. stock IPS_CreateDynamicPickup(modelid, type, Float:x, Float:y, Float:z, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 100.0)
  172. {
  173. // Create an object for no players.
  174. new
  175. id = CreateDynamicPickup(modelid, type, x, y, z, worldid, interiorid, playerid, streamdistance);
  176. Streamer_SetArrayData(STREAMER_TYPE_PICKUP, id, E_STREAMER_PLAYER_ID, YSI_gscEmpty, 0);
  177. SPickup_InitialiseFromGroups(id);
  178. return id;
  179. }
  180. #if defined _ALS_CreateDynamicPickup
  181. #undef CreateDynamicPickup
  182. #else
  183. #define _ALS_CreateDynamicPickup
  184. #endif
  185. #define CreateDynamicPickup IPS_CreateDynamicPickup
  186. stock IPS_CreateDynamicPickupEx(modelid, type, Float:x, Float:y, Float:z, Float:streamdistance = 100.0, worlds[] = { -1 }, interiors[] = { -1 }, players[] = { -1 }, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players)
  187. {
  188. // Create an object for no players.
  189. new
  190. id = CreateDynamicPickupEx(modelid, type, x, y, z, streamdistance, worlds, interiors, players, maxworlds, maxinteriors, maxplayers);
  191. Streamer_SetArrayData(STREAMER_TYPE_PICKUP, id, E_STREAMER_PLAYER_ID, YSI_gscEmpty, 0);
  192. SPickup_InitialiseFromGroups(id);
  193. return id;
  194. }
  195. #if defined _ALS_CreateDynamicPickupEx
  196. #undef CreateDynamicPickupEx
  197. #else
  198. #define _ALS_CreateDynamicPickupEx
  199. #endif
  200. #define CreateDynamicPickupEx IPS_CreateDynamicPickupEx
  201. #endif
  202. #if IPS_MAX_CPS != 0
  203. #undef _GROUP_MAKE_NAME
  204. #undef _GROUP_MAKE_LIMIT
  205. #define _GROUP_MAKE_NAME<%0...%1> %0SCP%1
  206. #define _GROUP_MAKE_LIMIT IPS_MAX_CPS
  207. // Include the second half of the file for the methods.
  208. #include "y_groupsingle"
  209. #include "y_groupsecond"
  210. foreign void:SCP_SetPlayer(o,p,bool:s);
  211. global void:SCP_SetPlayer(o,p,bool:s)
  212. {
  213. if (s) Streamer_AppendArrayData(STREAMER_TYPE_CP, o, E_STREAMER_PLAYER_ID, p);
  214. else Streamer_RemoveArrayData(STREAMER_TYPE_CP, o, E_STREAMER_PLAYER_ID, p);
  215. //return s;
  216. }
  217. stock IPS_CreateDynamicCP(Float:x, Float:y, Float:z, Float:size, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 100.0)
  218. {
  219. // Create an object for no players.
  220. new
  221. id = CreateDynamicCP(x, y, z, size, worldid, interiorid, playerid, streamdistance);
  222. Streamer_SetArrayData(STREAMER_TYPE_CP, id, E_STREAMER_PLAYER_ID, YSI_gscEmpty, 0);
  223. SCP_InitialiseFromGroups(id);
  224. return id;
  225. }
  226. #if defined _ALS_CreateDynamicCP
  227. #undef CreateDynamicCP
  228. #else
  229. #define _ALS_CreateDynamicCP
  230. #endif
  231. #define CreateDynamicCP IPS_CreateDynamicCP
  232. stock IPS_CreateDynamicCPEx(Float:x, Float:y, Float:z, Float:size, Float:streamdistance = 100.0, worlds[] = { -1 }, interiors[] = { -1 }, players[] = { -1 }, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players)
  233. {
  234. // Create an object for no players.
  235. new
  236. id = CreateDynamicCPEx(x, y, z, size, streamdistance, worlds, interiors, players, maxworlds, maxinteriors, maxplayers);
  237. Streamer_SetArrayData(STREAMER_TYPE_CP, id, E_STREAMER_PLAYER_ID, YSI_gscEmpty, 0);
  238. SCP_InitialiseFromGroups(id);
  239. return id;
  240. }
  241. #if defined _ALS_CreateDynamicCPEx
  242. #undef CreateDynamicCPEx
  243. #else
  244. #define _ALS_CreateDynamicCPEx
  245. #endif
  246. #define CreateDynamicCPEx IPS_CreateDynamicCPEx
  247. #endif
  248. #if IPS_MAX_RACE_CPS != 0
  249. #undef _GROUP_MAKE_NAME
  250. #undef _GROUP_MAKE_LIMIT
  251. #define _GROUP_MAKE_NAME<%0...%1> %0SRaceCP%1
  252. #define _GROUP_MAKE_LIMIT IPS_MAX_RACE_CPS
  253. // Include the second half of the file for the methods.
  254. #include "y_groupsingle"
  255. #include "y_groupsecond"
  256. foreign void:SRaceCP_SetPlayer(o,p,bool:s);
  257. global void:SRaceCP_SetPlayer(o,p,bool:s)
  258. {
  259. if (s) Streamer_AppendArrayData(STREAMER_TYPE_RACE_CP, o, E_STREAMER_PLAYER_ID, p);
  260. else Streamer_RemoveArrayData(STREAMER_TYPE_RACE_CP, o, E_STREAMER_PLAYER_ID, p);
  261. //return s;
  262. }
  263. stock IPS_CreateDynamicRaceCP(type, Float:x, Float:y, Float:z, Float:nextx, Float:nexty, Float:nextz, Float:size, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 100.0)
  264. {
  265. // Create an object for no players.
  266. new
  267. id = CreateDynamicRaceCP(type, x, y, z, nextx, nexty, nextz, size, worldid, interiorid, playerid, streamdistance);
  268. Streamer_SetArrayData(STREAMER_TYPE_RACE_CP, id, E_STREAMER_PLAYER_ID, YSI_gscEmpty, 0);
  269. SRaceCP_InitialiseFromGroups(id);
  270. return id;
  271. }
  272. #if defined _ALS_CreateDynamicRaceCP
  273. #undef CreateDynamicRaceCP
  274. #else
  275. #define _ALS_CreateDynamicRaceCP
  276. #endif
  277. #define CreateDynamicRaceCP IPS_CreateDynamicRaceCP
  278. stock IPS_CreateDynamicRaceCPEx(type, Float:x, Float:y, Float:z, Float:nextx, Float:nexty, Float:nextz, Float:size, Float:streamdistance = 100.0, worlds[] = { -1 }, interiors[] = { -1 }, players[] = { -1 }, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players)
  279. {
  280. // Create an object for no players.
  281. new
  282. id = CreateDynamicRaceCPEx(type, x, y, z, nextx, nexty, nextz, size, streamdistance, worlds, interiors, players, maxworlds, maxinteriors, maxplayers);
  283. Streamer_SetArrayData(STREAMER_TYPE_RACE_CP, id, E_STREAMER_PLAYER_ID, YSI_gscEmpty, 0);
  284. SRaceCP_InitialiseFromGroups(id);
  285. return id;
  286. }
  287. #if defined _ALS_CreateDynamicRaceCPEx
  288. #undef CreateDynamicRaceCPEx
  289. #else
  290. #define _ALS_CreateDynamicRaceCPEx
  291. #endif
  292. #define CreateDynamicRaceCPEx IPS_CreateDynamicRaceCPEx
  293. #endif
  294. #if IPS_MAX_MAP_ICONS != 0
  295. #undef _GROUP_MAKE_NAME
  296. #undef _GROUP_MAKE_LIMIT
  297. #define _GROUP_MAKE_NAME<%0...%1> %0SMapIcon%1
  298. #define _GROUP_MAKE_LIMIT IPS_MAX_MAP_ICONS
  299. // Include the second half of the file for the methods.
  300. #include "y_groupsingle"
  301. #include "y_groupsecond"
  302. foreign void:SMapIcon_SetPlayer(o,p,bool:s);
  303. global void:SMapIcon_SetPlayer(o,p,bool:s)
  304. {
  305. if (s) Streamer_AppendArrayData(STREAMER_TYPE_MAP_ICON, o, E_STREAMER_PLAYER_ID, p);
  306. else Streamer_RemoveArrayData(STREAMER_TYPE_MAP_ICON, o, E_STREAMER_PLAYER_ID, p);
  307. //return s;
  308. }
  309. stock IPS_CreateDynamicMapIcon(Float:x, Float:y, Float:z, type, color, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 100.0)
  310. {
  311. // Create an object for no players.
  312. new
  313. id = CreateDynamicMapIcon(x, y, z, type, color, worldid, interiorid, playerid, streamdistance);
  314. Streamer_SetArrayData(STREAMER_TYPE_MAP_ICON, id, E_STREAMER_PLAYER_ID, YSI_gscEmpty, 0);
  315. SMapIcon_InitialiseFromGroups(id);
  316. return id;
  317. }
  318. #if defined _ALS_CreateDynamicMapIcon
  319. #undef CreateDynamicMapIcon
  320. #else
  321. #define _ALS_CreateDynamicMapIcon
  322. #endif
  323. #define CreateDynamicMapIcon IPS_CreateDynamicMapIcon
  324. stock IPS_CreateDynamicMapIconEx(Float:x, Float:y, Float:z, type, color, style, Float:streamdistance = 100.0, worlds[] = { -1 }, interiors[] = { -1 }, players[] = { -1 }, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players)
  325. {
  326. // Create an object for no players.
  327. new
  328. id = CreateDynamicMapIconEx(x, y, z, type, color, style, streamdistance, worlds, interiors, players, maxworlds, maxinteriors, maxplayers);
  329. Streamer_SetArrayData(STREAMER_TYPE_MAP_ICON, id, E_STREAMER_PLAYER_ID, YSI_gscEmpty, 0);
  330. SMapIcon_InitialiseFromGroups(id);
  331. return id;
  332. }
  333. #if defined _ALS_CreateDynamicMapIconEx
  334. #undef CreateDynamicMapIconEx
  335. #else
  336. #define _ALS_CreateDynamicMapIconEx
  337. #endif
  338. #define CreateDynamicMapIconEx IPS_CreateDynamicMapIconEx
  339. #endif
  340. #if IPS_MAX_3D_TEXT_LABELS != 0
  341. #undef _GROUP_MAKE_NAME
  342. #undef _GROUP_MAKE_LIMIT
  343. #define _GROUP_MAKE_NAME<%0...%1> %0SText3D%1
  344. #define _GROUP_MAKE_LIMIT IPS_MAX_3D_TEXT_LABELS
  345. #define _GROUP_MAKE_TAG Text3D
  346. // Include the second half of the file for the methods.
  347. #include "y_groupsingle"
  348. #define _GROUP_MAKE_TAG Text3D
  349. #include "y_groupsecond"
  350. //#undef _GROUP_MAKE_TAG
  351. foreign void:SText3D_SetPlayer(Text3D:o,p,bool:s);
  352. global void:SText3D_SetPlayer(Text3D:o,p,bool:s)
  353. {
  354. if (s) Streamer_AppendArrayData(STREAMER_TYPE_3D_TEXT_LABEL, o, E_STREAMER_PLAYER_ID, p);
  355. else Streamer_RemoveArrayData(STREAMER_TYPE_3D_TEXT_LABEL, o, E_STREAMER_PLAYER_ID, p);
  356. //return s;
  357. }
  358. stock Text3D:IPS_CreateDynamic3DTextLabel(const text[], color, Float:x, Float:y, Float:z, Float:drawdistance, attachedplayer = INVALID_PLAYER_ID, attachedvehicle = INVALID_VEHICLE_ID, testlos = 0, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 100.0)
  359. {
  360. // Create an object for no players.
  361. new
  362. Text3D:id = CreateDynamic3DTextLabel(text, color, x, y, z, drawdistance, attachedplayer, attachedvehicle, testlos, worldid, interiorid, playerid, streamdistance);
  363. Streamer_SetArrayData(STREAMER_TYPE_3D_TEXT_LABEL, id, E_STREAMER_PLAYER_ID, YSI_gscEmpty, 0);
  364. SText3D_InitialiseFromGroups(id);
  365. return id;
  366. }
  367. #if defined _ALS_CreateDynamic3DTextLabel
  368. #undef CreateDynamic3DTextLabel
  369. #else
  370. #define _ALS_CreateDynamic3DTextLabel
  371. #endif
  372. #define CreateDynamic3DTextLabel IPS_CreateDynamic3DTextLabel
  373. stock Text3D:IPS_CreateDynamic3DTextLabelEx(const text[], color, Float:x, Float:y, Float:z, Float:drawdistance, attachedplayer = INVALID_PLAYER_ID, attachedvehicle = INVALID_VEHICLE_ID, testlos = 0, Float:streamdistance = 100.0, worlds[] = { -1 }, interiors[] = { -1 }, players[] = { -1 }, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players)
  374. {
  375. // Create an object for no players.
  376. new
  377. Text3D:id = CreateDynamic3DTextLabelEx(text, color, x, y, z, drawdistance, attachedplayer, attachedvehicle, testlos, streamdistance, worlds, interiors, players, maxworlds, maxinteriors, maxplayers);
  378. Streamer_SetArrayData(STREAMER_TYPE_3D_TEXT_LABEL, id, E_STREAMER_PLAYER_ID, YSI_gscEmpty, 0);
  379. SText3D_InitialiseFromGroups(id);
  380. return id;
  381. }
  382. #if defined _ALS_CreateDynamic3DTextLabelEx
  383. #undef CreateDynamic3DTextLabelEx
  384. #else
  385. #define _ALS_CreateDynamic3DTextLabelEx
  386. #endif
  387. #define CreateDynamic3DTextLabelEx IPS_CreateDynamic3DTextLabelEx
  388. #endif
  389. #if IPS_MAX_AREAS != 0
  390. #undef _GROUP_MAKE_NAME
  391. #undef _GROUP_MAKE_LIMIT
  392. #define _GROUP_MAKE_NAME<%0...%1> %0SArea%1
  393. #define _GROUP_MAKE_LIMIT IPS_MAX_AREAS
  394. // Include the second half of the file for the methods.
  395. #include "y_groupsingle"
  396. #include "y_groupsecond"
  397. foreign void:SArea_SetPlayer(o,p,bool:s);
  398. global void:SArea_SetPlayer(o,p,bool:s)
  399. {
  400. if (s) Streamer_AppendArrayData(STREAMER_TYPE_AREA, o, E_STREAMER_PLAYER_ID, p);
  401. else Streamer_RemoveArrayData(STREAMER_TYPE_AREA, o, E_STREAMER_PLAYER_ID, p);
  402. //return s;
  403. }
  404. stock IPS_CreateDynamicCircle(Float:x, Float:y, Float:size, worldid = -1, interiorid = -1, playerid = -1)
  405. {
  406. new
  407. id = CreateDynamicCircle(x, y, size, worldid, interiorid, playerid);
  408. Streamer_SetArrayData(STREAMER_TYPE_AREA, id, E_STREAMER_PLAYER_ID, YSI_gscEmpty, 0);
  409. SArea_InitialiseFromGroups(id);
  410. return id;
  411. }
  412. #if defined _ALS_CreateDynamicCircle
  413. #undef CreateDynamicCircle
  414. #else
  415. #define _ALS_CreateDynamicCircle
  416. #endif
  417. #define CreateDynamicCircle IPS_CreateDynamicCircle
  418. stock IPS_CreateDynamicRectangle(Float:minx, Float:miny, Float:maxx, Float:maxy, worldid = -1, interiorid = -1, playerid = -1)
  419. {
  420. new
  421. id = CreateDynamicRectangle(minx, miny, maxx, maxy, worldid, interiorid, playerid);
  422. Streamer_SetArrayData(STREAMER_TYPE_AREA, id, E_STREAMER_PLAYER_ID, YSI_gscEmpty, 0);
  423. SArea_InitialiseFromGroups(id);
  424. return id;
  425. }
  426. #if defined _ALS_CreateDynamicRectangle
  427. #undef CreateDynamicRectangle
  428. #else
  429. #define _ALS_CreateDynamicRectangle
  430. #endif
  431. #define CreateDynamicRectangle IPS_CreateDynamicRectangle
  432. stock IPS_CreateDynamicSphere(Float:x, Float:y, Float:z, Float:size, worldid = -1, interiorid = -1, playerid = -1)
  433. {
  434. new
  435. id = CreateDynamicSphere(x, y, z, size, worldid, interiorid, playerid);
  436. Streamer_SetArrayData(STREAMER_TYPE_AREA, id, E_STREAMER_PLAYER_ID, YSI_gscEmpty, 0);
  437. SArea_InitialiseFromGroups(id);
  438. return id;
  439. }
  440. #if defined _ALS_CreateDynamicSphere
  441. #undef CreateDynamicSphere
  442. #else
  443. #define _ALS_CreateDynamicSphere
  444. #endif
  445. #define CreateDynamicSphere IPS_CreateDynamicSphere
  446. stock IPS_CreateDynamicCube(Float:minx, Float:miny, Float:minz, Float:maxx, Float:maxy, Float:maxz, worldid = -1, interiorid = -1, playerid = -1)
  447. {
  448. new
  449. id = CreateDynamicCube(minx, miny, minz, maxx, maxy, maxz, worldid, interiorid, playerid);
  450. Streamer_SetArrayData(STREAMER_TYPE_AREA, id, E_STREAMER_PLAYER_ID, YSI_gscEmpty, 0);
  451. SArea_InitialiseFromGroups(id);
  452. return id;
  453. }
  454. #if defined _ALS_CreateDynamicCube
  455. #undef CreateDynamicCube
  456. #else
  457. #define _ALS_CreateDynamicCube
  458. #endif
  459. #define CreateDynamicCube IPS_CreateDynamicCube
  460. stock IPS_CreateDynamicPolygon(Float:points[], Float:minz = -FLOAT_INFINITY, Float:maxz = FLOAT_INFINITY, maxpoints = sizeof points, worldid = -1, interiorid = -1, playerid = -1)
  461. {
  462. new
  463. id = CreateDynamicPolygon(points[], minz, maxz, maxpoints, worldid, interiorid, playerid);
  464. Streamer_SetArrayData(STREAMER_TYPE_AREA, id, E_STREAMER_PLAYER_ID, YSI_gscEmpty, 0);
  465. SArea_InitialiseFromGroups(id);
  466. return id;
  467. }
  468. #if defined _ALS_CreateDynamicPolygon
  469. #undef CreateDynamicPolygon
  470. #else
  471. #define _ALS_CreateDynamicPolygon
  472. #endif
  473. #define CreateDynamicPolygon IPS_CreateDynamicPolygon
  474. stock IPS_CreateDynamicCircleEx(Float:x, Float:y, Float:size, worlds[] = { -1 }, interiors[] = { -1 }, players[] = { -1 }, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players)
  475. {
  476. new
  477. id = CreateDynamicCircleEx(x, y, size, worlds, interiors, players, maxworlds, maxinteriors, maxplayers);
  478. Streamer_SetArrayData(STREAMER_TYPE_AREA, id, E_STREAMER_PLAYER_ID, YSI_gscEmpty, 0);
  479. SArea_InitialiseFromGroups(id);
  480. return id;
  481. }
  482. #if defined _ALS_CreateDynamicCircleEx
  483. #undef CreateDynamicCircleEx
  484. #else
  485. #define _ALS_CreateDynamicCircleEx
  486. #endif
  487. #define CreateDynamicCircleEx IPS_CreateDynamicCircleEx
  488. stock IPS_CreateDynamicRectangleEx(Float:minx, Float:miny, Float:maxx, Float:maxy, worlds[] = { -1 }, interiors[] = { -1 }, players[] = { -1 }, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players)
  489. {
  490. new
  491. id = CreateDynamicRectangleEx(minx, miny, maxx, maxy, worlds, interiors, players, maxworlds, maxinteriors, maxplayers);
  492. Streamer_SetArrayData(STREAMER_TYPE_AREA, id, E_STREAMER_PLAYER_ID, YSI_gscEmpty, 0);
  493. SArea_InitialiseFromGroups(id);
  494. return id;
  495. }
  496. #if defined _ALS_CreateDynamicRectangleEx
  497. #undef CreateDynamicRectangleEx
  498. #else
  499. #define _ALS_CreateDynamicRectangleEx
  500. #endif
  501. #define CreateDynamicRectangleEx IPS_CreateDynamicRectangleEx
  502. stock IPS_CreateDynamicSphereEx(Float:x, Float:y, Float:z, Float:size, worlds[] = { -1 }, interiors[] = { -1 }, players[] = { -1 }, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players)
  503. {
  504. new
  505. id = CreateDynamicSphereEx(x, y, z, size, worlds, interiors, players, maxworlds, maxinteriors, maxplayers);
  506. Streamer_SetArrayData(STREAMER_TYPE_AREA, id, E_STREAMER_PLAYER_ID, YSI_gscEmpty, 0);
  507. SArea_InitialiseFromGroups(id);
  508. return id;
  509. }
  510. #if defined _ALS_CreateDynamicSphereEx
  511. #undef CreateDynamicSphereEx
  512. #else
  513. #define _ALS_CreateDynamicSphereEx
  514. #endif
  515. #define CreateDynamicSphereEx IPS_CreateDynamicSphereEx
  516. stock IPS_CreateDynamicCubeEx(Float:minx, Float:miny, Float:minz, Float:maxx, Float:maxy, Float:maxz, worlds[] = { -1 }, interiors[] = { -1 }, players[] = { -1 }, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players)
  517. {
  518. new
  519. id = CreateDynamicCubeEx(minx, miny, minz, maxx, maxy, maxz, worlds, interiors, players, maxworlds, maxinteriors, maxplayers);
  520. Streamer_SetArrayData(STREAMER_TYPE_AREA, id, E_STREAMER_PLAYER_ID, YSI_gscEmpty, 0);
  521. SArea_InitialiseFromGroups(id);
  522. return id;
  523. }
  524. #if defined _ALS_CreateDynamicCubeEx
  525. #undef CreateDynamicCubeEx
  526. #else
  527. #define _ALS_CreateDynamicCubeEx
  528. #endif
  529. #define CreateDynamicCubeEx IPS_CreateDynamicCubeEx
  530. stock IPS_CreateDynamicPolygonEx(Float:points[], Float:minz = -FLOAT_INFINITY, Float:maxz = FLOAT_INFINITY, maxpoints = sizeof points, worlds[] = { -1 }, interiors[] = { -1 }, players[] = { -1 }, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players)
  531. {
  532. new
  533. id = CreateDynamicPolygonEx(points, minz, maxz, maxpoints, worlds, interiors, players, maxworlds, maxinteriors, maxplayers);
  534. Streamer_SetArrayData(STREAMER_TYPE_AREA, id, E_STREAMER_PLAYER_ID, YSI_gscEmpty, 0);
  535. SArea_InitialiseFromGroups(id);
  536. return id;
  537. }
  538. #if defined _ALS_CreateDynamicPolygonEx
  539. #undef CreateDynamicPolygonEx
  540. #else
  541. #define _ALS_CreateDynamicPolygonEx
  542. #endif
  543. #define CreateDynamicPolygonEx IPS_CreateDynamicPolygonEx
  544. #endif