streamer.inc 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456
  1. /*
  2. * Copyright (C) 2017 Incognito
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #if defined _streamer_included
  17. #endinput
  18. #endif
  19. #define _streamer_included
  20. #include <a_samp>
  21. // Definitions
  22. #define STREAMER_TYPE_OBJECT (0)
  23. #define STREAMER_TYPE_PICKUP (1)
  24. #define STREAMER_TYPE_CP (2)
  25. #define STREAMER_TYPE_RACE_CP (3)
  26. #define STREAMER_TYPE_MAP_ICON (4)
  27. #define STREAMER_TYPE_3D_TEXT_LABEL (5)
  28. #define STREAMER_TYPE_AREA (6)
  29. #define STREAMER_TYPE_ACTOR (7)
  30. #define STREAMER_AREA_TYPE_CIRCLE (0)
  31. #define STREAMER_AREA_TYPE_CYLINDER (1)
  32. #define STREAMER_AREA_TYPE_SPHERE (2)
  33. #define STREAMER_AREA_TYPE_RECTANGLE (3)
  34. #define STREAMER_AREA_TYPE_CUBOID (4)
  35. #define STREAMER_AREA_TYPE_POLYGON (5)
  36. #define STREAMER_OBJECT_TYPE_GLOBAL (0)
  37. #define STREAMER_OBJECT_TYPE_PLAYER (1)
  38. #define STREAMER_OBJECT_TYPE_DYNAMIC (2)
  39. #define STREAMER_MAX_TYPES (8)
  40. #define STREAMER_MAX_AREA_TYPES (6)
  41. #define STREAMER_MAX_OBJECT_TYPES (3)
  42. #define INVALID_STREAMER_ID (0)
  43. #if !defined FLOAT_INFINITY
  44. #define FLOAT_INFINITY (Float:0x7F800000)
  45. #endif
  46. #if defined STREAMER_ENABLE_TAGS
  47. #define STREAMER_TAG_OBJECT DynamicObject
  48. #define STREAMER_TAG_OBJECT_ALT {DynamicObject,_}
  49. #define STREAMER_TAG_PICKUP DynamicPickup
  50. #define STREAMER_TAG_CP DynamicCP
  51. #define STREAMER_TAG_RACE_CP DynamicRaceCP
  52. #define STREAMER_TAG_MAP_ICON DynamicMapIcon
  53. #define STREAMER_TAG_3D_TEXT_LABEL DynamicText3D
  54. #define STREAMER_TAG_AREA DynamicArea
  55. #define STREAMER_TAG_ACTOR DynamicActor
  56. #define STREAMER_ALL_TAGS {DynamicObject,DynamicPickup,DynamicCP,DynamicRaceCP,DynamicMapIcon,DynamicText3D,DynamicArea,DynamicActor,_}
  57. #else
  58. #define STREAMER_TAG_OBJECT _
  59. #define STREAMER_TAG_OBJECT_ALT _
  60. #define STREAMER_TAG_PICKUP _
  61. #define STREAMER_TAG_CP _
  62. #define STREAMER_TAG_RACE_CP _
  63. #define STREAMER_TAG_MAP_ICON _
  64. #define STREAMER_TAG_AREA _
  65. #define STREAMER_TAG_ACTOR _
  66. #if defined STREAMER_REMOVE_TEXT3D_TAG
  67. #define STREAMER_TAG_3D_TEXT_LABEL _
  68. #define STREAMER_ALL_TAGS _
  69. #else
  70. #if defined STREAMER_USE_DYNAMIC_TEXT3D_TAG
  71. #define STREAMER_TAG_3D_TEXT_LABEL DynamicText3D
  72. #define STREAMER_ALL_TAGS {DynamicText3D,_}
  73. #else
  74. #define STREAMER_TAG_3D_TEXT_LABEL Text3D
  75. #define STREAMER_ALL_TAGS {Text3D,_}
  76. #endif
  77. #endif
  78. #endif
  79. #if !defined STREAMER_OBJECT_SD
  80. #define STREAMER_OBJECT_SD 300.0
  81. #endif
  82. #if !defined STREAMER_OBJECT_DD
  83. #define STREAMER_OBJECT_DD 0.0
  84. #endif
  85. #if !defined STREAMER_PICKUP_SD
  86. #define STREAMER_PICKUP_SD 200.0
  87. #endif
  88. #if !defined STREAMER_CP_SD
  89. #define STREAMER_CP_SD 200.0
  90. #endif
  91. #if !defined STREAMER_RACE_CP_SD
  92. #define STREAMER_RACE_CP_SD 200.0
  93. #endif
  94. #if !defined STREAMER_MAP_ICON_SD
  95. #define STREAMER_MAP_ICON_SD 200.0
  96. #endif
  97. #if !defined STREAMER_3D_TEXT_LABEL_SD
  98. #define STREAMER_3D_TEXT_LABEL_SD 200.0
  99. #endif
  100. #if !defined STREAMER_ACTOR_SD
  101. #define STREAMER_ACTOR_SD 200.0
  102. #endif
  103. // Include File Version
  104. public Streamer_IncludeFileVersion = 0x295;
  105. #pragma unused Streamer_IncludeFileVersion
  106. // Enum
  107. enum
  108. {
  109. E_STREAMER_AREA_ID,
  110. E_STREAMER_ATTACHED_OBJECT,
  111. E_STREAMER_ATTACHED_PLAYER,
  112. E_STREAMER_ATTACHED_VEHICLE,
  113. E_STREAMER_ATTACH_OFFSET_X,
  114. E_STREAMER_ATTACH_OFFSET_Y,
  115. E_STREAMER_ATTACH_OFFSET_Z,
  116. E_STREAMER_ATTACH_R_X,
  117. E_STREAMER_ATTACH_R_Y,
  118. E_STREAMER_ATTACH_R_Z,
  119. E_STREAMER_ATTACH_X,
  120. E_STREAMER_ATTACH_Y,
  121. E_STREAMER_ATTACH_Z,
  122. E_STREAMER_COLOR,
  123. E_STREAMER_DRAW_DISTANCE,
  124. E_STREAMER_EXTRA_ID,
  125. E_STREAMER_HEALTH,
  126. E_STREAMER_INTERIOR_ID,
  127. E_STREAMER_INVULNERABLE,
  128. E_STREAMER_MAX_X,
  129. E_STREAMER_MAX_Y,
  130. E_STREAMER_MAX_Z,
  131. E_STREAMER_MIN_X,
  132. E_STREAMER_MIN_Y,
  133. E_STREAMER_MIN_Z,
  134. E_STREAMER_MODEL_ID,
  135. E_STREAMER_MOVE_R_X,
  136. E_STREAMER_MOVE_R_Y,
  137. E_STREAMER_MOVE_R_Z,
  138. E_STREAMER_MOVE_SPEED,
  139. E_STREAMER_MOVE_X,
  140. E_STREAMER_MOVE_Y,
  141. E_STREAMER_MOVE_Z,
  142. E_STREAMER_NEXT_X,
  143. E_STREAMER_NEXT_Y,
  144. E_STREAMER_NEXT_Z,
  145. E_STREAMER_PLAYER_ID,
  146. E_STREAMER_PRIORITY,
  147. E_STREAMER_ROTATION,
  148. E_STREAMER_R_X,
  149. E_STREAMER_R_Y,
  150. E_STREAMER_R_Z,
  151. E_STREAMER_SIZE,
  152. E_STREAMER_STREAM_DISTANCE,
  153. E_STREAMER_STYLE,
  154. E_STREAMER_SYNC_ROTATION,
  155. E_STREAMER_TEST_LOS,
  156. E_STREAMER_TYPE,
  157. E_STREAMER_WORLD_ID,
  158. E_STREAMER_X,
  159. E_STREAMER_Y,
  160. E_STREAMER_Z
  161. }
  162. #define E_STREAMER_CUSTOM(%0) ((%0) | 0x40000000 & ~0x80000000)
  163. // Natives (Settings)
  164. native Streamer_GetTickRate();
  165. native Streamer_SetTickRate(rate);
  166. native Streamer_GetPlayerTickRate(playerid);
  167. native Streamer_SetPlayerTickRate(playerid, rate);
  168. native Streamer_ToggleChunkStream(toggle);
  169. native Streamer_IsToggleChunkStream();
  170. native Streamer_GetChunkTickRate(type, playerid = -1);
  171. native Streamer_SetChunkTickRate(type, rate, playerid = -1);
  172. native Streamer_GetChunkSize(type);
  173. native Streamer_SetChunkSize(type, size);
  174. native Streamer_GetMaxItems(type);
  175. native Streamer_SetMaxItems(type, items);
  176. native Streamer_GetVisibleItems(type, playerid = -1);
  177. native Streamer_SetVisibleItems(type, items, playerid = -1);
  178. native Streamer_GetRadiusMultiplier(type, &Float:multiplier, playerid = -1);
  179. native Streamer_SetRadiusMultiplier(type, Float:multiplier, playerid = -1);
  180. native Streamer_GetTypePriority(types[], maxtypes = sizeof types);
  181. native Streamer_SetTypePriority(const types[], maxtypes = sizeof types);
  182. native Streamer_GetCellDistance(&Float:distance);
  183. native Streamer_SetCellDistance(Float:distance);
  184. native Streamer_GetCellSize(&Float:size);
  185. native Streamer_SetCellSize(Float:size);
  186. native Streamer_ToggleItemStatic(type, STREAMER_ALL_TAGS:id, toggle);
  187. native Streamer_IsToggleItemStatic(type, STREAMER_ALL_TAGS:id);
  188. native Streamer_ToggleItemInvAreas(type, STREAMER_ALL_TAGS:id, toggle);
  189. native Streamer_IsToggleItemInvAreas(type, STREAMER_ALL_TAGS:id);
  190. native Streamer_ToggleItemCallbacks(type, STREAMER_ALL_TAGS:id, toggle);
  191. native Streamer_IsToggleItemCallbacks(type, STREAMER_ALL_TAGS:id);
  192. native Streamer_ToggleErrorCallback(toggle);
  193. native Streamer_IsToggleErrorCallback();
  194. native Streamer_AmxUnloadDestroyItems(toggle);
  195. // Natives (Updates)
  196. native Streamer_ProcessActiveItems();
  197. native Streamer_ToggleIdleUpdate(playerid, toggle);
  198. native Streamer_IsToggleIdleUpdate(playerid);
  199. native Streamer_ToggleCameraUpdate(playerid, toggle);
  200. native Streamer_IsToggleCameraUpdate(playerid);
  201. native Streamer_ToggleItemUpdate(playerid, type, toggle);
  202. native Streamer_IsToggleItemUpdate(playerid, type);
  203. native Streamer_GetLastUpdateTime(&Float:time);
  204. native Streamer_Update(playerid, type = -1);
  205. native Streamer_UpdateEx(playerid, Float:x, Float:y, Float:z, worldid = -1, interiorid = -1, type = -1, compensatedtime = -1, freezeplayer = 1);
  206. // Natives (Data Manipulation)
  207. native Streamer_GetFloatData(type, STREAMER_ALL_TAGS:id, data, &Float:result);
  208. native Streamer_SetFloatData(type, STREAMER_ALL_TAGS:id, data, Float:value);
  209. native Streamer_GetIntData(type, STREAMER_ALL_TAGS:id, data);
  210. native Streamer_SetIntData(type, STREAMER_ALL_TAGS:id, data, value);
  211. native Streamer_RemoveIntData(type, STREAMER_ALL_TAGS:id, data);
  212. native Streamer_HasIntData(type, STREAMER_ALL_TAGS:id, data);
  213. native Streamer_GetArrayData(type, STREAMER_ALL_TAGS:id, data, dest[], maxdest = sizeof dest);
  214. native Streamer_SetArrayData(type, STREAMER_ALL_TAGS:id, data, const src[], maxsrc = sizeof src);
  215. native Streamer_IsInArrayData(type, STREAMER_ALL_TAGS:id, data, value);
  216. native Streamer_AppendArrayData(type, STREAMER_ALL_TAGS:id, data, value);
  217. native Streamer_RemoveArrayData(type, STREAMER_ALL_TAGS:id, data, value);
  218. native Streamer_HasArrayData(type, STREAMER_ALL_TAGS:id, data);
  219. native Streamer_GetArrayDataLength(type, STREAMER_ALL_TAGS:id, data);
  220. native Streamer_GetUpperBound(type);
  221. // Natives (Miscellaneous)
  222. native Streamer_GetDistanceToItem(Float:x, Float:y, Float:z, type, STREAMER_ALL_TAGS:id, &Float:distance, dimensions = 3);
  223. native Streamer_ToggleItem(playerid, type, STREAMER_ALL_TAGS:id, toggle);
  224. native Streamer_IsToggleItem(playerid, type, STREAMER_ALL_TAGS:id);
  225. native Streamer_ToggleAllItems(playerid, type, toggle, const exceptions[] = { -1 }, maxexceptions = sizeof exceptions);
  226. native Streamer_GetItemInternalID(playerid, type, STREAMER_ALL_TAGS:streamerid);
  227. native Streamer_GetItemStreamerID(playerid, type, internalid);
  228. native Streamer_IsItemVisible(playerid, type, STREAMER_ALL_TAGS:id);
  229. native Streamer_DestroyAllVisibleItems(playerid, type, serverwide = 1);
  230. native Streamer_CountVisibleItems(playerid, type, serverwide = 1);
  231. native Streamer_DestroyAllItems(type, serverwide = 1);
  232. native Streamer_CountItems(type, serverwide = 1);
  233. native Streamer_GetNearbyItems(Float:x, Float:y, Float:z, type, STREAMER_ALL_TAGS:items[], maxitems = sizeof items, Float:range = 300.0, worldid = -1);
  234. native Streamer_GetAllVisibleItems(playerid, type, STREAMER_ALL_TAGS:items[], maxitems = sizeof items);
  235. native Streamer_GetItemPos(type, STREAMER_ALL_TAGS:id, &Float:x, &Float:y, &Float:z);
  236. native Streamer_SetItemPos(type, STREAMER_ALL_TAGS:id, Float:x, Float:y, Float:z);
  237. native Streamer_GetItemOffset(type, STREAMER_ALL_TAGS:id, &Float:x, &Float:y, &Float:z);
  238. native Streamer_SetItemOffset(type, STREAMER_ALL_TAGS:id, Float:x, Float:y, Float:z);
  239. // Natives (Objects)
  240. native STREAMER_TAG_OBJECT:CreateDynamicObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = STREAMER_OBJECT_SD, Float:drawdistance = STREAMER_OBJECT_DD, STREAMER_TAG_AREA:areaid = STREAMER_TAG_AREA:-1, priority = 0);
  241. native DestroyDynamicObject(STREAMER_TAG_OBJECT:objectid);
  242. native IsValidDynamicObject(STREAMER_TAG_OBJECT:objectid);
  243. native GetDynamicObjectPos(STREAMER_TAG_OBJECT:objectid, &Float:x, &Float:y, &Float:z);
  244. native SetDynamicObjectPos(STREAMER_TAG_OBJECT:objectid, Float:x, Float:y, Float:z);
  245. native GetDynamicObjectRot(STREAMER_TAG_OBJECT:objectid, &Float:rx, &Float:ry, &Float:rz);
  246. native SetDynamicObjectRot(STREAMER_TAG_OBJECT:objectid, Float:rx, Float:ry, Float:rz);
  247. native GetDynamicObjectNoCameraCol(STREAMER_TAG_OBJECT:objectid);
  248. native SetDynamicObjectNoCameraCol(STREAMER_TAG_OBJECT:objectid);
  249. native MoveDynamicObject(STREAMER_TAG_OBJECT:objectid, Float:x, Float:y, Float:z, Float:speed, Float:rx = -1000.0, Float:ry = -1000.0, Float:rz = -1000.0);
  250. native StopDynamicObject(STREAMER_TAG_OBJECT:objectid);
  251. native IsDynamicObjectMoving(STREAMER_TAG_OBJECT:objectid);
  252. native AttachCameraToDynamicObject(playerid, STREAMER_TAG_OBJECT:objectid);
  253. native AttachDynamicObjectToObject(STREAMER_TAG_OBJECT:objectid, attachtoid, Float:offsetx, Float:offsety, Float:offsetz, Float:rx, Float:ry, Float:rz, syncrotation = 1);
  254. native AttachDynamicObjectToPlayer(STREAMER_TAG_OBJECT:objectid, playerid, Float:offsetx, Float:offsety, Float:offsetz, Float:rx, Float:ry, Float:rz);
  255. native AttachDynamicObjectToVehicle(STREAMER_TAG_OBJECT:objectid, vehicleid, Float:offsetx, Float:offsety, Float:offsetz, Float:rx, Float:ry, Float:rz);
  256. native EditDynamicObject(playerid, STREAMER_TAG_OBJECT:objectid);
  257. native IsDynamicObjectMaterialUsed(STREAMER_TAG_OBJECT:objectid, materialindex);
  258. native RemoveDynamicObjectMaterial(STREAMER_TAG_OBJECT:objectid, materialindex);
  259. native GetDynamicObjectMaterial(STREAMER_TAG_OBJECT:objectid, materialindex, &modelid, txdname[], texturename[], &materialcolor, maxtxdname = sizeof txdname, maxtexturename = sizeof texturename);
  260. native SetDynamicObjectMaterial(STREAMER_TAG_OBJECT:objectid, materialindex, modelid, const txdname[], const texturename[], materialcolor = 0);
  261. native IsDynamicObjectMaterialTextUsed(STREAMER_TAG_OBJECT:objectid, materialindex);
  262. native RemoveDynamicObjectMaterialText(STREAMER_TAG_OBJECT:objectid, materialindex);
  263. native GetDynamicObjectMaterialText(STREAMER_TAG_OBJECT:objectid, materialindex, text[], &materialsize, fontface[], &fontsize, &bold, &fontcolor, &backcolor, &textalignment, maxtext = sizeof text, maxfontface = sizeof fontface);
  264. native SetDynamicObjectMaterialText(STREAMER_TAG_OBJECT:objectid, materialindex, const text[], materialsize = OBJECT_MATERIAL_SIZE_256x128, const fontface[] = "Arial", fontsize = 24, bold = 1, fontcolor = 0xFFFFFFFF, backcolor = 0, textalignment = 0);
  265. native STREAMER_TAG_OBJECT:GetPlayerCameraTargetDynObject(playerid);
  266. // Natives (Pickups)
  267. native STREAMER_TAG_PICKUP:CreateDynamicPickup(modelid, type, Float:x, Float:y, Float:z, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = STREAMER_PICKUP_SD, STREAMER_TAG_AREA:areaid = STREAMER_TAG_AREA:-1, priority = 0);
  268. native DestroyDynamicPickup(STREAMER_TAG_PICKUP:pickupid);
  269. native IsValidDynamicPickup(STREAMER_TAG_PICKUP:pickupid);
  270. // Natives (Checkpoints)
  271. native STREAMER_TAG_CP:CreateDynamicCP(Float:x, Float:y, Float:z, Float:size, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = STREAMER_CP_SD, STREAMER_TAG_AREA:areaid = STREAMER_TAG_AREA:-1, priority = 0);
  272. native DestroyDynamicCP(STREAMER_TAG_CP:checkpointid);
  273. native IsValidDynamicCP(STREAMER_TAG_CP:checkpointid);
  274. native IsPlayerInDynamicCP(playerid, STREAMER_TAG_CP:checkpointid);
  275. native STREAMER_TAG_CP:GetPlayerVisibleDynamicCP(playerid);
  276. // Natives (Race Checkpoints)
  277. native STREAMER_TAG_RACE_CP:CreateDynamicRaceCP(type, Float:x, Float:y, Float:z, Float:nextx, Float:nexty, Float:nextz, Float:size, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = STREAMER_RACE_CP_SD, STREAMER_TAG_AREA:areaid = STREAMER_TAG_AREA:-1, priority = 0);
  278. native DestroyDynamicRaceCP(STREAMER_TAG_RACE_CP:checkpointid);
  279. native IsValidDynamicRaceCP(STREAMER_TAG_RACE_CP:checkpointid);
  280. native IsPlayerInDynamicRaceCP(playerid, STREAMER_TAG_RACE_CP:checkpointid);
  281. native STREAMER_TAG_RACE_CP:GetPlayerVisibleDynamicRaceCP(playerid);
  282. // Natives (Map Icons)
  283. native STREAMER_TAG_MAP_ICON:CreateDynamicMapIcon(Float:x, Float:y, Float:z, type, color, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = STREAMER_MAP_ICON_SD, style = MAPICON_LOCAL, STREAMER_TAG_AREA:areaid = STREAMER_TAG_AREA:-1, priority = 0);
  284. native DestroyDynamicMapIcon(STREAMER_TAG_MAP_ICON:iconid);
  285. native IsValidDynamicMapIcon(STREAMER_TAG_MAP_ICON:iconid);
  286. // Natives (3D Text Labels)
  287. native STREAMER_TAG_3D_TEXT_LABEL: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 = STREAMER_3D_TEXT_LABEL_SD, STREAMER_TAG_AREA:areaid = STREAMER_TAG_AREA:-1, priority = 0);
  288. native DestroyDynamic3DTextLabel(STREAMER_TAG_3D_TEXT_LABEL:id);
  289. native IsValidDynamic3DTextLabel(STREAMER_TAG_3D_TEXT_LABEL:id);
  290. native GetDynamic3DTextLabelText(STREAMER_TAG_3D_TEXT_LABEL:id, text[], maxtext = sizeof text);
  291. native UpdateDynamic3DTextLabelText(STREAMER_TAG_3D_TEXT_LABEL:id, color, const text[]);
  292. // Natives (Areas)
  293. native STREAMER_TAG_AREA:CreateDynamicCircle(Float:x, Float:y, Float:size, worldid = -1, interiorid = -1, playerid = -1, priority = 0);
  294. native STREAMER_TAG_AREA:CreateDynamicCylinder(Float:x, Float:y, Float:minz, Float:maxz, Float:size, worldid = -1, interiorid = -1, playerid = -1, priority = 0);
  295. native STREAMER_TAG_AREA:CreateDynamicSphere(Float:x, Float:y, Float:z, Float:size, worldid = -1, interiorid = -1, playerid = -1, priority = 0);
  296. native STREAMER_TAG_AREA:CreateDynamicRectangle(Float:minx, Float:miny, Float:maxx, Float:maxy, worldid = -1, interiorid = -1, playerid = -1, priority = 0);
  297. native STREAMER_TAG_AREA:CreateDynamicCuboid(Float:minx, Float:miny, Float:minz, Float:maxx, Float:maxy, Float:maxz, worldid = -1, interiorid = -1, playerid = -1, priority = 0);
  298. native STREAMER_TAG_AREA:CreateDynamicCube(Float:minx, Float:miny, Float:minz, Float:maxx, Float:maxy, Float:maxz, worldid = -1, interiorid = -1, playerid = -1, priority = 0);
  299. native STREAMER_TAG_AREA:CreateDynamicPolygon(const Float:points[], Float:minz = -FLOAT_INFINITY, Float:maxz = FLOAT_INFINITY, maxpoints = sizeof points, worldid = -1, interiorid = -1, playerid = -1, priority = 0);
  300. native DestroyDynamicArea(STREAMER_TAG_AREA:areaid);
  301. native IsValidDynamicArea(STREAMER_TAG_AREA:areaid);
  302. native GetDynamicAreaType(STREAMER_TAG_AREA:areaid);
  303. native GetDynamicPolygonPoints(STREAMER_TAG_AREA:areaid, Float:points[], maxpoints = sizeof points);
  304. native GetDynamicPolygonNumberPoints(STREAMER_TAG_AREA:areaid);
  305. native IsPlayerInDynamicArea(playerid, STREAMER_TAG_AREA:areaid, recheck = 0);
  306. native IsPlayerInAnyDynamicArea(playerid, recheck = 0);
  307. native IsAnyPlayerInDynamicArea(STREAMER_TAG_AREA:areaid, recheck = 0);
  308. native IsAnyPlayerInAnyDynamicArea(recheck = 0);
  309. native GetPlayerDynamicAreas(playerid, STREAMER_TAG_AREA:areas[], maxareas = sizeof areas);
  310. native GetPlayerNumberDynamicAreas(playerid);
  311. native IsPointInDynamicArea(STREAMER_TAG_AREA:areaid, Float:x, Float:y, Float:z);
  312. native IsPointInAnyDynamicArea(Float:x, Float:y, Float:z);
  313. native IsLineInDynamicArea(STREAMER_TAG_AREA:areaid, Float:x1, Float:y1, Float:z1, Float:x2, Float:y2, Float:z2);
  314. native IsLineInAnyDynamicArea(Float:x1, Float:y1, Float:z1, Float:x2, Float:y2, Float:z2);
  315. native GetDynamicAreasForPoint(Float:x, Float:y, Float:z, STREAMER_TAG_AREA:areas[], maxareas = sizeof areas);
  316. native GetNumberDynamicAreasForPoint(Float:x, Float:y, Float:z);
  317. native GetDynamicAreasForLine(Float:x1, Float:y1, Float:z1, Float:x2, Float:y2, Float:z2, STREAMER_TAG_AREA:areas[], maxareas = sizeof areas);
  318. native GetNumberDynamicAreasForLine(Float:x1, Float:y1, Float:z1, Float:x2, Float:y2, Float:z2);
  319. native AttachDynamicAreaToObject(STREAMER_TAG_AREA:areaid, STREAMER_TAG_OBJECT_ALT:objectid, type = STREAMER_OBJECT_TYPE_DYNAMIC, playerid = INVALID_PLAYER_ID, Float:offsetx = 0.0, Float:offsety = 0.0, Float:offsetz = 0.0);
  320. native AttachDynamicAreaToPlayer(STREAMER_TAG_AREA:areaid, playerid, Float:offsetx = 0.0, Float:offsety = 0.0, Float:offsetz = 0.0);
  321. native AttachDynamicAreaToVehicle(STREAMER_TAG_AREA:areaid, vehicleid, Float:offsetx = 0.0, Float:offsety = 0.0, Float:offsetz = 0.0);
  322. native ToggleDynAreaSpectateMode(STREAMER_TAG_AREA:areaid, toggle);
  323. native IsToggleDynAreaSpectateMode(STREAMER_TAG_AREA:areaid);
  324. // Natives (Actors)
  325. native STREAMER_TAG_ACTOR:CreateDynamicActor(modelid, Float:x, Float:y, Float:z, Float:r, invulnerable = true, Float:health = 100.0, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = STREAMER_ACTOR_SD, STREAMER_TAG_AREA:areaid = STREAMER_TAG_AREA:-1, priority = 0);
  326. native DestroyDynamicActor(STREAMER_TAG_ACTOR:actorid);
  327. native IsValidDynamicActor(STREAMER_TAG_ACTOR:actorid);
  328. native IsDynamicActorStreamedIn(STREAMER_TAG_ACTOR:actorid, forplayerid);
  329. native GetDynamicActorVirtualWorld(STREAMER_TAG_ACTOR:actorid);
  330. native SetDynamicActorVirtualWorld(STREAMER_TAG_ACTOR:actorid, vworld);
  331. native GetDynamicActorAnimation(STREAMER_TAG_ACTOR:actorid, animlib[], animname[], &Float:fdelta, &loop, &lockx, &locky, &freeze, &time, maxanimlib = sizeof animlib, maxanimname = sizeof animname);
  332. native ApplyDynamicActorAnimation(STREAMER_TAG_ACTOR:actorid, const animlib[], const animname[], Float:fdelta, loop, lockx, locky, freeze, time);
  333. native ClearDynamicActorAnimations(STREAMER_TAG_ACTOR:actorid);
  334. native GetDynamicActorFacingAngle(STREAMER_TAG_ACTOR:actorid, &Float:ang);
  335. native SetDynamicActorFacingAngle(STREAMER_TAG_ACTOR:actorid, Float:ang);
  336. native GetDynamicActorPos(STREAMER_TAG_ACTOR:actorid, &Float:x, &Float:y, &Float:z);
  337. native SetDynamicActorPos(STREAMER_TAG_ACTOR:actorid, Float:x, Float:y, Float:z);
  338. native GetDynamicActorHealth(STREAMER_TAG_ACTOR:actorid, &Float:health);
  339. native SetDynamicActorHealth(STREAMER_TAG_ACTOR:actorid, Float:health);
  340. native SetDynamicActorInvulnerable(STREAMER_TAG_ACTOR:actorid, invulnerable = true);
  341. native IsDynamicActorInvulnerable(STREAMER_TAG_ACTOR:actorid);
  342. native STREAMER_TAG_ACTOR:GetPlayerTargetDynamicActor(playerid);
  343. native STREAMER_TAG_ACTOR:GetPlayerCameraTargetDynActor(playerid);
  344. // Natives (Extended)
  345. native STREAMER_TAG_OBJECT:CreateDynamicObjectEx(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, Float:streamdistance = STREAMER_OBJECT_SD, Float:drawdistance = STREAMER_OBJECT_DD, const worlds[] = { -1 }, const interiors[] = { -1 }, const players[] = { -1 }, const STREAMER_TAG_AREA:areas[] = { STREAMER_TAG_AREA:-1 }, priority = 0, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players, maxareas = sizeof areas);
  346. native STREAMER_TAG_PICKUP:CreateDynamicPickupEx(modelid, type, Float:x, Float:y, Float:z, Float:streamdistance = STREAMER_PICKUP_SD, const worlds[] = { -1 }, const interiors[] = { -1 }, const players[] = { -1 }, const STREAMER_TAG_AREA:areas[] = { STREAMER_TAG_AREA:-1 }, priority = 0, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players, maxareas = sizeof areas);
  347. native STREAMER_TAG_CP:CreateDynamicCPEx(Float:x, Float:y, Float:z, Float:size, Float:streamdistance = STREAMER_CP_SD, const worlds[] = { -1 }, const interiors[] = { -1 }, const players[] = { -1 }, const STREAMER_TAG_AREA:areas[] = { STREAMER_TAG_AREA:-1 }, priority = 0, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players, maxareas = sizeof areas);
  348. native STREAMER_TAG_RACE_CP:CreateDynamicRaceCPEx(type, Float:x, Float:y, Float:z, Float:nextx, Float:nexty, Float:nextz, Float:size, Float:streamdistance = STREAMER_RACE_CP_SD, const worlds[] = { -1 }, const interiors[] = { -1 }, const players[] = { -1 }, const STREAMER_TAG_AREA:areas[] = { STREAMER_TAG_AREA:-1 }, priority = 0, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players, maxareas = sizeof areas);
  349. native STREAMER_TAG_MAP_ICON:CreateDynamicMapIconEx(Float:x, Float:y, Float:z, type, color, style = MAPICON_LOCAL, Float:streamdistance = STREAMER_MAP_ICON_SD, const worlds[] = { -1 }, const interiors[] = { -1 }, const players[] = { -1 }, const STREAMER_TAG_AREA:areas[] = { STREAMER_TAG_AREA:-1 }, priority = 0, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players, maxareas = sizeof areas);
  350. native STREAMER_TAG_3D_TEXT_LABEL:CreateDynamic3DTextLabelEx(const text[], color, Float:x, Float:y, Float:z, Float:drawdistance, attachedplayer = INVALID_PLAYER_ID, attachedvehicle = INVALID_VEHICLE_ID, testlos = 0, Float:streamdistance = STREAMER_3D_TEXT_LABEL_SD, const worlds[] = { -1 }, const interiors[] = { -1 }, const players[] = { -1 }, const STREAMER_TAG_AREA:areas[] = { STREAMER_TAG_AREA:-1 }, priority = 0,
  351. maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players, maxareas = sizeof areas);
  352. native STREAMER_TAG_AREA:CreateDynamicCircleEx(Float:x, Float:y, Float:size, const worlds[] = { -1 }, const interiors[] = { -1 }, const players[] = { -1 }, priority = 0, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players);
  353. native STREAMER_TAG_AREA:CreateDynamicCylinderEx(Float:x, Float:y, Float:minz, Float:maxz, Float:size, const worlds[] = { -1 }, const interiors[] = { -1 }, const players[] = { -1 }, priority = 0, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players);
  354. native STREAMER_TAG_AREA:CreateDynamicSphereEx(Float:x, Float:y, Float:z, Float:size, const worlds[] = { -1 }, const interiors[] = { -1 }, const players[] = { -1 }, priority = 0, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players);
  355. native STREAMER_TAG_AREA:CreateDynamicRectangleEx(Float:minx, Float:miny, Float:maxx, Float:maxy, const worlds[] = { -1 }, const interiors[] = { -1 }, const players[] = { -1 }, priority = 0, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players);
  356. native STREAMER_TAG_AREA:CreateDynamicCuboidEx(Float:minx, Float:miny, Float:minz, Float:maxx, Float:maxy, Float:maxz, const worlds[] = { -1 }, const interiors[] = { -1 }, const players[] = { -1 }, priority = 0, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players);
  357. native STREAMER_TAG_AREA:CreateDynamicCubeEx(Float:minx, Float:miny, Float:minz, Float:maxx, Float:maxy, Float:maxz, const worlds[] = { -1 }, const interiors[] = { -1 }, const players[] = { -1 }, priority = 0, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players);
  358. native STREAMER_TAG_AREA:CreateDynamicPolygonEx(const Float:points[], Float:minz = -FLOAT_INFINITY, Float:maxz = FLOAT_INFINITY, maxpoints = sizeof points, const worlds[] = { -1 }, const interiors[] = { -1 }, const players[] = { -1 }, priority = 0, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players);
  359. native STREAMER_TAG_ACTOR:CreateDynamicActorEx(modelid, Float:x, Float:y, Float:z, Float:r, invulnerable = 1, Float:health = 100.0, Float:streamdistance = STREAMER_ACTOR_SD, const worlds[] = { -1 }, const interiors[] = { -1 }, const players[] = { -1 }, const STREAMER_TAG_AREA:areas[] = { STREAMER_TAG_AREA:-1 }, priority = 0, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players, maxareas = sizeof areas);
  360. // Natives (Deprecated)
  361. native Streamer_CallbackHook(callback, {Float,_}:...);
  362. native Streamer_TickRate(rate);
  363. native Streamer_MaxItems(type, items);
  364. native Streamer_VisibleItems(type, items, playerid = -1);
  365. native Streamer_CellDistance(Float:distance);
  366. native Streamer_CellSize(Float:size);
  367. native DestroyAllDynamicObjects();
  368. native CountDynamicObjects();
  369. native DestroyAllDynamicPickups();
  370. native CountDynamicPickups();
  371. native DestroyAllDynamicCPs();
  372. native CountDynamicCPs();
  373. native DestroyAllDynamicRaceCPs();
  374. native CountDynamicRaceCPs();
  375. native DestroyAllDynamicMapIcons();
  376. native CountDynamicMapIcons();
  377. native DestroyAllDynamic3DTextLabels();
  378. native CountDynamic3DTextLabels();
  379. native DestroyAllDynamicAreas();
  380. native CountDynamicAreas();
  381. native TogglePlayerDynamicCP(playerid, STREAMER_TAG_CP:checkpointid, toggle);
  382. native TogglePlayerAllDynamicCPs(playerid, toggle, const exceptions[] = { -1 }, maxexceptions = sizeof exceptions);
  383. native TogglePlayerDynamicRaceCP(playerid, STREAMER_TAG_RACE_CP:checkpointid, toggle);
  384. native TogglePlayerAllDynamicRaceCPs(playerid, toggle, const exceptions[] = { -1 }, maxexceptions = sizeof exceptions);
  385. native TogglePlayerDynamicArea(playerid, STREAMER_TAG_AREA:areaid, toggle);
  386. native TogglePlayerAllDynamicAreas(playerid, toggle, const exceptions[] = { -1 }, maxexceptions = sizeof exceptions);
  387. // Callbacks
  388. forward OnDynamicObjectMoved(STREAMER_TAG_OBJECT:objectid);
  389. forward OnPlayerEditDynamicObject(playerid, STREAMER_TAG_OBJECT:objectid, response, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz);
  390. forward OnPlayerSelectDynamicObject(playerid, STREAMER_TAG_OBJECT:objectid, modelid, Float:x, Float:y, Float:z);
  391. forward OnPlayerShootDynamicObject(playerid, weaponid, STREAMER_TAG_OBJECT:objectid, Float:x, Float:y, Float:z);
  392. forward OnPlayerPickUpDynamicPickup(playerid, STREAMER_TAG_PICKUP:pickupid);
  393. forward OnPlayerEnterDynamicCP(playerid, STREAMER_TAG_CP:checkpointid);
  394. forward OnPlayerLeaveDynamicCP(playerid, STREAMER_TAG_CP:checkpointid);
  395. forward OnPlayerEnterDynamicRaceCP(playerid, STREAMER_TAG_RACE_CP:checkpointid);
  396. forward OnPlayerLeaveDynamicRaceCP(playerid, STREAMER_TAG_RACE_CP:checkpointid);
  397. forward OnPlayerEnterDynamicArea(playerid, STREAMER_TAG_AREA:areaid);
  398. forward OnPlayerLeaveDynamicArea(playerid, STREAMER_TAG_AREA:areaid);
  399. forward OnPlayerGiveDamageDynamicActor(playerid, STREAMER_TAG_ACTOR:actorid, Float:amount, weaponid, bodypart);
  400. forward OnDynamicActorStreamIn(STREAMER_TAG_ACTOR:actorid, forplayerid);
  401. forward OnDynamicActorStreamOut(STREAMER_TAG_ACTOR:actorid, forplayerid);
  402. forward Streamer_OnItemStreamIn(type, STREAMER_ALL_TAGS:id, forplayerid);
  403. forward Streamer_OnItemStreamOut(type, STREAMER_ALL_TAGS:id, forplayerid);
  404. forward Streamer_OnPluginError(const error[]);