y_incognitostreamer.inc 22 KB

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