1
0

y_incognitostreamer.inc 23 KB

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