@nativewrappers/redm-codegen 0.0.4 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (317) hide show
  1. package/dist/classes/AnimScene.d.ts +109 -109
  2. package/dist/classes/AnimScene.d.ts.map +1 -1
  3. package/dist/classes/AnimScene.js +158 -158
  4. package/dist/classes/BaseModel.d.ts +34 -34
  5. package/dist/classes/BaseModel.d.ts.map +1 -1
  6. package/dist/classes/BaseModel.js +53 -53
  7. package/dist/classes/BaseTask.d.ts +36 -36
  8. package/dist/classes/BaseTask.d.ts.map +1 -1
  9. package/dist/classes/BaseTask.js +44 -44
  10. package/dist/classes/Cam.d.ts +91 -91
  11. package/dist/classes/Cam.d.ts.map +1 -1
  12. package/dist/classes/Cam.js +124 -124
  13. package/dist/classes/Entity.d.ts +507 -502
  14. package/dist/classes/Entity.d.ts.map +1 -1
  15. package/dist/classes/Entity.js +723 -714
  16. package/dist/classes/Interior.d.ts +27 -27
  17. package/dist/classes/Interior.d.ts.map +1 -1
  18. package/dist/classes/Interior.js +42 -42
  19. package/dist/classes/ItemSet.d.ts +2 -2
  20. package/dist/classes/ItemSet.d.ts.map +1 -1
  21. package/dist/classes/ItemSet.js +3 -3
  22. package/dist/classes/Ped.d.ts +286 -286
  23. package/dist/classes/Ped.d.ts.map +1 -1
  24. package/dist/classes/Ped.js +425 -425
  25. package/dist/classes/PedModel.d.ts +1 -1
  26. package/dist/classes/PedModel.d.ts.map +1 -1
  27. package/dist/classes/PedModel.js +2 -2
  28. package/dist/classes/PedTask.d.ts +770 -770
  29. package/dist/classes/PedTask.d.ts.map +1 -1
  30. package/dist/classes/PedTask.js +985 -985
  31. package/dist/classes/PersChar.d.ts +11 -11
  32. package/dist/classes/PersChar.d.ts.map +1 -1
  33. package/dist/classes/PersChar.js +23 -23
  34. package/dist/classes/Pickup.d.ts +6 -6
  35. package/dist/classes/Pickup.d.ts.map +1 -1
  36. package/dist/classes/Pickup.js +12 -12
  37. package/dist/classes/Player.d.ts +237 -233
  38. package/dist/classes/Player.d.ts.map +1 -1
  39. package/dist/classes/Player.js +309 -303
  40. package/dist/classes/Prop.d.ts +126 -126
  41. package/dist/classes/Prop.d.ts.map +1 -1
  42. package/dist/classes/Prop.js +180 -180
  43. package/dist/classes/PropSet.d.ts +16 -16
  44. package/dist/classes/PropSet.d.ts.map +1 -1
  45. package/dist/classes/PropSet.js +22 -22
  46. package/dist/classes/Vehicle.d.ts +122 -122
  47. package/dist/classes/Vehicle.d.ts.map +1 -1
  48. package/dist/classes/Vehicle.js +147 -147
  49. package/dist/classes/VehicleModel.d.ts +1 -1
  50. package/dist/classes/VehicleModel.d.ts.map +1 -1
  51. package/dist/classes/VehicleModel.js +2 -2
  52. package/dist/classes/VehicleTask.d.ts +17 -17
  53. package/dist/classes/VehicleTask.d.ts.map +1 -1
  54. package/dist/classes/VehicleTask.js +24 -24
  55. package/dist/classes/Volume.d.ts +44 -44
  56. package/dist/classes/Volume.d.ts.map +1 -1
  57. package/dist/classes/Volume.js +58 -58
  58. package/dist/classes/Weapon.d.ts +243 -243
  59. package/dist/classes/Weapon.d.ts.map +1 -1
  60. package/dist/classes/Weapon.js +339 -339
  61. package/dist/namespaces/Aicoverpoint.d.ts +23 -23
  62. package/dist/namespaces/Aicoverpoint.d.ts.map +1 -1
  63. package/dist/namespaces/Aicoverpoint.js +35 -35
  64. package/dist/namespaces/Aitransport.d.ts +78 -78
  65. package/dist/namespaces/Aitransport.d.ts.map +1 -1
  66. package/dist/namespaces/Aitransport.js +95 -95
  67. package/dist/namespaces/Animscene.d.ts +37 -37
  68. package/dist/namespaces/Animscene.d.ts.map +1 -1
  69. package/dist/namespaces/Animscene.js +51 -51
  70. package/dist/namespaces/Audio.d.ts +395 -395
  71. package/dist/namespaces/Audio.d.ts.map +1 -1
  72. package/dist/namespaces/Audio.js +530 -530
  73. package/dist/namespaces/Bounty.d.ts +23 -23
  74. package/dist/namespaces/Bounty.d.ts.map +1 -1
  75. package/dist/namespaces/Bounty.js +40 -40
  76. package/dist/namespaces/Brain.d.ts +15 -15
  77. package/dist/namespaces/Brain.d.ts.map +1 -1
  78. package/dist/namespaces/Brain.js +20 -20
  79. package/dist/namespaces/CamStatics.d.ts +483 -483
  80. package/dist/namespaces/CamStatics.d.ts.map +1 -1
  81. package/dist/namespaces/CamStatics.js +693 -693
  82. package/dist/namespaces/Clock.d.ts +51 -51
  83. package/dist/namespaces/Clock.d.ts.map +1 -1
  84. package/dist/namespaces/Clock.js +73 -73
  85. package/dist/namespaces/Collection.d.ts +6 -6
  86. package/dist/namespaces/Collection.d.ts.map +1 -1
  87. package/dist/namespaces/Collection.js +11 -11
  88. package/dist/namespaces/Compapp.js +1 -1
  89. package/dist/namespaces/Compendium.d.ts +58 -58
  90. package/dist/namespaces/Compendium.d.ts.map +1 -1
  91. package/dist/namespaces/Compendium.js +83 -83
  92. package/dist/namespaces/Crashlog.js +9 -9
  93. package/dist/namespaces/Crew.d.ts +9 -9
  94. package/dist/namespaces/Crew.d.ts.map +1 -1
  95. package/dist/namespaces/Crew.js +18 -18
  96. package/dist/namespaces/Databinding.d.ts +146 -146
  97. package/dist/namespaces/Databinding.d.ts.map +1 -1
  98. package/dist/namespaces/Databinding.js +218 -218
  99. package/dist/namespaces/Datafile.js +4 -4
  100. package/dist/namespaces/Decorator.d.ts +19 -19
  101. package/dist/namespaces/Decorator.d.ts.map +1 -1
  102. package/dist/namespaces/Decorator.js +34 -34
  103. package/dist/namespaces/Dlc.js +2 -2
  104. package/dist/namespaces/EntityStatics.d.ts +186 -186
  105. package/dist/namespaces/EntityStatics.d.ts.map +1 -1
  106. package/dist/namespaces/EntityStatics.js +249 -249
  107. package/dist/namespaces/Event.js +4 -4
  108. package/dist/namespaces/Fire.d.ts +89 -89
  109. package/dist/namespaces/Fire.d.ts.map +1 -1
  110. package/dist/namespaces/Fire.js +115 -115
  111. package/dist/namespaces/Flock.js +2 -2
  112. package/dist/namespaces/Gang.js +2 -2
  113. package/dist/namespaces/GoogleAnalytics.js +2 -2
  114. package/dist/namespaces/Graphics.d.ts +776 -776
  115. package/dist/namespaces/Graphics.d.ts.map +1 -1
  116. package/dist/namespaces/Graphics.js +1120 -1120
  117. package/dist/namespaces/Hud.d.ts +497 -497
  118. package/dist/namespaces/Hud.d.ts.map +1 -1
  119. package/dist/namespaces/Hud.js +748 -748
  120. package/dist/namespaces/Ik.js +1 -1
  121. package/dist/namespaces/Interaction.js +3 -3
  122. package/dist/namespaces/InteriorStatics.d.ts +40 -40
  123. package/dist/namespaces/InteriorStatics.d.ts.map +1 -1
  124. package/dist/namespaces/InteriorStatics.js +57 -57
  125. package/dist/namespaces/Inventory.d.ts +205 -205
  126. package/dist/namespaces/Inventory.d.ts.map +1 -1
  127. package/dist/namespaces/Inventory.js +340 -340
  128. package/dist/namespaces/Itemdatabase.d.ts +78 -78
  129. package/dist/namespaces/Itemdatabase.d.ts.map +1 -1
  130. package/dist/namespaces/Itemdatabase.js +109 -109
  131. package/dist/namespaces/Itemset.js +2 -2
  132. package/dist/namespaces/Law.d.ts +1 -1
  133. package/dist/namespaces/Law.d.ts.map +1 -1
  134. package/dist/namespaces/Law.js +19 -19
  135. package/dist/namespaces/Localization.js +1 -1
  136. package/dist/namespaces/Map.d.ts +156 -156
  137. package/dist/namespaces/Map.d.ts.map +1 -1
  138. package/dist/namespaces/Map.js +209 -209
  139. package/dist/namespaces/Minigame.d.ts +66 -66
  140. package/dist/namespaces/Minigame.d.ts.map +1 -1
  141. package/dist/namespaces/Minigame.js +111 -111
  142. package/dist/namespaces/Misc.d.ts +3 -3
  143. package/dist/namespaces/Misc.d.ts.map +1 -1
  144. package/dist/namespaces/Misc.js +35 -35
  145. package/dist/namespaces/Missiondata.js +1 -1
  146. package/dist/namespaces/Money.js +3 -3
  147. package/dist/namespaces/Netshopping.d.ts +58 -58
  148. package/dist/namespaces/Netshopping.d.ts.map +1 -1
  149. package/dist/namespaces/Netshopping.js +89 -89
  150. package/dist/namespaces/Network.d.ts +1199 -1199
  151. package/dist/namespaces/Network.d.ts.map +1 -1
  152. package/dist/namespaces/Network.js +1650 -1650
  153. package/dist/namespaces/Object.d.ts +262 -262
  154. package/dist/namespaces/Object.d.ts.map +1 -1
  155. package/dist/namespaces/Object.js +367 -367
  156. package/dist/namespaces/Pad.d.ts +102 -102
  157. package/dist/namespaces/Pad.d.ts.map +1 -1
  158. package/dist/namespaces/Pad.js +141 -141
  159. package/dist/namespaces/Pathfind.js +10 -10
  160. package/dist/namespaces/PedStatics.d.ts +2 -2
  161. package/dist/namespaces/PedStatics.d.ts.map +1 -1
  162. package/dist/namespaces/PedStatics.js +10 -10
  163. package/dist/namespaces/Perschar.d.ts +42 -42
  164. package/dist/namespaces/Perschar.d.ts.map +1 -1
  165. package/dist/namespaces/Perschar.js +59 -59
  166. package/dist/namespaces/Physics.d.ts +37 -37
  167. package/dist/namespaces/Physics.d.ts.map +1 -1
  168. package/dist/namespaces/Physics.js +54 -54
  169. package/dist/namespaces/PlayerStatics.d.ts +68 -68
  170. package/dist/namespaces/PlayerStatics.d.ts.map +1 -1
  171. package/dist/namespaces/PlayerStatics.js +104 -104
  172. package/dist/namespaces/Population.d.ts +86 -86
  173. package/dist/namespaces/Population.d.ts.map +1 -1
  174. package/dist/namespaces/Population.js +116 -116
  175. package/dist/namespaces/Posse.d.ts +48 -48
  176. package/dist/namespaces/Posse.d.ts.map +1 -1
  177. package/dist/namespaces/Posse.js +78 -78
  178. package/dist/namespaces/Propset.d.ts +59 -59
  179. package/dist/namespaces/Propset.d.ts.map +1 -1
  180. package/dist/namespaces/Propset.js +81 -81
  181. package/dist/namespaces/Replay.d.ts +1 -1
  182. package/dist/namespaces/Replay.d.ts.map +1 -1
  183. package/dist/namespaces/Replay.js +2 -2
  184. package/dist/namespaces/Scripts.d.ts +1 -1
  185. package/dist/namespaces/Scripts.d.ts.map +1 -1
  186. package/dist/namespaces/Scripts.js +12 -12
  187. package/dist/namespaces/Socialclub.js +8 -8
  188. package/dist/namespaces/Socialclubfeed.js +1 -1
  189. package/dist/namespaces/Spactionproxy.js +4 -4
  190. package/dist/namespaces/Stats.d.ts +203 -203
  191. package/dist/namespaces/Stats.d.ts.map +1 -1
  192. package/dist/namespaces/Stats.js +294 -294
  193. package/dist/namespaces/Streaming.d.ts +128 -128
  194. package/dist/namespaces/Streaming.d.ts.map +1 -1
  195. package/dist/namespaces/Streaming.js +202 -202
  196. package/dist/namespaces/Task.d.ts +366 -366
  197. package/dist/namespaces/Task.d.ts.map +1 -1
  198. package/dist/namespaces/Task.js +517 -517
  199. package/dist/namespaces/Telemetry.d.ts +83 -83
  200. package/dist/namespaces/Telemetry.d.ts.map +1 -1
  201. package/dist/namespaces/Telemetry.js +111 -111
  202. package/dist/namespaces/Txd.js +1 -1
  203. package/dist/namespaces/Uiapps.d.ts +25 -25
  204. package/dist/namespaces/Uiapps.d.ts.map +1 -1
  205. package/dist/namespaces/Uiapps.js +36 -36
  206. package/dist/namespaces/Uievents.js +1 -1
  207. package/dist/namespaces/Uifeed.js +1 -1
  208. package/dist/namespaces/Uistickyfeed.d.ts +16 -16
  209. package/dist/namespaces/Uistickyfeed.d.ts.map +1 -1
  210. package/dist/namespaces/Uistickyfeed.js +21 -21
  211. package/dist/namespaces/Unlock.js +5 -5
  212. package/dist/namespaces/VehicleStatics.js +12 -12
  213. package/dist/namespaces/Voice.js +7 -7
  214. package/dist/namespaces/VolumeStatics.d.ts +99 -99
  215. package/dist/namespaces/VolumeStatics.d.ts.map +1 -1
  216. package/dist/namespaces/VolumeStatics.js +137 -137
  217. package/dist/namespaces/Water.d.ts +27 -27
  218. package/dist/namespaces/Water.d.ts.map +1 -1
  219. package/dist/namespaces/Water.js +41 -41
  220. package/dist/namespaces/WeaponStatics.d.ts +206 -206
  221. package/dist/namespaces/WeaponStatics.d.ts.map +1 -1
  222. package/dist/namespaces/WeaponStatics.js +303 -303
  223. package/dist/types/NativeAliases.d.ts +3 -1
  224. package/dist/types/NativeAliases.d.ts.map +1 -1
  225. package/dist/types/NativeAliases.js +3 -1
  226. package/package.json +1 -1
  227. package/src/classes/AnimScene.ts +164 -164
  228. package/src/classes/BaseModel.ts +60 -60
  229. package/src/classes/BaseTask.ts +46 -46
  230. package/src/classes/Cam.ts +136 -136
  231. package/src/classes/Entity.ts +738 -727
  232. package/src/classes/Interior.ts +43 -43
  233. package/src/classes/ItemSet.ts +3 -3
  234. package/src/classes/Ped.ts +432 -432
  235. package/src/classes/PedModel.ts +2 -2
  236. package/src/classes/PedTask.ts +1023 -1023
  237. package/src/classes/PersChar.ts +28 -28
  238. package/src/classes/Pickup.ts +13 -13
  239. package/src/classes/Player.ts +326 -319
  240. package/src/classes/Prop.ts +185 -185
  241. package/src/classes/PropSet.ts +25 -25
  242. package/src/classes/Vehicle.ts +147 -147
  243. package/src/classes/VehicleModel.ts +2 -2
  244. package/src/classes/VehicleTask.ts +27 -27
  245. package/src/classes/Volume.ts +62 -62
  246. package/src/classes/Weapon.ts +358 -358
  247. package/src/namespaces/Aicoverpoint.ts +40 -40
  248. package/src/namespaces/Aitransport.ts +104 -104
  249. package/src/namespaces/Animscene.ts +55 -55
  250. package/src/namespaces/Audio.ts +565 -565
  251. package/src/namespaces/Bounty.ts +46 -46
  252. package/src/namespaces/Brain.ts +22 -22
  253. package/src/namespaces/CamStatics.ts +706 -706
  254. package/src/namespaces/Clock.ts +82 -82
  255. package/src/namespaces/Collection.ts +12 -12
  256. package/src/namespaces/Compapp.ts +1 -1
  257. package/src/namespaces/Compendium.ts +94 -94
  258. package/src/namespaces/Crashlog.ts +9 -9
  259. package/src/namespaces/Crew.ts +20 -20
  260. package/src/namespaces/Databinding.ts +222 -222
  261. package/src/namespaces/Datafile.ts +4 -4
  262. package/src/namespaces/Decorator.ts +37 -37
  263. package/src/namespaces/Dlc.ts +2 -2
  264. package/src/namespaces/EntityStatics.ts +259 -259
  265. package/src/namespaces/Event.ts +4 -4
  266. package/src/namespaces/Fire.ts +127 -127
  267. package/src/namespaces/Flock.ts +2 -2
  268. package/src/namespaces/Gang.ts +2 -2
  269. package/src/namespaces/GoogleAnalytics.ts +2 -2
  270. package/src/namespaces/Graphics.ts +1081 -1081
  271. package/src/namespaces/Hud.ts +767 -767
  272. package/src/namespaces/Ik.ts +1 -1
  273. package/src/namespaces/Interaction.ts +3 -3
  274. package/src/namespaces/InteriorStatics.ts +65 -65
  275. package/src/namespaces/Inventory.ts +352 -352
  276. package/src/namespaces/Itemdatabase.ts +121 -121
  277. package/src/namespaces/Itemset.ts +2 -2
  278. package/src/namespaces/Law.ts +20 -20
  279. package/src/namespaces/Localization.ts +1 -1
  280. package/src/namespaces/Map.ts +217 -217
  281. package/src/namespaces/Minigame.ts +119 -119
  282. package/src/namespaces/Misc.ts +38 -38
  283. package/src/namespaces/Missiondata.ts +1 -1
  284. package/src/namespaces/Money.ts +3 -3
  285. package/src/namespaces/Netshopping.ts +99 -99
  286. package/src/namespaces/Network.ts +1738 -1738
  287. package/src/namespaces/Object.ts +370 -370
  288. package/src/namespaces/Pad.ts +155 -155
  289. package/src/namespaces/Pathfind.ts +10 -10
  290. package/src/namespaces/PedStatics.ts +12 -12
  291. package/src/namespaces/Perschar.ts +67 -67
  292. package/src/namespaces/Physics.ts +62 -62
  293. package/src/namespaces/PlayerStatics.ts +112 -112
  294. package/src/namespaces/Population.ts +131 -131
  295. package/src/namespaces/Posse.ts +81 -81
  296. package/src/namespaces/Propset.ts +92 -92
  297. package/src/namespaces/Replay.ts +3 -3
  298. package/src/namespaces/Scripts.ts +13 -13
  299. package/src/namespaces/Socialclub.ts +8 -8
  300. package/src/namespaces/Socialclubfeed.ts +1 -1
  301. package/src/namespaces/Spactionproxy.ts +4 -4
  302. package/src/namespaces/Stats.ts +296 -296
  303. package/src/namespaces/Streaming.ts +236 -236
  304. package/src/namespaces/Task.ts +583 -583
  305. package/src/namespaces/Telemetry.ts +125 -125
  306. package/src/namespaces/Txd.ts +1 -1
  307. package/src/namespaces/Uiapps.ts +43 -43
  308. package/src/namespaces/Uievents.ts +1 -1
  309. package/src/namespaces/Uifeed.ts +1 -1
  310. package/src/namespaces/Uistickyfeed.ts +23 -23
  311. package/src/namespaces/Unlock.ts +5 -5
  312. package/src/namespaces/VehicleStatics.ts +12 -12
  313. package/src/namespaces/Voice.ts +7 -7
  314. package/src/namespaces/VolumeStatics.ts +143 -143
  315. package/src/namespaces/Water.ts +47 -47
  316. package/src/namespaces/WeaponStatics.ts +311 -311
  317. package/src/types/NativeAliases.ts +6 -1
