1
0

y_incognitostreamer.inc 22 KB

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