@@ -16,7 +16,7 @@ export class Entity {
16
16
  /**
17
17
  * @returns
18
18
  */
19
- getIsBird() {
19
+ get IsBird() {
20
20
  return inv('0xC346A546612C49A9', this.handle);
21
21
  }
22
22
  /**
@@ -24,295 +24,256 @@ export class Entity {
24
24
  *
25
25
  * @returns
26
26
  */
27
- getForwardVectorYx() {
27
+ get ForwardVectorYx() {
28
28
  return Vector3.fromArray(inv('0x935A30AA88FB1014', this.handle, rav()));
29
29
  }
30
30
  /**
31
- * @param pos
32
- * @param xAxis
33
- * @param yAxis
34
- * @param zAxis
35
- * @param clearArea
31
+ * @param targetEntity
32
+ * @returns
36
33
  */
37
- setCoords(pos, xAxis, yAxis, zAxis, clearArea) {
38
- inv('0x06843DA7060A026B', this.handle, f(pos.x), f(pos.y), f(pos.z), xAxis, yAxis, zAxis, clearArea);
34
+ isTouchingEntity(targetEntity) {
35
+ return !!inv('0x9A2304A64C3C8423', this.handle, targetEntity.handle, rai());
36
+ }
37
+ deleteCarriable() {
38
+ inv('0x0D0DB2B6AF19A987', this.handle);
39
39
  }
40
40
  /**
41
- * @param boneName
41
+ * Returns a normalized value between 0.0f and 1.0f. You can get the actual anim time by multiplying this by GET_ANIM_DURATION
42
+ *
43
+ * @param animDict
44
+ * @param animName
42
45
  * @returns
43
46
  */
44
- getBoneIndexByName(boneName) {
45
- return inv('0xBACA8FE9C76C124E', this.handle, boneName, rai());
47
+ getAnimCurrentTime(animDict, animName) {
48
+ return inv('0x627520389E288A73', this.handle, animDict, animName, raf());
46
49
  }
47
50
  /**
48
- * @param pause
51
+ * @param entity2
52
+ * @param thisFrameOnly
49
53
  */
50
- pauseTracking(pause) {
51
- inv('0x36EB4D34D4A092C5', this.handle, pause);
54
+ setNoCollisionEntity(entity2, thisFrameOnly) {
55
+ inv('0xE037BF068223C38D', this.handle, entity2.handle, thisFrameOnly);
52
56
  }
53
57
  /**
54
- * @param toggle
58
+ * Result is in meters per second (m/s)
59
+ *
60
+ * @returns
55
61
  */
56
- setLoadCollisionFlag(toggle) {
57
- inv('0x9B9EE31AED48072E', this.handle, toggle);
62
+ get Speed() {
63
+ return inv('0xFB6BA510A533DF81', this.handle, raf());
58
64
  }
59
65
  /**
60
- * Changes type and quality of skins
61
- * type hashes: https://pastebin.com/C1WvQjCy
62
- *
63
- * @param type
66
+ * @param bOnlyDamagedWhenRunningScript
64
67
  */
65
- setCarcassType(type) {
66
- inv('0x399657ED871B3A6C', this.handle, _h(type));
68
+ set CanOnlyBeDamagedByScriptParticipants(bOnlyDamagedWhenRunningScript) {
69
+ inv('0xFF83AF534156B399', this.handle, bOnlyDamagedWhenRunningScript);
67
70
  }
68
71
  /**
69
- * @param toggle
72
+ * @returns
70
73
  */
71
- setHasGravity(toggle) {
72
- inv('0x0CEDB728A1083FA7', this.handle, toggle);
74
+ get IsTrackedVisible() {
75
+ return inv('0xC8CCDB712FBCBA92', this.handle);
73
76
  }
74
77
  /**
75
- * @param relative
76
- * @returns
78
+ * @param p1
79
+ * @param collision
77
80
  */
78
- getSpeedVector(relative) {
79
- return Vector3.fromArray(inv('0xF2DB09816A419DC5', this.handle, relative, rav()));
81
+ detachEntity(p1, collision) {
82
+ inv('0x64CDE9D6BF8ECAD3', this.handle, p1, collision);
80
83
  }
81
84
  /**
82
- * @param entity2
83
- * @param p2
84
- * @param p3
85
85
  * @returns
86
86
  */
87
- hasBeenDamagedByEntity(entity2, p2, p3) {
88
- return inv('0x7B6E7BEC1143AC86', this.handle, entity2.handle, p2, p3, rai());
87
+ get IsVisibleToScript() {
88
+ return !!inv('0xF213C724E77F321A', this.handle, rai());
89
89
  }
90
90
  /**
91
+ * @param entity2
92
+ * @param traceType
91
93
  * @returns
92
94
  */
93
- isFullyLooted() {
94
- return inv('0x8DE41E9902E85756', this.handle);
95
+ hasClearLosToEntity(entity2, traceType) {
96
+ return !!inv('0xFCDFF7B72D23A1AC', this.handle, entity2.handle, traceType, rai());
95
97
  }
96
98
  /**
99
+ * Used in Script Function GENERIC_ITEM_HAS_ANIM_COMPLETED
100
+ * *GET_ENTITY**
101
+ *
102
+ * @param animDict
103
+ * @param animClip
97
104
  * @returns
98
105
  */
99
- isOccluded() {
100
- return inv('0x140188E884645624', this.handle, rai());
106
+ N_0x8E46E18AA828334F(animDict, animClip) {
107
+ return inv('0x8E46E18AA828334F', this.handle, animDict, animClip, raf());
101
108
  }
102
109
  /**
103
- * @param toggle
110
+ * @param playerPedToIgnore
111
+ * @param flags
112
+ * @returns
104
113
  */
105
- setCanBeDamaged(toggle) {
106
- inv('0x0D06D522B90E861F', this.handle, toggle);
114
+ getNearestPlayerToEntity(playerPedToIgnore, flags) {
115
+ return createFromHandle('Player', inv('0x990E294FC387FB88', this.handle, playerPedToIgnore.handle, flags, rai()));
107
116
  }
108
117
  /**
109
- * @param forceFlags
110
- * @param pos
111
- * @param offset
112
- * @param boneIndex
113
- * @param isDirectionRel
114
- * @param ignoreUpVec
115
- * @param isForceRel
116
- * @param p12
117
- * @param p13
118
+ * Gets the Y-component of the entity's forward vector.
119
+ *
120
+ * @returns
118
121
  */
119
- applyForceToEntity(forceFlags, pos, offset, boneIndex, isDirectionRel, ignoreUpVec, isForceRel, p12, p13) {
120
- inv('0xF15E8F5D333F09C4', this.handle, forceFlags, f(pos.x), f(pos.y), f(pos.z), f(offset.x), f(offset.y), f(offset.z), boneIndex, isDirectionRel, ignoreUpVec, isForceRel, p12, p13);
122
+ get ForwardY() {
123
+ return inv('0x9A5C073ECBDA7EE7', this.handle, raf());
121
124
  }
122
125
  /**
123
- * @returns
126
+ * @param pitch
127
+ * @param roll
128
+ * @param yaw
129
+ * @param rotationOrder
130
+ * @param p5
124
131
  */
125
- isDead() {
126
- return inv('0x7D5B1F88E7504BBA', this.handle, rai());
132
+ setRotation(pitch, roll, yaw, rotationOrder, p5) {
133
+ inv('0x9CC8314DFEDE441E', this.handle, f(pitch), f(roll), f(yaw), rotationOrder, p5);
127
134
  }
128
135
  /**
129
- * @param pos1
130
- * @param pos2
131
- * @param p7
132
- * @param p8
133
- * @param p9
134
- * @returns
136
+ * @param p1
137
+ * @param relationshipGroup
135
138
  */
136
- isInArea(pos1, pos2, p7, p8, p9) {
137
- return inv('0x0C2634C40A16193E', this.handle, f(pos1.x), f(pos1.y), f(pos1.z), f(pos2.x), f(pos2.y), f(pos2.z), p7, p8, p9, rai());
139
+ setOnlyDamagedByRelationshipGroup(p1, relationshipGroup) {
140
+ inv('0x6C1F6AA2F0ADD104', this.handle, p1, _h(relationshipGroup));
138
141
  }
139
142
  /**
140
- * Returns the coordinates of an entity-bone.
141
- * https://github.com/femga/rdr3_discoveries/tree/master/boneNames
143
+ * https://github.com/femga/rdr3_discoveries/tree/master/AI/ENTITY_PROOFS
144
+ * BOOL p2: handles an additional special proofs flag, so it simply indicates whether it should be enabled or disabled, not sure what exactly it proofs the entity from though
142
145
  *
143
- * @param boneIndex
144
- * @returns
146
+ * @param proofsBitset
147
+ * @param specialFlag
145
148
  */
146
- getWorldPositionOfBone(boneIndex) {
147
- return Vector3.fromArray(inv('0x82CFA50E34681CA5', this.handle, boneIndex, rav()));
149
+ setProofs(proofsBitset, specialFlag) {
150
+ inv('0xFAEE099C6F890BB8', this.handle, proofsBitset, specialFlag);
148
151
  }
149
152
  /**
150
- * https://github.com/femga/rdr3_discoveries/tree/master/animations
151
- *
152
- * @param animName
153
- * @param animDict
154
- * @param p3
155
- * @param loop
156
- * @param stayInAnim
157
- * @param p6
158
- * @param delta
159
- * @param bitset
160
153
  * @returns
161
154
  */
162
- playAnim(animName, animDict, p3, loop, stayInAnim, p6, delta, bitset) {
163
- return inv('0xDC6D22FAB76D4874', this.handle, animName, animDict, f(p3), loop, stayInAnim, p6, f(delta), bitset, rai());
155
+ hasCollisionLoadedAroundEntity() {
156
+ return !!inv('0xBEB1600952B9CF5C', this.handle, rai());
164
157
  }
165
158
  /**
166
- * Returns false if entity is not a ped or object.
167
- *
168
- * @returns lootTable
159
+ * @returns
169
160
  */
170
- getScriptOverrideLootTablePermanent() {
171
- const result = inv('0x1E804EA9B12030A4', this.handle, pvi());
172
- return [result[0], result[1]];
161
+ get IsCarriablePelt() {
162
+ return inv('0x255B6DB4E3AD3C3E', this.handle);
173
163
  }
174
164
  /**
175
- * @param animDict
176
- * @param animName
177
- * @param p3
165
+ * @param p1
178
166
  * @returns
179
167
  */
180
- hasAnimFinished(animDict, animName, p3) {
181
- return inv('0xAEB40615337EF1E3', this.handle, animDict, animName, p3, rai());
168
+ getVelocity(p1) {
169
+ return Vector3.fromArray(inv('0x4805D2B1D8CF94A9', this.handle, p1, rav()));
182
170
  }
183
171
  /**
184
- * @param bCanBeDamaged
185
- * @param relGroup
172
+ * @param toggle
186
173
  */
187
- setCanBeDamagedByRelationshipGroup(bCanBeDamaged, relGroup) {
188
- inv('0x0EF1AFB18649E015', this.handle, bCanBeDamaged, _h(relGroup));
174
+ set CanAutoVaultOnEntity(toggle) {
175
+ inv('0x80646744FA88F9D7', this.handle, toggle);
189
176
  }
190
177
  /**
178
+ * Sets the loot table an entity will carry. Returns true if loot table has been successfully set. Returns false if entity is not a ped or object.
179
+ * https://github.com/femga/rdr3_discoveries/blob/master/AI/EVENTS/loot_rewards.lua
180
+ *
181
+ * @param lootTable
191
182
  * @returns
192
183
  */
193
- getUprightValue() {
194
- return inv('0x56398BE65160C3BE', this.handle, raf());
184
+ scriptOverrideLootTablePermanent(lootTable) {
185
+ return inv('0x8C03CD6B5E0E85E8', this.handle, _h(lootTable));
195
186
  }
196
187
  /**
197
- * @param pos
198
- * @param heading
199
- * @param xAxis
200
- * @param yAxis
201
- * @param zAxis
188
+ * @returns argStruct
202
189
  */
203
- setCoordsAndHeading(pos, heading, xAxis, yAxis, zAxis) {
204
- inv('0x203BEFFDBE12E96A', this.handle, f(pos.x), f(pos.y), f(pos.z), f(heading), xAxis, yAxis, zAxis);
190
+ get Script() {
191
+ const result = inv('0x2A08A32B6D49906F', this.handle, pvi(), rai());
192
+ return [result[0] & 0xFFFFFFFF, result[1]];
205
193
  }
206
194
  /**
207
- * Returns zero if the entity is not a carriable
208
- *
195
+ * @param actionHash
209
196
  * @returns
210
197
  */
211
- getCarryConfig() {
212
- return (inv('0x0FD25587BB306C86', this.handle, rai())) & 0xFFFFFFFF;
198
+ hasAnimEventFired(actionHash) {
199
+ return !!inv('0x5851CC48405F4A07', this.handle, _h(actionHash), rai());
213
200
  }
214
201
  /**
215
- * tier: https://github.com/Halen84/RDR3-Native-Flags-And-Enums/tree/main/eEntityThreatTier
216
- *
217
- * @param tier
218
- * @param p2
202
+ * @param p1
219
203
  */
220
- setThreatTier(tier, p2) {
221
- inv('0x4B436BAC8CBE9B07', this.handle, tier, p2);
204
+ N_0xEF259AA1E097E0AD(p1) {
205
+ inv('0xEF259AA1E097E0AD', this.handle, p1);
222
206
  }
223
207
  /**
224
- * Returns the heading of the entity in degrees. Also know as the "Yaw" of an entity.
208
+ * Getter for FREEZE_ENTITY_POSITION
225
209
  *
226
210
  * @returns
227
211
  */
228
- getHeading() {
229
- return inv('0xC230DD956E2F5507', this.handle, raf());
212
+ get IsFrozen() {
213
+ return inv('0x083D497D57B7400F', this.handle);
230
214
  }
231
215
  /**
232
- * Returns the LOD distance of an entity.
216
+ * Returns the entity that is looting a ped but only while the looting is active
233
217
  *
234
218
  * @returns
235
219
  */
236
- getLodDist() {
237
- return inv('0xDF240D0C2A948683', this.handle, rai());
220
+ get LootingPed() {
221
+ return createFromHandle('Ped', inv('0xEF2D9ED7CE684F08', this.handle, rai()));
238
222
  }
239
223
  /**
240
224
  * @returns
241
225
  */
242
- doesHaveDrawable() {
243
- return inv('0x20487F0DA9AF164A', this.handle, rai());
226
+ get IsWaitingForWorldCollision() {
227
+ return !!inv('0x5E1CC2E8DC3111DD', this.handle, rai());
244
228
  }
245
229
  /**
246
- * @param xyzw
230
+ * Gets the X-component of the entity's forward vector.
231
+ *
232
+ * @returns
247
233
  */
248
- setQuaternion(xyzw) {
249
- inv('0x100E7007D13E3687', this.handle, f(xyzw.x), f(xyzw.y), f(xyzw.z), f(xyzw.w));
234
+ get ForwardX() {
235
+ return inv('0xDB0954E9960F6457', this.handle, raf());
250
236
  }
251
237
  /**
252
238
  * @returns
253
239
  */
254
- isAttachedToAnyObject() {
255
- return inv('0x306C1F6178F01AB3', this.handle, rai());
240
+ get IsAPed() {
241
+ return !!inv('0xCF8176912DDA4EA5', this.handle, rai());
256
242
  }
257
243
  /**
258
- * Sets a ped or an object totally invincible. It doesn't take any kind of damage. Peds will not ragdoll on explosions.
259
- *
260
- * @param toggle
244
+ * @returns
261
245
  */
262
- setInvincible(toggle) {
263
- inv('0xA5C38736C426FCB8', this.handle, toggle);
246
+ get Pitch() {
247
+ return inv('0xEF355ABEFF7F5005', this.handle, raf());
264
248
  }
265
249
  /**
266
- * Attaches entity1 to bone (boneIndex) of entity2. boneIndex - this is different to boneID, use GET_PED_BONE_INDEX to get the index from the ID. use the index for attaching to specific bones. entity1 will be attached to entity2's centre if bone index given doesn't correspond to bone indexes for that entity type.
267
- * https://github.com/femga/rdr3_discoveries/tree/master/boneNames useSoftPinning - if set to false attached entity will not detach when fixed
268
- * collision - controls collision between the two entities (FALSE disables collision).
269
- * isPed - pitch doesn't work when false and roll will only work on negative numbers (only peds)
270
- * vertexIndex - position of vertex
271
- * fixedRot - if false it ignores entity vector
272
- *
273
- * @param entity2
274
- * @param boneIndex
275
- * @param pos
276
- * @param rot
277
- * @param p9
278
- * @param useSoftPinning
279
- * @param collision
280
- * @param isPed
281
- * @param vertexIndex
282
- * @param fixedRot
283
- * @param p15
284
- * @param p16
250
+ * @returns
285
251
  */
286
- attachToEntity(entity2, boneIndex, pos, rot, p9, useSoftPinning, collision, isPed, vertexIndex, fixedRot, p15, p16) {
287
- inv('0x6B9BBD38AB0796DF', this.handle, entity2.handle, boneIndex, f(pos.x), f(pos.y), f(pos.z), f(rot.x), f(rot.y), f(rot.z), p9, useSoftPinning, collision, isPed, vertexIndex, fixedRot, p15, p16);
252
+ get IsStatic() {
253
+ return !!inv('0x86468ADFA0F6B861', this.handle, rai());
288
254
  }
289
255
  /**
256
+ * Returns the model hash from the entity
257
+ *
290
258
  * @returns
291
259
  */
292
- getIsAnimal() {
293
- return inv('0x9A100F1CF4546629', this.handle);
260
+ get Model() {
261
+ return (inv('0xDA76A9F39210D365', this.handle, rai())) & 0xFFFFFFFF;
294
262
  }
295
263
  /**
296
- * p6/relative - makes the xyz force not relative to world coords, but to something else
297
- * p7/highForce - setting false will make the force really low
298
- *
299
- * @param forceType
300
- * @param pos
301
- * @param component
302
- * @param isDirectionRel
303
- * @param isForceRel
304
- * @param p8
264
+ * Deletes the specified entity, then sets the handle pointed to by the pointer to NULL.
305
265
  */
306
- applyForceToCenterOfMass(forceType, pos, component, isDirectionRel, isForceRel, p8) {
307
- inv('0x31DA7CEC5334DB37', this.handle, forceType, f(pos.x), f(pos.y), f(pos.z), component, isDirectionRel, isForceRel, p8);
266
+ deleteEntity() {
267
+ inv('0x4CD38C78BD19A497', this.handle);
308
268
  }
309
269
  /**
310
- * Old name: _GET_ENTITY_CAN_BE_DAMAGED
311
- *
270
+ * @param team
271
+ * @param playerPedToIgnore
272
+ * @param flags
312
273
  * @returns
313
274
  */
314
- getCanBeDamaged() {
315
- return inv('0x75DF9E73F2F005FD', this.handle);
275
+ getNearestPlayerToOnTeam(team, playerPedToIgnore, flags) {
276
+ return createFromHandle('Player', inv('0xB2C30C3B4AFF718C', this.handle, team, playerPedToIgnore.handle, flags, rai()));
316
277
  }
317
278
  /**
318
279
  * @param p1
@@ -334,7 +295,7 @@ export class Entity {
334
295
  *
335
296
  * @returns
336
297
  */
337
- getForwardVector() {
298
+ get ForwardVector() {
338
299
  return Vector3.fromArray(inv('0x2412D9C05BB09B97', this.handle, rav()));
339
300
  }
340
301
  /**
@@ -342,7 +303,7 @@ export class Entity {
342
303
  * @returns
343
304
  */
344
305
  isTouchingModel(modelHash) {
345
- return inv('0x2AE3EBC8DEB9768B', this.handle, _h(modelHash), rai());
306
+ return !!inv('0x2AE3EBC8DEB9768B', this.handle, _h(modelHash), rai());
346
307
  }
347
308
  /**
348
309
  * Sets the entity's health. healthAmount sets the health value to that, and sets the maximum health core value. Setting healthAmount to 0 will kill the entity. entityKilledBy parameter can also be 0
@@ -356,20 +317,20 @@ export class Entity {
356
317
  /**
357
318
  * @param toggle
358
319
  */
359
- setRenderScorched(toggle) {
320
+ set RenderScorched(toggle) {
360
321
  inv('0x85B8A7534E44BC23', this.handle, toggle);
361
322
  }
362
323
  /**
363
324
  * @param heading
364
325
  */
365
- setHeading(heading) {
326
+ set Heading(heading) {
366
327
  inv('0xCF2B9C0645C4651B', this.handle, f(heading));
367
328
  }
368
329
  /**
369
330
  * @returns
370
331
  */
371
- getCollisionDisabled() {
372
- return inv('0xAA2FADD30F45A9DA', this.handle, rai());
332
+ get CollisionDisabled() {
333
+ return !!inv('0xAA2FADD30F45A9DA', this.handle, rai());
373
334
  }
374
335
  /**
375
336
  * Displays the current ROLL axis of the entity [-180.0000/180.0000+]
@@ -377,18 +338,127 @@ export class Entity {
377
338
  *
378
339
  * @returns
379
340
  */
380
- getRoll() {
341
+ get Roll() {
381
342
  return inv('0xBF966536FA8B6879', this.handle, raf());
382
343
  }
383
344
  /**
384
345
  * @returns
385
346
  */
386
- getNearestParticipantToEntity() {
347
+ get NearestParticipantToEntity() {
387
348
  return createFromHandle('Player', inv('0x6888A43C35A5F630', this.handle, rai()));
388
349
  }
389
350
  /**
390
- * @param p1
391
- */
351
+ * enum eCarriableState
352
+ * {
353
+ * CARRIABLE_STATE_NONE,
354
+ * CARRIABLE_STATE_TRANSITIONING_TO_HOGTIED,
355
+ * CARRIABLE_STATE_CARRIABLE_INTRO,
356
+ * CARRIABLE_STATE_CARRIABLE,
357
+ * CARRIABLE_STATE_BEING_PICKED_UP_FROM_GROUND,
358
+ * CARRIABLE_STATE_CARRIED_BY_HUMAN,
359
+ * CARRIABLE_STATE_BEING_PLACED_ON_GROUND,
360
+ * CARRIABLE_STATE_CARRIED_BY_MOUNT,
361
+ * CARRIABLE_STATE_BEING_PLACED_ON_MOUNT,
362
+ * CARRIABLE_STATE_BEING_PICKED_UP_FROM_MOUNT,
363
+ * CARRIABLE_STATE_BEING_CUT_FREE,
364
+ * CARRIABLE_STATE_BEING_PLACED_ON_GROUND_ESCAPE,
365
+ * CARRIABLE_STATE_BEING_PLACED_IN_VEHICLE
366
+ * };
367
+ *
368
+ * @returns
369
+ */
370
+ get CarriableState() {
371
+ return inv('0x61914209C36EFDDB', this.handle, rai());
372
+ }
373
+ /**
374
+ * @param value
375
+ */
376
+ set MaxHealth(value) {
377
+ inv('0x166E7CF68597D8B5', this.handle, value);
378
+ }
379
+ /**
380
+ * Params: p1 (probably animType) = 1, 0
381
+ *
382
+ * @param p1
383
+ * @returns
384
+ */
385
+ isPlayingAnyAnim(p1) {
386
+ return !!inv('0x0B7CB1300CBFE19C', this.handle, p1, rai());
387
+ }
388
+ /**
389
+ * @param enabled
390
+ */
391
+ set LightsEnabled(enabled) {
392
+ inv('0xEBDC12861D079ABA', this.handle, enabled);
393
+ }
394
+ /**
395
+ * Offset values are relative to the entity. x = left/right
396
+ * y = forward/backward
397
+ * z = up/down
398
+ *
399
+ * @param offset
400
+ * @returns
401
+ */
402
+ getOffsetFromInWorldCoords(offset) {
403
+ return Vector3.fromArray(inv('0x1899F328B0E12848', this.handle, f(offset.x), f(offset.y), f(offset.z), rav()));
404
+ }
405
+ /**
406
+ * Checks if entity1 is within the box defined by x/y/zSize of entity2. Last three parameters are almost always p5 = 0, p6 = 1, p7 = 0
407
+ *
408
+ * @param entity2
409
+ * @param xSize
410
+ * @param ySize
411
+ * @param zSize
412
+ * @param p5
413
+ * @param p6
414
+ * @param p7
415
+ * @returns
416
+ */
417
+ isAtEntity(entity2, xSize, ySize, zSize, p5, p6, p7) {
418
+ return !!inv('0xC057F02B837A27F6', this.handle, entity2.handle, f(xSize), f(ySize), f(zSize), p5, p6, p7, rai());
419
+ }
420
+ /**
421
+ * @param toggle
422
+ */
423
+ set Visible(toggle) {
424
+ inv('0x1794B4FCC84D812F', this.handle, toggle);
425
+ }
426
+ /**
427
+ * Old name: _SET_ENTITY_CLEANUP_BY_ENGINE
428
+ *
429
+ * @param toggle
430
+ */
431
+ set ShouldFreezeWaitingOnCollision(toggle) {
432
+ inv('0x740CB4F3F602C9F4', this.handle, toggle);
433
+ }
434
+ /**
435
+ * Note: this native was removed in 1232 but added back in 1311
436
+ * Old name: _GET_ENTITY_PROOFS
437
+ *
438
+ * @returns
439
+ */
440
+ get Proofs() {
441
+ return inv('0x6CF0DAD7FA1088EA', this.handle, rai());
442
+ }
443
+ /**
444
+ * skin - everything alpha except skin
445
+ * Set entity alpha level. Ranging from 0 to 255 but changes occur after every 20 percent (after every 51).
446
+ *
447
+ * @param alphaLevel
448
+ * @param skin
449
+ */
450
+ setAlpha(alphaLevel, skin) {
451
+ inv('0x0DF7692B1D9E7BA7', this.handle, alphaLevel, skin);
452
+ }
453
+ /**
454
+ * @returns
455
+ */
456
+ get ThreatTier() {
457
+ return inv('0xE12F56CB25D9CE23', this.handle, rai());
458
+ }
459
+ /**
460
+ * @param p1
461
+ */
392
462
  N_0xA48E4801DEBDF7E4(p1) {
393
463
  inv('0xA48E4801DEBDF7E4', this.handle, p1);
394
464
  }
@@ -412,12 +482,12 @@ export class Entity {
412
482
  * @returns
413
483
  */
414
484
  isInVolume(volume, p2, p3) {
415
- return inv('0x5A5526BC09C06623', this.handle, volume, p2, p3, rai());
485
+ return !!inv('0x5A5526BC09C06623', this.handle, volume, p2, p3, rai());
416
486
  }
417
487
  /**
418
488
  * @returns rightVector; forwardVector; upVector; position
419
489
  */
420
- getMatrix() {
490
+ get Matrix() {
421
491
  const result = inv('0x3A9B1120AF13FBF2', this.handle, pvv(), pvv(), pvv(), pvv());
422
492
  return [Vector3.fromArray(result[0]), Vector3.fromArray(result[1]), Vector3.fromArray(result[2]), Vector3.fromArray(result[3])];
423
493
  }
@@ -454,130 +524,126 @@ export class Entity {
454
524
  getCoords(alive, realCoords) {
455
525
  return Vector3.fromArray(inv('0xA86D5F069399F44D', this.handle, alive, realCoords, rav()));
456
526
  }
457
- /**
458
- * @returns
459
- */
460
- isAnObject() {
461
- return inv('0x0A27A546A375FDEF', this.handle, rai());
462
- }
463
- /**
464
- * @returns
465
- */
466
- isUpsidedown() {
467
- return inv('0x109DE3DA41AAD94A', this.handle, rai());
527
+ get Coords() {
528
+ return this.getCoords();
468
529
  }
469
530
  /**
470
- * @param p1
471
531
  * @returns
472
532
  */
473
- doesBelongToThisScript(p1) {
474
- return inv('0x622B1980CBE13332', this.handle, p1, rai());
533
+ get IsAnObject() {
534
+ return !!inv('0x0A27A546A375FDEF', this.handle, rai());
475
535
  }
476
536
  /**
477
- * Returns a hash of an entity's name. (Alternative Name: _GET_ENTITY_PROMPT_NAME_HASH)
537
+ * Used in Script Function DUELING_DID_PLAYER_DISARM_OPPONENT
478
538
  *
539
+ * @param entity2
540
+ * @param p2
541
+ * @param p3
479
542
  * @returns
480
543
  */
481
- getCarriableFromEntity() {
482
- return (inv('0x31FEF6A20F00B963', this.handle, rai())) & 0xFFFFFFFF;
544
+ N_0x3EC28DA1FFAC9DDD(entity2, p2, p3) {
545
+ return !!inv('0x3EC28DA1FFAC9DDD', this.handle, entity2.handle, p2, p3, rai());
483
546
  }
484
547
  /**
485
- * @param toggle
486
- * @param keepPhysics
548
+ * Must be called from a background script, otherwise it will do nothing.
487
549
  */
488
- setCollision(toggle, keepPhysics) {
489
- inv('0xF66F820909453B8C', this.handle, toggle, keepPhysics);
550
+ delete2() {
551
+ inv('0x5E94EA09E7207C16', this.handle);
490
552
  }
491
553
  /**
492
554
  * @param p1
493
555
  * @returns
494
556
  */
495
- placeOnGroundProperly(p1) {
496
- return inv('0x9587913B9E772D29', this.handle, p1);
557
+ isInAir(p1) {
558
+ return !!inv('0x886E37EC497200B6', this.handle, p1, rai());
497
559
  }
498
560
  /**
499
561
  * @returns
500
562
  */
501
- isInWater() {
502
- return inv('0xDDE5C125AC446723', this.handle, rai());
563
+ get IsAMissionEntity() {
564
+ return !!inv('0x138190F64DB4BBD1', this.handle, rai());
503
565
  }
504
566
  /**
505
- * @returns Returns `true` if the entity exists
567
+ * @returns
506
568
  */
507
- doesExist() {
508
- return inv('0xD42BD6EB2E0F1677', this.handle, rai());
569
+ get IsAttachedToAnyPed() {
570
+ return !!inv('0xC841153DED2CA89A', this.handle, rai());
509
571
  }
510
572
  /**
573
+ * @param to
511
574
  * @returns
512
575
  */
513
- getAlpha() {
514
- return inv('0x1BB501624FAF2BEA', this.handle, rai());
576
+ isAttachedToEntity(to) {
577
+ return !!inv('0x154A3C529497053E', this.handle, to.handle, rai());
515
578
  }
516
579
  /**
517
- * This native only works on `Ped` and `Object` entity types
518
- *
519
- * @param flagId Refer to [enum: eCarryingFlags]
520
580
  * @returns
521
581
  */
522
- getCarryingFlag(flagId) {
523
- return inv('0x808077647856DE62', this.handle, flagId, rai());
582
+ hasBeenDamagedByAnyObject() {
583
+ return !!inv('0x73BB763880CD23A6', this.handle, rai());
524
584
  }
525
585
  /**
526
- * @param p1
586
+ * @param rotationOrder
587
+ * @returns
527
588
  */
528
- forceAiAndAnimationUpdate(p1) {
529
- inv('0x4C9E96473D4F1A88', this.handle, p1);
589
+ getRotation(rotationOrder) {
590
+ return Vector3.fromArray(inv('0xE09CAF86C32CB48F', this.handle, rotationOrder, rav()));
530
591
  }
531
592
  /**
532
- * Axis - Invert Axis Flags
533
- *
534
- * @param pos
535
- * @param xAxis
536
- * @param yAxis
537
- * @param zAxis
593
+ * @param toggle
538
594
  */
539
- setCoordsNoOffset(pos, xAxis, yAxis, zAxis) {
540
- inv('0x239A3351AC1DA385', this.handle, f(pos.x), f(pos.y), f(pos.z), xAxis, yAxis, zAxis);
595
+ set MotionBlur(toggle) {
596
+ inv('0x516C6ABD18322B63', this.handle, toggle);
597
+ }
598
+ resetAlpha() {
599
+ inv('0x744B9EF44779D9AB', this.handle);
541
600
  }
542
601
  /**
543
- * Returns (CUR_HEALTH / MAX_HEALTH)
602
+ * Checks if entity is within x/y/zSize distance of x/y/z. Last three are unknown ints, almost always p7 = 0, p8 = 1, p9 = 0
544
603
  *
604
+ * @param pos
605
+ * @param xSize
606
+ * @param ySize
607
+ * @param zSize
608
+ * @param p7
609
+ * @param p8
610
+ * @param p9
545
611
  * @returns
546
612
  */
547
- getHealthFloat() {
548
- return inv('0x96C638784DB4C815', this.handle, raf());
613
+ isAtCoord(pos, xSize, ySize, zSize, p7, p8, p9) {
614
+ return !!inv('0x5E58342602E94718', this.handle, f(pos.x), f(pos.y), f(pos.z), f(xSize), f(ySize), f(zSize), p7, p8, p9, rai());
549
615
  }
550
616
  /**
551
617
  * LOD distance can be 0 to 0xFFFF (higher values will result in 0xFFFF) as it is actually stored as a 16-bit value (aka uint16_t).
552
618
  *
553
619
  * @param value
554
620
  */
555
- setLodDist(value) {
621
+ set LodDist(value) {
556
622
  inv('0x5FB407F0A7C877BF', this.handle, value);
557
623
  }
558
624
  /**
559
625
  * @param toggle
560
626
  */
561
- setDynamic(toggle) {
627
+ set Dynamic(toggle) {
562
628
  inv('0xFBFC4473F66CE344', this.handle, toggle);
563
629
  }
564
630
  /**
565
631
  * @param radius
566
632
  */
567
- setCustomPickupRadius(radius) {
633
+ set CustomPickupRadius(radius) {
568
634
  inv('0x482D17E45665DA44', this.handle, f(radius));
569
635
  }
570
636
  /**
571
637
  * @returns
572
638
  */
573
- getPopulationType() {
639
+ get PopulationType() {
574
640
  return inv('0xADE28862B6D7B85B', this.handle, rai());
575
641
  }
576
642
  /**
577
643
  * @returns
578
644
  */
579
- isAVehicle() {
580
- return inv('0xC3D96AF45FCCEC4C', this.handle, rai());
645
+ get IsAVehicle() {
646
+ return !!inv('0xC3D96AF45FCCEC4C', this.handle, rai());
581
647
  }
582
648
  /**
583
649
  * @param pos
@@ -601,13 +667,13 @@ export class Entity {
601
667
  /**
602
668
  * @param toggle
603
669
  */
604
- setCanClimbOnEntity(toggle) {
670
+ set CanClimbOnEntity(toggle) {
605
671
  inv('0x24AED2A608F93C4C', this.handle, toggle);
606
672
  }
607
673
  /**
608
674
  * @returns minimum; maximum
609
675
  */
610
- getWorldPositionOfDimensions() {
676
+ get WorldPositionOfDimensions() {
611
677
  const result = inv('0xF3FDA9A617A15145', this.handle, pvv(), pvv());
612
678
  return [Vector3.fromArray(result[0]), Vector3.fromArray(result[1])];
613
679
  }
@@ -631,587 +697,638 @@ export class Entity {
631
697
  * @returns
632
698
  */
633
699
  hasCollidedWithAnything() {
634
- return inv('0xDF18751EC74F90FF', this.handle, rai());
700
+ return !!inv('0xDF18751EC74F90FF', this.handle, rai());
635
701
  }
636
702
  /**
637
- * Simply returns whatever is passed to it (Regardless of whether the handle is valid or not).
638
- *
639
- * @returns
703
+ * @param entity2
704
+ * @param p2
705
+ * @param boneIndex
706
+ * @param offset
707
+ * @param p7
708
+ * @param p8
709
+ * @param p9
710
+ * @param p10
711
+ * @param p11
712
+ * @param p12
713
+ * @param p13
714
+ * @param p14
715
+ * @param p15
716
+ * @param p16
717
+ * @param p17
718
+ * @param p18
719
+ * @param p19
720
+ * @param p20
721
+ * @param p21
640
722
  */
641
- getVehicleIndexFromIndex() {
642
- return createFromHandle('Vehicle', inv('0xDF1E5AAC561AFC59', this.handle, rai()));
723
+ attachToEntityPhysically(entity2, p2, boneIndex, offset, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21) {
724
+ inv('0xB629A43CA1643481', this.handle, entity2.handle, p2, boneIndex, f(offset.x), f(offset.y), f(offset.z), f(p7), f(p8), f(p9), f(p10), f(p11), f(p12), f(p13), p14, p15, p16, p17, p18, p19, f(p20), f(p21));
643
725
  }
644
726
  /**
645
727
  * @returns
646
728
  */
647
- isVisible() {
648
- return inv('0xFFC96ECB7FA404CA', this.handle, rai());
729
+ get HeightAboveGround() {
730
+ return inv('0x0D3B5BAEA08F63E9', this.handle, raf());
649
731
  }
650
732
  /**
651
- * SET_ENTITY_LO*
652
- *
653
- * @param toggle
733
+ * @param pos
734
+ * @param heading
735
+ * @param p5
736
+ * @param p6
654
737
  */
655
- N_0xFF9965C47FA404DA(toggle) {
656
- inv('0xFF9965C47FA404DA', this.handle, toggle);
738
+ setCoordsAndHeadingNoOffset(pos, heading, p5, p6) {
739
+ inv('0x0918E3565C20F03C', this.handle, f(pos.x), f(pos.y), f(pos.z), f(heading), p5, p6);
657
740
  }
658
741
  /**
659
- * Valid indices: 0 - 3
660
- * Index 1 always returns a `hogtied` config, doesn't matter the entity.
661
- * It's for humans only and the ped must be resurrected first if it's dead.
742
+ * Creates a spherical cone at origin that extends to surface with the angle specified. Then returns true if the entity is inside the spherical cone Angle is measured in degrees.
662
743
  *
663
- * @param index
744
+ * @param originX
745
+ * @param originY
746
+ * @param originZ
747
+ * @param edgeX
748
+ * @param edgeY
749
+ * @param edgeZ
750
+ * @param angle
751
+ * @param p8
752
+ * @param p9
753
+ * @param p10
664
754
  * @returns
665
755
  */
666
- getOptimalCarryConfig(index) {
667
- return (inv('0x34F008A7E48C496B', this.handle, index, rai())) & 0xFFFFFFFF;
756
+ isInAngledArea(originX, originY, originZ, edgeX, edgeY, edgeZ, angle, p8, p9, p10) {
757
+ return !!inv('0xD3151E53134595E5', this.handle, f(originX), f(originY), f(originZ), f(edgeX), f(edgeY), f(edgeZ), f(angle), p8, p9, p10, rai());
668
758
  }
669
- setFadeIn() {
670
- inv('0xA91E6CF94404E8C9', this.handle);
759
+ clearLastDamageEntity() {
760
+ inv('0xBB19AC7D4DCEFD0F', this.handle);
671
761
  }
672
762
  /**
673
- * @returns
763
+ * @param toggle
674
764
  */
675
- hasBeenDamagedByAnyPed() {
676
- return inv('0x9934E9C42D52D87E', this.handle, rai());
765
+ set AlwaysPrerender(toggle) {
766
+ inv('0xACAD101E1FB66689', this.handle, toggle);
677
767
  }
678
768
  /**
679
- * @param targetEntity
680
- * @returns
769
+ * Note that the third parameter(denoted as z) is "up and down" with positive numbers encouraging upwards movement.
770
+ *
771
+ * @param pos
681
772
  */
682
- isTouchingEntity(targetEntity) {
683
- return inv('0x9A2304A64C3C8423', this.handle, targetEntity.handle, rai());
684
- }
685
- deleteCarriable() {
686
- inv('0x0D0DB2B6AF19A987', this.handle);
773
+ set Velocity(pos) {
774
+ inv('0x1C99BB7B6E96D16F', this.handle, f(pos.x), f(pos.y), f(pos.z));
687
775
  }
688
776
  /**
689
- * Returns a normalized value between 0.0f and 1.0f. You can get the actual anim time by multiplying this by GET_ANIM_DURATION
777
+ * SET_ENTITY_LO*
690
778
  *
691
- * @param animDict
692
- * @param animName
693
- * @returns
779
+ * @param p1
780
+ * @param p2
781
+ * @param p3
694
782
  */
695
- getAnimCurrentTime(animDict, animName) {
696
- return inv('0x627520389E288A73', this.handle, animDict, animName, raf());
783
+ N_0xAF7F3099B9FEB535(p1, p2, p3) {
784
+ inv('0xAF7F3099B9FEB535', this.handle, f(p1), f(p2), f(p3));
697
785
  }
698
786
  /**
699
- * @param entity2
700
- * @param thisFrameOnly
787
+ * @returns
701
788
  */
702
- setNoCollisionEntity(entity2, thisFrameOnly) {
703
- inv('0xE037BF068223C38D', this.handle, entity2.handle, thisFrameOnly);
789
+ N_0xAF72EC7E1B54539B() {
790
+ return createFromHandle('Entity', inv('0xAF72EC7E1B54539B', this.handle, rai()));
704
791
  }
705
792
  /**
706
- * Result is in meters per second (m/s)
793
+ * Simply returns whatever is passed to it (Regardless of whether the handle is valid or not).
707
794
  *
708
795
  * @returns
709
796
  */
710
- getSpeed() {
711
- return inv('0xFB6BA510A533DF81', this.handle, raf());
712
- }
713
- /**
714
- * @param bOnlyDamagedWhenRunningScript
715
- */
716
- setCanOnlyBeDamagedByScriptParticipants(bOnlyDamagedWhenRunningScript) {
717
- inv('0xFF83AF534156B399', this.handle, bOnlyDamagedWhenRunningScript);
797
+ get ObjectIndexFromIndex() {
798
+ return createFromHandle('Prop', inv('0x280BBE5601EAA983', this.handle, rai()));
718
799
  }
719
800
  /**
801
+ * Has the entity1 got a clear line of sight to the other entity2 from the direction entity1 is facing.
802
+ *
803
+ * @param entity2
804
+ * @param traceType
720
805
  * @returns
721
806
  */
722
- isTrackedVisible() {
723
- return inv('0xC8CCDB712FBCBA92', this.handle);
724
- }
725
- /**
726
- * @param p1
727
- * @param collision
728
- */
729
- detachEntity(p1, collision) {
730
- inv('0x64CDE9D6BF8ECAD3', this.handle, p1, collision);
807
+ hasClearLosToEntityInFront(entity2, traceType) {
808
+ return !!inv('0xE88F19660651D566', this.handle, entity2.handle, traceType, rai());
731
809
  }
732
810
  /**
733
811
  * @returns
734
812
  */
735
- isVisibleToScript() {
736
- return inv('0xF213C724E77F321A', this.handle, rai());
813
+ get IsOnTrainTrack() {
814
+ return inv('0x857ACB0AB4BD0D55', this.handle);
737
815
  }
738
816
  /**
739
- * @param entity2
740
- * @param traceType
817
+ * @param angle
741
818
  * @returns
742
819
  */
743
- hasClearLosToEntity(entity2, traceType) {
744
- return inv('0xFCDFF7B72D23A1AC', this.handle, entity2.handle, traceType, rai());
820
+ isUpright(angle) {
821
+ return !!inv('0xF6F6AFD8D4FB2658', this.handle, f(angle), rai());
745
822
  }
746
823
  /**
747
- * Used in Script Function GENERIC_ITEM_HAS_ANIM_COMPLETED
748
- * *GET_ENTITY**
824
+ * Simply returns whatever is passed to it (Regardless of whether the handle is valid or not).
749
825
  *
750
- * @param animDict
751
- * @param animClip
752
826
  * @returns
753
827
  */
754
- N_0x8E46E18AA828334F(animDict, animClip) {
755
- return inv('0x8E46E18AA828334F', this.handle, animDict, animClip, raf());
828
+ get VehicleIndexFromIndex() {
829
+ return createFromHandle('Vehicle', inv('0xDF1E5AAC561AFC59', this.handle, rai()));
756
830
  }
757
831
  /**
758
- * @param playerPedToIgnore
759
- * @param flags
760
832
  * @returns
761
833
  */
762
- getNearestPlayerToEntity(playerPedToIgnore, flags) {
763
- return createFromHandle('Player', inv('0x990E294FC387FB88', this.handle, playerPedToIgnore.handle, flags, rai()));
834
+ get IsVisible() {
835
+ return !!inv('0xFFC96ECB7FA404CA', this.handle, rai());
764
836
  }
765
837
  /**
766
- * Gets the Y-component of the entity's forward vector.
838
+ * SET_ENTITY_LO*
767
839
  *
768
- * @returns
840
+ * @param toggle
769
841
  */
770
- getForwardY() {
771
- return inv('0x9A5C073ECBDA7EE7', this.handle, raf());
842
+ N_0xFF9965C47FA404DA(toggle) {
843
+ inv('0xFF9965C47FA404DA', this.handle, toggle);
772
844
  }
773
845
  /**
774
- * @param pitch
775
- * @param roll
776
- * @param yaw
777
- * @param rotationOrder
778
- * @param p5
846
+ * Valid indices: 0 - 3
847
+ * Index 1 always returns a `hogtied` config, doesn't matter the entity.
848
+ * It's for humans only and the ped must be resurrected first if it's dead.
849
+ *
850
+ * @param index
851
+ * @returns
779
852
  */
780
- setRotation(pitch, roll, yaw, rotationOrder, p5) {
781
- inv('0x9CC8314DFEDE441E', this.handle, f(pitch), f(roll), f(yaw), rotationOrder, p5);
853
+ getOptimalCarryConfig(index) {
854
+ return (inv('0x34F008A7E48C496B', this.handle, index, rai())) & 0xFFFFFFFF;
782
855
  }
783
- /**
784
- * @param p1
785
- * @param relationshipGroup
786
- */
787
- setOnlyDamagedByRelationshipGroup(p1, relationshipGroup) {
788
- inv('0x6C1F6AA2F0ADD104', this.handle, p1, _h(relationshipGroup));
856
+ setFadeIn() {
857
+ inv('0xA91E6CF94404E8C9', this.handle);
789
858
  }
790
859
  /**
791
- * https://github.com/femga/rdr3_discoveries/tree/master/AI/ENTITY_PROOFS
792
- * BOOL p2: handles an additional special proofs flag, so it simply indicates whether it should be enabled or disabled, not sure what exactly it proofs the entity from though
793
- *
794
- * @param proofsBitset
795
- * @param specialFlag
860
+ * @returns
796
861
  */
797
- setProofs(proofsBitset, specialFlag) {
798
- inv('0xFAEE099C6F890BB8', this.handle, proofsBitset, specialFlag);
862
+ hasBeenDamagedByAnyPed() {
863
+ return !!inv('0x9934E9C42D52D87E', this.handle, rai());
799
864
  }
800
865
  /**
801
- * @returns
866
+ * @param pos
867
+ * @param xAxis
868
+ * @param yAxis
869
+ * @param zAxis
870
+ * @param clearArea
802
871
  */
803
- hasCollisionLoadedAroundEntity() {
804
- return inv('0xBEB1600952B9CF5C', this.handle, rai());
872
+ setCoords(pos, xAxis, yAxis, zAxis, clearArea) {
873
+ inv('0x06843DA7060A026B', this.handle, f(pos.x), f(pos.y), f(pos.z), xAxis, yAxis, zAxis, clearArea);
805
874
  }
806
875
  /**
876
+ * @param boneName
807
877
  * @returns
808
878
  */
809
- getIsCarriablePelt() {
810
- return inv('0x255B6DB4E3AD3C3E', this.handle);
879
+ getBoneIndexByName(boneName) {
880
+ return inv('0xBACA8FE9C76C124E', this.handle, boneName, rai());
811
881
  }
812
882
  /**
813
- * @param p1
814
- * @returns
883
+ * @param pause
815
884
  */
816
- getVelocity(p1) {
817
- return Vector3.fromArray(inv('0x4805D2B1D8CF94A9', this.handle, p1, rav()));
885
+ pauseTracking(pause) {
886
+ inv('0x36EB4D34D4A092C5', this.handle, pause);
818
887
  }
819
888
  /**
820
889
  * @param toggle
821
890
  */
822
- setCanAutoVaultOnEntity(toggle) {
823
- inv('0x80646744FA88F9D7', this.handle, toggle);
891
+ set LoadCollisionFlag(toggle) {
892
+ inv('0x9B9EE31AED48072E', this.handle, toggle);
824
893
  }
825
894
  /**
826
- * Sets the loot table an entity will carry. Returns true if loot table has been successfully set. Returns false if entity is not a ped or object.
827
- * https://github.com/femga/rdr3_discoveries/blob/master/AI/EVENTS/loot_rewards.lua
895
+ * Changes type and quality of skins
896
+ * type hashes: https://pastebin.com/C1WvQjCy
828
897
  *
829
- * @param lootTable
830
- * @returns
898
+ * @param type
831
899
  */
832
- scriptOverrideLootTablePermanent(lootTable) {
833
- return inv('0x8C03CD6B5E0E85E8', this.handle, _h(lootTable));
900
+ set CarcassType(type) {
901
+ inv('0x399657ED871B3A6C', this.handle, _h(type));
834
902
  }
835
903
  /**
836
- * @returns argStruct
904
+ * @param toggle
837
905
  */
838
- getScript() {
839
- const result = inv('0x2A08A32B6D49906F', this.handle, pvi(), rai());
840
- return [result[0] & 0xFFFFFFFF, result[1]];
906
+ set HasGravity(toggle) {
907
+ inv('0x0CEDB728A1083FA7', this.handle, toggle);
841
908
  }
842
909
  /**
843
- * @param actionHash
910
+ * @param relative
844
911
  * @returns
845
912
  */
846
- hasAnimEventFired(actionHash) {
847
- return inv('0x5851CC48405F4A07', this.handle, _h(actionHash), rai());
913
+ getSpeedVector(relative) {
914
+ return Vector3.fromArray(inv('0xF2DB09816A419DC5', this.handle, relative, rav()));
848
915
  }
849
916
  /**
850
- * @param p1
917
+ * @param entity2
918
+ * @param p2
919
+ * @param p3
920
+ * @returns
851
921
  */
852
- N_0xEF259AA1E097E0AD(p1) {
853
- inv('0xEF259AA1E097E0AD', this.handle, p1);
922
+ hasBeenDamagedByEntity(entity2, p2, p3) {
923
+ return !!inv('0x7B6E7BEC1143AC86', this.handle, entity2.handle, p2, p3, rai());
854
924
  }
855
925
  /**
856
- * Getter for FREEZE_ENTITY_POSITION
857
- *
858
926
  * @returns
859
927
  */
860
- isFrozen() {
861
- return inv('0x083D497D57B7400F', this.handle);
928
+ get IsFullyLooted() {
929
+ return inv('0x8DE41E9902E85756', this.handle);
862
930
  }
863
931
  /**
864
- * Returns the entity that is looting a ped but only while the looting is active
865
- *
866
932
  * @returns
867
933
  */
868
- getLootingPed() {
869
- return createFromHandle('Ped', inv('0xEF2D9ED7CE684F08', this.handle, rai()));
934
+ get IsOccluded() {
935
+ return !!inv('0x140188E884645624', this.handle, rai());
870
936
  }
871
937
  /**
872
- * @returns
938
+ * @param toggle
873
939
  */
874
- isWaitingForWorldCollision() {
875
- return inv('0x5E1CC2E8DC3111DD', this.handle, rai());
940
+ set CanBeDamaged(toggle) {
941
+ inv('0x0D06D522B90E861F', this.handle, toggle);
876
942
  }
877
943
  /**
878
- * Gets the X-component of the entity's forward vector.
879
- *
880
- * @returns
944
+ * @param forceFlags
945
+ * @param pos
946
+ * @param offset
947
+ * @param boneIndex
948
+ * @param isDirectionRel
949
+ * @param ignoreUpVec
950
+ * @param isForceRel
951
+ * @param p12
952
+ * @param p13
881
953
  */
882
- getForwardX() {
883
- return inv('0xDB0954E9960F6457', this.handle, raf());
954
+ applyForceToEntity(forceFlags, pos, offset, boneIndex, isDirectionRel, ignoreUpVec, isForceRel, p12, p13) {
955
+ inv('0xF15E8F5D333F09C4', this.handle, forceFlags, f(pos.x), f(pos.y), f(pos.z), f(offset.x), f(offset.y), f(offset.z), boneIndex, isDirectionRel, ignoreUpVec, isForceRel, p12, p13);
884
956
  }
885
957
  /**
886
958
  * @returns
887
959
  */
888
- isAPed() {
889
- return inv('0xCF8176912DDA4EA5', this.handle, rai());
960
+ get IsDead() {
961
+ return !!inv('0x7D5B1F88E7504BBA', this.handle, rai());
890
962
  }
891
963
  /**
964
+ * @param pos1
965
+ * @param pos2
966
+ * @param p7
967
+ * @param p8
968
+ * @param p9
892
969
  * @returns
893
970
  */
894
- getPitch() {
895
- return inv('0xEF355ABEFF7F5005', this.handle, raf());
971
+ isInArea(pos1, pos2, p7, p8, p9) {
972
+ return !!inv('0x0C2634C40A16193E', this.handle, f(pos1.x), f(pos1.y), f(pos1.z), f(pos2.x), f(pos2.y), f(pos2.z), p7, p8, p9, rai());
896
973
  }
897
974
  /**
975
+ * Returns the coordinates of an entity-bone.
976
+ * https://github.com/femga/rdr3_discoveries/tree/master/boneNames
977
+ *
978
+ * @param boneIndex
898
979
  * @returns
899
980
  */
900
- isStatic() {
901
- return inv('0x86468ADFA0F6B861', this.handle, rai());
981
+ getWorldPositionOfBone(boneIndex) {
982
+ return Vector3.fromArray(inv('0x82CFA50E34681CA5', this.handle, boneIndex, rav()));
902
983
  }
903
984
  /**
904
- * Returns the model hash from the entity
985
+ * https://github.com/femga/rdr3_discoveries/tree/master/animations
905
986
  *
987
+ * @param animName
988
+ * @param animDict
989
+ * @param p3
990
+ * @param loop
991
+ * @param stayInAnim
992
+ * @param p6
993
+ * @param delta
994
+ * @param bitset
906
995
  * @returns
907
996
  */
908
- getModel() {
909
- return (inv('0xDA76A9F39210D365', this.handle, rai())) & 0xFFFFFFFF;
997
+ playAnim(animName, animDict, p3, loop, stayInAnim, p6, delta, bitset) {
998
+ return !!inv('0xDC6D22FAB76D4874', this.handle, animName, animDict, f(p3), loop, stayInAnim, p6, f(delta), bitset, rai());
910
999
  }
911
1000
  /**
912
- * Deletes the specified entity, then sets the handle pointed to by the pointer to NULL.
1001
+ * Returns false if entity is not a ped or object.
1002
+ *
1003
+ * @returns lootTable
913
1004
  */
914
- deleteEntity() {
915
- inv('0x4CD38C78BD19A497', this.handle);
1005
+ get ScriptOverrideLootTablePermanent() {
1006
+ const result = inv('0x1E804EA9B12030A4', this.handle, pvi());
1007
+ return [result[0], result[1]];
916
1008
  }
917
1009
  /**
918
- * @param team
919
- * @param playerPedToIgnore
920
- * @param flags
1010
+ * @param animDict
1011
+ * @param animName
1012
+ * @param p3
921
1013
  * @returns
922
1014
  */
923
- getNearestPlayerToOnTeam(team, playerPedToIgnore, flags) {
924
- return createFromHandle('Player', inv('0xB2C30C3B4AFF718C', this.handle, team, playerPedToIgnore.handle, flags, rai()));
1015
+ hasAnimFinished(animDict, animName, p3) {
1016
+ return !!inv('0xAEB40615337EF1E3', this.handle, animDict, animName, p3, rai());
925
1017
  }
926
1018
  /**
927
- * Seems to return true if entity is burned / scorched
928
- * *GET_ENTITY**
929
- *
930
- * @returns
1019
+ * @param bCanBeDamaged
1020
+ * @param relGroup
931
1021
  */
932
- N_0x37B01666BAE8F7EF() {
933
- return inv('0x37B01666BAE8F7EF', this.handle);
1022
+ setCanBeDamagedByRelationshipGroup(bCanBeDamaged, relGroup) {
1023
+ inv('0x0EF1AFB18649E015', this.handle, bCanBeDamaged, _h(relGroup));
934
1024
  }
935
1025
  /**
936
- * @param toggle
1026
+ * @returns
937
1027
  */
938
- setRequiresMoreExpensiveRiverCheck(toggle) {
939
- inv('0x850C940EE3E7B8B5', this.handle, toggle);
1028
+ get UprightValue() {
1029
+ return inv('0x56398BE65160C3BE', this.handle, raf());
940
1030
  }
941
1031
  /**
942
- * @param boneIndex
943
- * @returns Returns the offset from the entity for the selected bone index.
1032
+ * @param pos
1033
+ * @param heading
1034
+ * @param xAxis
1035
+ * @param yAxis
1036
+ * @param zAxis
944
1037
  */
945
- getOffsetFromBone(boneIndex) {
946
- return Vector3.fromArray(inv('0x5E214112806591EA', this.handle, boneIndex, rav()));
947
- }
948
- N_0x9C6906EF8CB20C5F() {
949
- inv('0x9C6906EF8CB20C5F', this.handle);
1038
+ setCoordsAndHeading(pos, heading, xAxis, yAxis, zAxis) {
1039
+ inv('0x203BEFFDBE12E96A', this.handle, f(pos.x), f(pos.y), f(pos.z), f(heading), xAxis, yAxis, zAxis);
950
1040
  }
951
1041
  /**
952
- * Simply returns whatever is passed to it (Regardless of whether the handle is valid or not).
1042
+ * Returns zero if the entity is not a carriable
953
1043
  *
954
1044
  * @returns
955
1045
  */
956
- getPedIndexFromIndex() {
957
- return createFromHandle('Ped', inv('0x0F16D042BD640EA3', this.handle, rai()));
1046
+ get CarryConfig() {
1047
+ return (inv('0x0FD25587BB306C86', this.handle, rai())) & 0xFFFFFFFF;
958
1048
  }
959
1049
  /**
960
- * Sets whether the entity can be targeted without being in line-of-sight.
1050
+ * tier: https://github.com/Halen84/RDR3-Native-Flags-And-Enums/tree/main/eEntityThreatTier
961
1051
  *
962
- * @param toggle
1052
+ * @param tier
1053
+ * @param p2
963
1054
  */
964
- setCanBeTargetedWithoutLos(toggle) {
965
- inv('0x6D09F32E284D0FB7', this.handle, toggle);
1055
+ setThreatTier(tier, p2) {
1056
+ inv('0x4B436BAC8CBE9B07', this.handle, tier, p2);
966
1057
  }
967
1058
  /**
1059
+ * Returns the heading of the entity in degrees. Also know as the "Yaw" of an entity.
1060
+ *
968
1061
  * @returns
969
1062
  */
970
- isOnScreen() {
971
- return inv('0x613C15D5D8DB781F', this.handle, rai());
1063
+ get Heading() {
1064
+ return inv('0xC230DD956E2F5507', this.handle, raf());
972
1065
  }
973
1066
  /**
974
- * Old name: _SET_ENTITY_DECALS_DISABLED
1067
+ * Returns the LOD distance of an entity.
975
1068
  *
976
- * @param toggle
1069
+ * @returns
977
1070
  */
978
- setNoweapondecals(toggle) {
979
- inv('0xC64E597783BE9A1D', this.handle, toggle);
1071
+ get LodDist() {
1072
+ return inv('0xDF240D0C2A948683', this.handle, rai());
980
1073
  }
981
1074
  /**
982
1075
  * @returns
983
1076
  */
984
- getHealth() {
985
- return inv('0x82368787EA73C0F7', this.handle, rai());
1077
+ doesHaveDrawable() {
1078
+ return !!inv('0x20487F0DA9AF164A', this.handle, rai());
986
1079
  }
987
1080
  /**
988
- * sets the fill in state for some objects like for the stew, coffee mug ,poker chips, jugs ? P1 is either 0 or 2 p2 seems to be a label/name p3 is the fill in state, max seems to be for some 3.0 (most is 1.0) - 0.0
989
- * heres some of the labels/names found
990
- * tumbler_fill, Canvas, Stew_Fill, from Chip01_Ctrl to Chip10_Ctrl, from empty_jug01_Ctrl to empty_jug20_Ctrl, from full_jug01_Ctrl to full_jug20_Ctrl, CTRL_cupFill, Food_DOF_Fill, from WhiteChip_Ctrl_0 to WhiteChip_Ctrl_10, from BlueChip_Ctrl_0 to BlueChip_Ctrl_10, from BlackChip_Ctrl_0 to BlackChip_Ctrl_10, from RedChip_Ctrl_0 to RedChip_Ctrl_10,
991
- *
992
- * @param p1
993
- * @param p2
994
- * @param fill
1081
+ * @param xyzw
995
1082
  */
996
- setFillInStateForEntity(p1, p2, fill) {
997
- inv('0x669655FFB29EF1A9', this.handle, p1, p2, f(fill));
1083
+ set Quaternion(xyzw) {
1084
+ inv('0x100E7007D13E3687', this.handle, f(xyzw.x), f(xyzw.y), f(xyzw.z), f(xyzw.w));
998
1085
  }
999
1086
  /**
1000
1087
  * @returns
1001
1088
  */
1002
- doesHavePhysics() {
1003
- return inv('0xA512B3F1B2A0B51C', this.handle, rai());
1089
+ get IsAttachedToAnyObject() {
1090
+ return !!inv('0x306C1F6178F01AB3', this.handle, rai());
1004
1091
  }
1005
1092
  /**
1006
- * Returns true if calling script owns specified entity
1093
+ * Sets a ped or an object totally invincible. It doesn't take any kind of damage. Peds will not ragdoll on explosions.
1007
1094
  *
1008
- * @returns
1095
+ * @param toggle
1009
1096
  */
1010
- doesThreadOwnThisEntity() {
1011
- return inv('0x88AD6CC10D8D35B2', this.handle);
1097
+ set Invincible(toggle) {
1098
+ inv('0xA5C38736C426FCB8', this.handle, toggle);
1012
1099
  }
1013
1100
  /**
1014
- * Attach an entity to coordinates physically better name may be perfered? seems to be used with boats `p_skiff02x` ? The last 6 params are always 0 everywhere in the base code. p7 = 500.0 some kind of time? p8 =1
1101
+ * Attaches entity1 to bone (boneIndex) of entity2. boneIndex - this is different to boneID, use GET_PED_BONE_INDEX to get the index from the ID. use the index for attaching to specific bones. entity1 will be attached to entity2's centre if bone index given doesn't correspond to bone indexes for that entity type.
1102
+ * https://github.com/femga/rdr3_discoveries/tree/master/boneNames useSoftPinning - if set to false attached entity will not detach when fixed
1103
+ * collision - controls collision between the two entities (FALSE disables collision).
1104
+ * isPed - pitch doesn't work when false and roll will only work on negative numbers (only peds)
1105
+ * vertexIndex - position of vertex
1106
+ * fixedRot - if false it ignores entity vector
1015
1107
  *
1108
+ * @param entity2
1109
+ * @param boneIndex
1016
1110
  * @param pos
1017
- * @param offset
1018
- * @param p7
1019
- * @param p8
1111
+ * @param rot
1020
1112
  * @param p9
1021
- * @param p10
1022
- * @param p11
1023
- * @param p12
1024
- * @param p13
1025
- * @param p14
1113
+ * @param useSoftPinning
1114
+ * @param collision
1115
+ * @param isPed
1116
+ * @param vertexIndex
1117
+ * @param fixedRot
1118
+ * @param p15
1119
+ * @param p16
1026
1120
  */
1027
- attachToCoordsPhysically(pos, offset, p7, p8, p9, p10, p11, p12, p13, p14) {
1028
- inv('0x445D7D8EA66E373E', this.handle, f(pos.x), f(pos.y), f(pos.z), f(offset.x), f(offset.y), f(offset.z), f(p7), p8, p9, p10, p11, p12, p13, p14);
1121
+ attachToEntity(entity2, boneIndex, pos, rot, p9, useSoftPinning, collision, isPed, vertexIndex, fixedRot, p15, p16) {
1122
+ inv('0x6B9BBD38AB0796DF', this.handle, entity2.handle, boneIndex, f(pos.x), f(pos.y), f(pos.z), f(rot.x), f(rot.y), f(rot.z), p9, useSoftPinning, collision, isPed, vertexIndex, fixedRot, p15, p16);
1029
1123
  }
1030
1124
  /**
1031
- * *REMOVE_DECALS** - _REMOVE_FORCED*
1125
+ * @returns
1032
1126
  */
1033
- N_0x5826EFD6D73C4DE5() {
1034
- inv('0x5826EFD6D73C4DE5', this.handle);
1127
+ get IsAnimal() {
1128
+ return inv('0x9A100F1CF4546629', this.handle);
1035
1129
  }
1036
1130
  /**
1037
- * @param toggle
1131
+ * p6/relative - makes the xyz force not relative to world coords, but to something else
1132
+ * p7/highForce - setting false will make the force really low
1133
+ *
1134
+ * @param forceType
1135
+ * @param pos
1136
+ * @param component
1137
+ * @param isDirectionRel
1138
+ * @param isForceRel
1139
+ * @param p8
1038
1140
  */
1039
- freezePosition(toggle) {
1040
- inv('0x7D9EFB7AD6B19754', this.handle, toggle);
1141
+ applyForceToCenterOfMass(forceType, pos, component, isDirectionRel, isForceRel, p8) {
1142
+ inv('0x31DA7CEC5334DB37', this.handle, forceType, f(pos.x), f(pos.y), f(pos.z), component, isDirectionRel, isForceRel, p8);
1041
1143
  }
1042
1144
  /**
1043
- * Alters entity's health by 'amount'. Can be negative (to drain health).
1044
- * In the scripts entity2 and weaponHash are unused (zero).
1145
+ * Old name: _GET_ENTITY_CAN_BE_DAMAGED
1045
1146
  *
1046
- * @param amount
1047
- * @param entity2
1048
- * @param weaponHash Refer to [enum: eWeaponHash]
1049
1147
  * @returns
1050
1148
  */
1051
- changeHealth(amount, entity2, weaponHash) {
1052
- return inv('0x835F131E7DC8F97A', this.handle, f(amount), entity2.handle, weaponHash);
1149
+ get CanBeDamaged() {
1150
+ return inv('0x75DF9E73F2F005FD', this.handle);
1053
1151
  }
1054
1152
  /**
1153
+ * Seems to return true if entity is burned / scorched
1154
+ * *GET_ENTITY**
1155
+ *
1055
1156
  * @returns
1056
1157
  */
1057
- getAttachedTo() {
1058
- return createFromHandle('Entity', inv('0x56D713888A566481', this.handle, rai()));
1158
+ N_0x37B01666BAE8F7EF() {
1159
+ return inv('0x37B01666BAE8F7EF', this.handle);
1059
1160
  }
1060
1161
  /**
1061
1162
  * @param toggle
1062
1163
  */
1063
- setOnlyDamagedByPlayer(toggle) {
1064
- inv('0x473598683095D430', this.handle, toggle);
1164
+ set RequiresMoreExpensiveRiverCheck(toggle) {
1165
+ inv('0x850C940EE3E7B8B5', this.handle, toggle);
1065
1166
  }
1066
1167
  /**
1067
- * @param p1
1068
- * @param p2
1168
+ * @param boneIndex
1169
+ * @returns Returns the offset from the entity for the selected bone index.
1069
1170
  */
1070
- setIsTargetPriority(p1, p2) {
1071
- inv('0x0A5D170C44CB2189', this.handle, p1, f(p2));
1171
+ getOffsetFromBone(boneIndex) {
1172
+ return Vector3.fromArray(inv('0x5E214112806591EA', this.handle, boneIndex, rav()));
1173
+ }
1174
+ N_0x9C6906EF8CB20C5F() {
1175
+ inv('0x9C6906EF8CB20C5F', this.handle);
1072
1176
  }
1073
1177
  /**
1074
- * @param pos
1075
- * @param flags
1178
+ * Simply returns whatever is passed to it (Regardless of whether the handle is valid or not).
1179
+ *
1076
1180
  * @returns
1077
1181
  */
1078
- hasClearLosToCoord(pos, flags) {
1079
- return inv('0x0C9DBF48C6BA6E4C', this.handle, f(pos.x), f(pos.y), f(pos.z), flags);
1182
+ get PedIndexFromIndex() {
1183
+ return createFromHandle('Ped', inv('0x0F16D042BD640EA3', this.handle, rai()));
1080
1184
  }
1081
1185
  /**
1082
- * @param flagId Refer to [enum: eCarryingFlags]
1083
- * @param value
1186
+ * Sets whether the entity can be targeted without being in line-of-sight.
1187
+ *
1188
+ * @param toggle
1084
1189
  */
1085
- setCarryingFlag(flagId, value) {
1086
- inv('0x18FF3110CF47115D', this.handle, flagId, value);
1190
+ set CanBeTargetedWithoutLos(toggle) {
1191
+ inv('0x6D09F32E284D0FB7', this.handle, toggle);
1087
1192
  }
1088
1193
  /**
1089
1194
  * @returns
1090
1195
  */
1091
- getIsPredator() {
1092
- return inv('0x5594AFE9DE0C01B7', this.handle);
1196
+ get IsOnScreen() {
1197
+ return !!inv('0x613C15D5D8DB781F', this.handle, rai());
1093
1198
  }
1094
1199
  /**
1095
- * enum eCarriableState
1096
- * {
1097
- * CARRIABLE_STATE_NONE,
1098
- * CARRIABLE_STATE_TRANSITIONING_TO_HOGTIED,
1099
- * CARRIABLE_STATE_CARRIABLE_INTRO,
1100
- * CARRIABLE_STATE_CARRIABLE,
1101
- * CARRIABLE_STATE_BEING_PICKED_UP_FROM_GROUND,
1102
- * CARRIABLE_STATE_CARRIED_BY_HUMAN,
1103
- * CARRIABLE_STATE_BEING_PLACED_ON_GROUND,
1104
- * CARRIABLE_STATE_CARRIED_BY_MOUNT,
1105
- * CARRIABLE_STATE_BEING_PLACED_ON_MOUNT,
1106
- * CARRIABLE_STATE_BEING_PICKED_UP_FROM_MOUNT,
1107
- * CARRIABLE_STATE_BEING_CUT_FREE,
1108
- * CARRIABLE_STATE_BEING_PLACED_ON_GROUND_ESCAPE,
1109
- * CARRIABLE_STATE_BEING_PLACED_IN_VEHICLE
1110
- * };
1200
+ * Old name: _SET_ENTITY_DECALS_DISABLED
1111
1201
  *
1202
+ * @param toggle
1203
+ */
1204
+ set Noweapondecals(toggle) {
1205
+ inv('0xC64E597783BE9A1D', this.handle, toggle);
1206
+ }
1207
+ /**
1112
1208
  * @returns
1113
1209
  */
1114
- getCarriableState() {
1115
- return inv('0x61914209C36EFDDB', this.handle, rai());
1210
+ get Health() {
1211
+ return inv('0x82368787EA73C0F7', this.handle, rai());
1212
+ }
1213
+ /**
1214
+ * sets the fill in state for some objects like for the stew, coffee mug ,poker chips, jugs ? P1 is either 0 or 2 p2 seems to be a label/name p3 is the fill in state, max seems to be for some 3.0 (most is 1.0) - 0.0
1215
+ * heres some of the labels/names found
1216
+ * tumbler_fill, Canvas, Stew_Fill, from Chip01_Ctrl to Chip10_Ctrl, from empty_jug01_Ctrl to empty_jug20_Ctrl, from full_jug01_Ctrl to full_jug20_Ctrl, CTRL_cupFill, Food_DOF_Fill, from WhiteChip_Ctrl_0 to WhiteChip_Ctrl_10, from BlueChip_Ctrl_0 to BlueChip_Ctrl_10, from BlackChip_Ctrl_0 to BlackChip_Ctrl_10, from RedChip_Ctrl_0 to RedChip_Ctrl_10,
1217
+ *
1218
+ * @param p1
1219
+ * @param p2
1220
+ * @param fill
1221
+ */
1222
+ setFillInStateForEntity(p1, p2, fill) {
1223
+ inv('0x669655FFB29EF1A9', this.handle, p1, p2, f(fill));
1116
1224
  }
1117
1225
  /**
1118
- * @param value
1226
+ * @returns
1119
1227
  */
1120
- setMaxHealth(value) {
1121
- inv('0x166E7CF68597D8B5', this.handle, value);
1228
+ doesHavePhysics() {
1229
+ return !!inv('0xA512B3F1B2A0B51C', this.handle, rai());
1122
1230
  }
1123
1231
  /**
1124
- * Params: p1 (probably animType) = 1, 0
1232
+ * Returns true if calling script owns specified entity
1125
1233
  *
1126
- * @param p1
1127
1234
  * @returns
1128
1235
  */
1129
- isPlayingAnyAnim(p1) {
1130
- return inv('0x0B7CB1300CBFE19C', this.handle, p1, rai());
1236
+ doesThreadOwnThisEntity() {
1237
+ return inv('0x88AD6CC10D8D35B2', this.handle);
1131
1238
  }
1132
1239
  /**
1133
- * @param enabled
1240
+ * Attach an entity to coordinates physically better name may be perfered? seems to be used with boats `p_skiff02x` ? The last 6 params are always 0 everywhere in the base code. p7 = 500.0 some kind of time? p8 =1
1241
+ *
1242
+ * @param pos
1243
+ * @param offset
1244
+ * @param p7
1245
+ * @param p8
1246
+ * @param p9
1247
+ * @param p10
1248
+ * @param p11
1249
+ * @param p12
1250
+ * @param p13
1251
+ * @param p14
1134
1252
  */
1135
- setLightsEnabled(enabled) {
1136
- inv('0xEBDC12861D079ABA', this.handle, enabled);
1253
+ attachToCoordsPhysically(pos, offset, p7, p8, p9, p10, p11, p12, p13, p14) {
1254
+ inv('0x445D7D8EA66E373E', this.handle, f(pos.x), f(pos.y), f(pos.z), f(offset.x), f(offset.y), f(offset.z), f(p7), p8, p9, p10, p11, p12, p13, p14);
1137
1255
  }
1138
1256
  /**
1139
- * Offset values are relative to the entity. x = left/right
1140
- * y = forward/backward
1141
- * z = up/down
1142
- *
1143
- * @param offset
1144
- * @returns
1257
+ * *REMOVE_DECALS** - _REMOVE_FORCED*
1145
1258
  */
1146
- getOffsetFromInWorldCoords(offset) {
1147
- return Vector3.fromArray(inv('0x1899F328B0E12848', this.handle, f(offset.x), f(offset.y), f(offset.z), rav()));
1259
+ N_0x5826EFD6D73C4DE5() {
1260
+ inv('0x5826EFD6D73C4DE5', this.handle);
1148
1261
  }
1149
1262
  /**
1150
- * Checks if entity1 is within the box defined by x/y/zSize of entity2. Last three parameters are almost always p5 = 0, p6 = 1, p7 = 0
1263
+ * @param toggle
1264
+ */
1265
+ freezePosition(toggle) {
1266
+ inv('0x7D9EFB7AD6B19754', this.handle, toggle);
1267
+ }
1268
+ /**
1269
+ * Alters entity's health by 'amount'. Can be negative (to drain health).
1270
+ * In the scripts entity2 and weaponHash are unused (zero).
1151
1271
  *
1272
+ * @param amount
1152
1273
  * @param entity2
1153
- * @param xSize
1154
- * @param ySize
1155
- * @param zSize
1156
- * @param p5
1157
- * @param p6
1158
- * @param p7
1274
+ * @param weaponHash Refer to [enum: eWeaponHash]
1159
1275
  * @returns
1160
1276
  */
1161
- isAtEntity(entity2, xSize, ySize, zSize, p5, p6, p7) {
1162
- return inv('0xC057F02B837A27F6', this.handle, entity2.handle, f(xSize), f(ySize), f(zSize), p5, p6, p7, rai());
1277
+ changeHealth(amount, entity2, weaponHash) {
1278
+ return inv('0x835F131E7DC8F97A', this.handle, f(amount), entity2.handle, weaponHash);
1163
1279
  }
1164
1280
  /**
1165
- * @param toggle
1281
+ * @returns
1166
1282
  */
1167
- setVisible(toggle) {
1168
- inv('0x1794B4FCC84D812F', this.handle, toggle);
1283
+ get AttachedTo() {
1284
+ return createFromHandle('Entity', inv('0x56D713888A566481', this.handle, rai()));
1169
1285
  }
1170
1286
  /**
1171
- * Old name: _SET_ENTITY_CLEANUP_BY_ENGINE
1172
- *
1173
1287
  * @param toggle
1174
1288
  */
1175
- setShouldFreezeWaitingOnCollision(toggle) {
1176
- inv('0x740CB4F3F602C9F4', this.handle, toggle);
1289
+ set OnlyDamagedByPlayer(toggle) {
1290
+ inv('0x473598683095D430', this.handle, toggle);
1177
1291
  }
1178
1292
  /**
1179
- * Note: this native was removed in 1232 but added back in 1311
1180
- * Old name: _GET_ENTITY_PROOFS
1181
- *
1293
+ * @param p1
1294
+ * @param p2
1295
+ */
1296
+ setIsTargetPriority(p1, p2) {
1297
+ inv('0x0A5D170C44CB2189', this.handle, p1, f(p2));
1298
+ }
1299
+ /**
1300
+ * @param pos
1301
+ * @param flags
1182
1302
  * @returns
1183
1303
  */
1184
- getProofs() {
1185
- return inv('0x6CF0DAD7FA1088EA', this.handle, rai());
1304
+ hasClearLosToCoord(pos, flags) {
1305
+ return inv('0x0C9DBF48C6BA6E4C', this.handle, f(pos.x), f(pos.y), f(pos.z), flags);
1186
1306
  }
1187
1307
  /**
1188
- * skin - everything alpha except skin
1189
- * Set entity alpha level. Ranging from 0 to 255 but changes occur after every 20 percent (after every 51).
1190
- *
1191
- * @param alphaLevel
1192
- * @param skin
1308
+ * @param flagId Refer to [enum: eCarryingFlags]
1309
+ * @param value
1193
1310
  */
1194
- setAlpha(alphaLevel, skin) {
1195
- inv('0x0DF7692B1D9E7BA7', this.handle, alphaLevel, skin);
1311
+ setCarryingFlag(flagId, value) {
1312
+ inv('0x18FF3110CF47115D', this.handle, flagId, value);
1196
1313
  }
1197
1314
  /**
1198
1315
  * @returns
1199
1316
  */
1200
- getThreatTier() {
1201
- return inv('0xE12F56CB25D9CE23', this.handle, rai());
1317
+ get IsPredator() {
1318
+ return inv('0x5594AFE9DE0C01B7', this.handle);
1202
1319
  }
1203
1320
  /**
1204
1321
  * Returns entityType: https://github.com/Halen84/RDR3-Native-Flags-And-Enums/tree/main/eEntityType
1205
1322
  *
1206
1323
  * @returns
1207
1324
  */
1208
- getType() {
1325
+ get Type() {
1209
1326
  return inv('0x97F696ACA466B4E0', this.handle, rai());
1210
1327
  }
1211
1328
  /**
1212
1329
  * @returns
1213
1330
  */
1214
- isOwnedByPersistenceSystem() {
1331
+ get IsOwnedByPersistenceSystem() {
1215
1332
  return inv('0xA7E51B53309EAC97', this.handle);
1216
1333
  }
1217
1334
  /**
@@ -1221,7 +1338,7 @@ export class Entity {
1221
1338
  * @returns
1222
1339
  */
1223
1340
  isPlayingAnim(animDict, animName, animType) {
1224
- return inv('0xDEE49D5CA6C49148', this.handle, animDict, animName, animType, rai());
1341
+ return !!inv('0xDEE49D5CA6C49148', this.handle, animDict, animName, animType, rai());
1225
1342
  }
1226
1343
  /**
1227
1344
  * Marks the specified entity (ped, vehicle or object) as no longer needed, allowing the game engine to delete it whenever it sees fit.
@@ -1233,7 +1350,7 @@ export class Entity {
1233
1350
  * @returns
1234
1351
  */
1235
1352
  hasBeenDamagedByAnyVehicle() {
1236
- return inv('0x695D7C26DE65C423', this.handle, rai());
1353
+ return !!inv('0x695D7C26DE65C423', this.handle, rai());
1237
1354
  }
1238
1355
  /**
1239
1356
  * @param animDict
@@ -1251,14 +1368,14 @@ export class Entity {
1251
1368
  *
1252
1369
  * @returns
1253
1370
  */
1254
- getSubmergedLevel() {
1371
+ get SubmergedLevel() {
1255
1372
  return inv('0x4A77C3F73FD9E831', this.handle, raf());
1256
1373
  }
1257
1374
  /**
1258
1375
  * @returns
1259
1376
  */
1260
- isAttached() {
1261
- return inv('0xEE6AD63ABF59C0B7', this.handle, rai());
1377
+ get IsAttached() {
1378
+ return !!inv('0xEE6AD63ABF59C0B7', this.handle, rai());
1262
1379
  }
1263
1380
  /**
1264
1381
  * SET_ENTITY_A*
@@ -1271,215 +1388,107 @@ export class Entity {
1271
1388
  /**
1272
1389
  * @param looted
1273
1390
  */
1274
- setFullyLooted(looted) {
1391
+ set FullyLooted(looted) {
1275
1392
  inv('0x6BCF5F3D8FFE988D', this.handle, looted);
1276
1393
  }
1277
1394
  /**
1278
1395
  * @returns
1279
1396
  */
1280
- isAttachedToAnyVehicle() {
1281
- return inv('0x12DF6E0D2E736749', this.handle, rai());
1397
+ get IsAttachedToAnyVehicle() {
1398
+ return !!inv('0x12DF6E0D2E736749', this.handle, rai());
1282
1399
  }
1283
1400
  /**
1284
- * Used in Script Function DUELING_DID_PLAYER_DISARM_OPPONENT
1285
- *
1286
- * @param entity2
1287
- * @param p2
1288
- * @param p3
1289
1401
  * @returns
1290
1402
  */
1291
- N_0x3EC28DA1FFAC9DDD(entity2, p2, p3) {
1292
- return inv('0x3EC28DA1FFAC9DDD', this.handle, entity2.handle, p2, p3, rai());
1293
- }
1294
- /**
1295
- * Must be called from a background script, otherwise it will do nothing.
1296
- */
1297
- delete2() {
1298
- inv('0x5E94EA09E7207C16', this.handle);
1403
+ get IsUpsidedown() {
1404
+ return !!inv('0x109DE3DA41AAD94A', this.handle, rai());
1299
1405
  }
1300
1406
  /**
1301
1407
  * @param p1
1302
1408
  * @returns
1303
1409
  */
1304
- isInAir(p1) {
1305
- return inv('0x886E37EC497200B6', this.handle, p1, rai());
1306
- }
1307
- /**
1308
- * @returns
1309
- */
1310
- isAMissionEntity() {
1311
- return inv('0x138190F64DB4BBD1', this.handle, rai());
1312
- }
1313
- /**
1314
- * @returns
1315
- */
1316
- isAttachedToAnyPed() {
1317
- return inv('0xC841153DED2CA89A', this.handle, rai());
1318
- }
1319
- /**
1320
- * @param to
1321
- * @returns
1322
- */
1323
- isAttachedToEntity(to) {
1324
- return inv('0x154A3C529497053E', this.handle, to.handle, rai());
1325
- }
1326
- /**
1327
- * @returns
1328
- */
1329
- hasBeenDamagedByAnyObject() {
1330
- return inv('0x73BB763880CD23A6', this.handle, rai());
1410
+ doesBelongToThisScript(p1) {
1411
+ return !!inv('0x622B1980CBE13332', this.handle, p1, rai());
1331
1412
  }
1332
1413
  /**
1333
- * @param rotationOrder
1414
+ * Returns a hash of an entity's name. (Alternative Name: _GET_ENTITY_PROMPT_NAME_HASH)
1415
+ *
1334
1416
  * @returns
1335
1417
  */
1336
- getRotation(rotationOrder) {
1337
- return Vector3.fromArray(inv('0xE09CAF86C32CB48F', this.handle, rotationOrder, rav()));
1418
+ get CarriableFromEntity() {
1419
+ return (inv('0x31FEF6A20F00B963', this.handle, rai())) & 0xFFFFFFFF;
1338
1420
  }
1339
1421
  /**
1340
1422
  * @param toggle
1423
+ * @param keepPhysics
1341
1424
  */
1342
- setMotionBlur(toggle) {
1343
- inv('0x516C6ABD18322B63', this.handle, toggle);
1344
- }
1345
- resetAlpha() {
1346
- inv('0x744B9EF44779D9AB', this.handle);
1425
+ setCollision(toggle, keepPhysics) {
1426
+ inv('0xF66F820909453B8C', this.handle, toggle, keepPhysics);
1347
1427
  }
1348
1428
  /**
1349
- * Checks if entity is within x/y/zSize distance of x/y/z. Last three are unknown ints, almost always p7 = 0, p8 = 1, p9 = 0
1350
- *
1351
- * @param pos
1352
- * @param xSize
1353
- * @param ySize
1354
- * @param zSize
1355
- * @param p7
1356
- * @param p8
1357
- * @param p9
1429
+ * @param p1
1358
1430
  * @returns
1359
1431
  */
1360
- isAtCoord(pos, xSize, ySize, zSize, p7, p8, p9) {
1361
- return inv('0x5E58342602E94718', this.handle, f(pos.x), f(pos.y), f(pos.z), f(xSize), f(ySize), f(zSize), p7, p8, p9, rai());
1362
- }
1363
- /**
1364
- * @param entity2
1365
- * @param p2
1366
- * @param boneIndex
1367
- * @param offset
1368
- * @param p7
1369
- * @param p8
1370
- * @param p9
1371
- * @param p10
1372
- * @param p11
1373
- * @param p12
1374
- * @param p13
1375
- * @param p14
1376
- * @param p15
1377
- * @param p16
1378
- * @param p17
1379
- * @param p18
1380
- * @param p19
1381
- * @param p20
1382
- * @param p21
1383
- */
1384
- attachToEntityPhysically(entity2, p2, boneIndex, offset, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21) {
1385
- inv('0xB629A43CA1643481', this.handle, entity2.handle, p2, boneIndex, f(offset.x), f(offset.y), f(offset.z), f(p7), f(p8), f(p9), f(p10), f(p11), f(p12), f(p13), p14, p15, p16, p17, p18, p19, f(p20), f(p21));
1432
+ placeOnGroundProperly(p1) {
1433
+ return inv('0x9587913B9E772D29', this.handle, p1);
1386
1434
  }
1387
1435
  /**
1388
1436
  * @returns
1389
1437
  */
1390
- getHeightAboveGround() {
1391
- return inv('0x0D3B5BAEA08F63E9', this.handle, raf());
1438
+ get IsInWater() {
1439
+ return !!inv('0xDDE5C125AC446723', this.handle, rai());
1392
1440
  }
1393
1441
  /**
1394
- * @param pos
1395
- * @param heading
1396
- * @param p5
1397
- * @param p6
1442
+ * @returns Returns `true` if the entity exists
1398
1443
  */
1399
- setCoordsAndHeadingNoOffset(pos, heading, p5, p6) {
1400
- inv('0x0918E3565C20F03C', this.handle, f(pos.x), f(pos.y), f(pos.z), f(heading), p5, p6);
1444
+ doesExist() {
1445
+ return !!inv('0xD42BD6EB2E0F1677', this.handle, rai());
1401
1446
  }
1402
1447
  /**
1403
- * Creates a spherical cone at origin that extends to surface with the angle specified. Then returns true if the entity is inside the spherical cone Angle is measured in degrees.
1404
- *
1405
- * @param originX
1406
- * @param originY
1407
- * @param originZ
1408
- * @param edgeX
1409
- * @param edgeY
1410
- * @param edgeZ
1411
- * @param angle
1412
- * @param p8
1413
- * @param p9
1414
- * @param p10
1415
1448
  * @returns
1416
1449
  */
1417
- isInAngledArea(originX, originY, originZ, edgeX, edgeY, edgeZ, angle, p8, p9, p10) {
1418
- return inv('0xD3151E53134595E5', this.handle, f(originX), f(originY), f(originZ), f(edgeX), f(edgeY), f(edgeZ), f(angle), p8, p9, p10, rai());
1419
- }
1420
- clearLastDamageEntity() {
1421
- inv('0xBB19AC7D4DCEFD0F', this.handle);
1422
- }
1423
- /**
1424
- * @param toggle
1425
- */
1426
- setAlwaysPrerender(toggle) {
1427
- inv('0xACAD101E1FB66689', this.handle, toggle);
1450
+ get Alpha() {
1451
+ return inv('0x1BB501624FAF2BEA', this.handle, rai());
1428
1452
  }
1429
1453
  /**
1430
- * Note that the third parameter(denoted as z) is "up and down" with positive numbers encouraging upwards movement.
1454
+ * This native only works on `Ped` and `Object` entity types
1431
1455
  *
1432
- * @param pos
1456
+ * @param flagId Refer to [enum: eCarryingFlags]
1457
+ * @returns
1433
1458
  */
1434
- setVelocity(pos) {
1435
- inv('0x1C99BB7B6E96D16F', this.handle, f(pos.x), f(pos.y), f(pos.z));
1459
+ getCarryingFlag(flagId) {
1460
+ return inv('0x808077647856DE62', this.handle, flagId, rai());
1436
1461
  }
1437
1462
  /**
1438
- * SET_ENTITY_LO*
1439
- *
1440
1463
  * @param p1
1441
- * @param p2
1442
- * @param p3
1443
- */
1444
- N_0xAF7F3099B9FEB535(p1, p2, p3) {
1445
- inv('0xAF7F3099B9FEB535', this.handle, f(p1), f(p2), f(p3));
1446
- }
1447
- /**
1448
- * @returns
1449
1464
  */
1450
- N_0xAF72EC7E1B54539B() {
1451
- return createFromHandle('Entity', inv('0xAF72EC7E1B54539B', this.handle, rai()));
1465
+ forceAiAndAnimationUpdate(p1) {
1466
+ inv('0x4C9E96473D4F1A88', this.handle, p1);
1452
1467
  }
1453
1468
  /**
1454
- * Simply returns whatever is passed to it (Regardless of whether the handle is valid or not).
1469
+ * Axis - Invert Axis Flags
1455
1470
  *
1456
- * @returns
1471
+ * @param pos
1472
+ * @param xAxis
1473
+ * @param yAxis
1474
+ * @param zAxis
1457
1475
  */
1458
- getObjectIndexFromIndex() {
1459
- return createFromHandle('Prop', inv('0x280BBE5601EAA983', this.handle, rai()));
1476
+ setCoordsNoOffset(pos, xAxis, yAxis, zAxis) {
1477
+ inv('0x239A3351AC1DA385', this.handle, f(pos.x), f(pos.y), f(pos.z), xAxis, yAxis, zAxis);
1460
1478
  }
1461
1479
  /**
1462
- * Has the entity1 got a clear line of sight to the other entity2 from the direction entity1 is facing.
1480
+ * Returns (CUR_HEALTH / MAX_HEALTH)
1463
1481
  *
1464
- * @param entity2
1465
- * @param traceType
1466
- * @returns
1467
- */
1468
- hasClearLosToEntityInFront(entity2, traceType) {
1469
- return inv('0xE88F19660651D566', this.handle, entity2.handle, traceType, rai());
1470
- }
1471
- /**
1472
1482
  * @returns
1473
1483
  */
1474
- isOnTrainTrack() {
1475
- return inv('0x857ACB0AB4BD0D55', this.handle);
1484
+ get HealthFloat() {
1485
+ return inv('0x96C638784DB4C815', this.handle, raf());
1476
1486
  }
1477
1487
  /**
1478
- * @param angle
1479
- * @returns
1488
+ * Gets the network ID of this entity for network synchronization.
1480
1489
  */
1481
- isUpright(angle) {
1482
- return inv('0xF6F6AFD8D4FB2658', this.handle, f(angle), rai());
1490
+ get NetworkId() {
1491
+ return inv('0xA11700682F3AD45C', this.handle, rai());
1483
1492
  }
1484
1493
  }
1485
1494
  registerHandle('Entity', Entity);