@nativewrappers/redm-codegen 0.0.2 → 0.0.3

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 (254) hide show
  1. package/dist/classes/AnimScene.d.ts +142 -142
  2. package/dist/classes/AnimScene.d.ts.map +1 -1
  3. package/dist/classes/AnimScene.js +203 -203
  4. package/dist/classes/BaseModel.d.ts +29 -29
  5. package/dist/classes/BaseModel.d.ts.map +1 -1
  6. package/dist/classes/BaseModel.js +43 -43
  7. package/dist/classes/BaseTask.d.ts +34 -34
  8. package/dist/classes/BaseTask.d.ts.map +1 -1
  9. package/dist/classes/BaseTask.js +42 -42
  10. package/dist/classes/Cam.d.ts +71 -71
  11. package/dist/classes/Cam.d.ts.map +1 -1
  12. package/dist/classes/Cam.js +102 -102
  13. package/dist/classes/Entity.d.ts +387 -386
  14. package/dist/classes/Entity.d.ts.map +1 -1
  15. package/dist/classes/Entity.js +509 -504
  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/Ped.d.ts +67 -66
  20. package/dist/classes/Ped.d.ts.map +1 -1
  21. package/dist/classes/Ped.js +80 -75
  22. package/dist/classes/PedTask.d.ts +1518 -1518
  23. package/dist/classes/PedTask.d.ts.map +1 -1
  24. package/dist/classes/PedTask.js +1930 -1930
  25. package/dist/classes/PersChar.d.ts +11 -11
  26. package/dist/classes/PersChar.d.ts.map +1 -1
  27. package/dist/classes/PersChar.js +23 -23
  28. package/dist/classes/Pickup.d.ts +7 -7
  29. package/dist/classes/Pickup.d.ts.map +1 -1
  30. package/dist/classes/Pickup.js +13 -13
  31. package/dist/classes/Player.d.ts +237 -237
  32. package/dist/classes/Player.d.ts.map +1 -1
  33. package/dist/classes/Player.js +319 -319
  34. package/dist/classes/Prop.d.ts +105 -104
  35. package/dist/classes/Prop.d.ts.map +1 -1
  36. package/dist/classes/Prop.js +155 -150
  37. package/dist/classes/PropSet.d.ts +1 -1
  38. package/dist/classes/PropSet.d.ts.map +1 -1
  39. package/dist/classes/Vehicle.d.ts +1 -0
  40. package/dist/classes/Vehicle.d.ts.map +1 -1
  41. package/dist/classes/Vehicle.js +5 -0
  42. package/dist/classes/VehicleTask.d.ts +21 -21
  43. package/dist/classes/VehicleTask.d.ts.map +1 -1
  44. package/dist/classes/VehicleTask.js +27 -27
  45. package/dist/classes/Volume.d.ts +40 -40
  46. package/dist/classes/Volume.d.ts.map +1 -1
  47. package/dist/classes/Volume.js +54 -54
  48. package/dist/classes/Weapon.d.ts +364 -364
  49. package/dist/classes/Weapon.d.ts.map +1 -1
  50. package/dist/classes/Weapon.js +515 -515
  51. package/dist/namespaces/Aitransport.d.ts +77 -77
  52. package/dist/namespaces/Aitransport.d.ts.map +1 -1
  53. package/dist/namespaces/Aitransport.js +94 -94
  54. package/dist/namespaces/Animscene.d.ts +65 -65
  55. package/dist/namespaces/Animscene.d.ts.map +1 -1
  56. package/dist/namespaces/Animscene.js +83 -83
  57. package/dist/namespaces/Audio.d.ts +464 -464
  58. package/dist/namespaces/Audio.d.ts.map +1 -1
  59. package/dist/namespaces/Audio.js +651 -651
  60. package/dist/namespaces/Bounty.d.ts +23 -23
  61. package/dist/namespaces/Bounty.d.ts.map +1 -1
  62. package/dist/namespaces/Bounty.js +40 -40
  63. package/dist/namespaces/Brain.d.ts +15 -15
  64. package/dist/namespaces/Brain.d.ts.map +1 -1
  65. package/dist/namespaces/Brain.js +20 -20
  66. package/dist/namespaces/CamStatics.d.ts +459 -459
  67. package/dist/namespaces/CamStatics.d.ts.map +1 -1
  68. package/dist/namespaces/CamStatics.js +719 -719
  69. package/dist/namespaces/Collection.d.ts +78 -78
  70. package/dist/namespaces/Collection.d.ts.map +1 -1
  71. package/dist/namespaces/Collection.js +109 -109
  72. package/dist/namespaces/Companion.d.ts +22 -22
  73. package/dist/namespaces/Companion.d.ts.map +1 -1
  74. package/dist/namespaces/Companion.js +30 -30
  75. package/dist/namespaces/Compendium.d.ts +94 -94
  76. package/dist/namespaces/Compendium.d.ts.map +1 -1
  77. package/dist/namespaces/Compendium.js +126 -126
  78. package/dist/namespaces/Databinding.d.ts +113 -113
  79. package/dist/namespaces/Databinding.d.ts.map +1 -1
  80. package/dist/namespaces/Databinding.js +167 -167
  81. package/dist/namespaces/Dlc.d.ts +5 -5
  82. package/dist/namespaces/Dlc.d.ts.map +1 -1
  83. package/dist/namespaces/Dlc.js +9 -9
  84. package/dist/namespaces/EntityStatics.d.ts +164 -164
  85. package/dist/namespaces/EntityStatics.d.ts.map +1 -1
  86. package/dist/namespaces/EntityStatics.js +225 -225
  87. package/dist/namespaces/Event.d.ts +62 -62
  88. package/dist/namespaces/Event.d.ts.map +1 -1
  89. package/dist/namespaces/Event.js +82 -82
  90. package/dist/namespaces/Fire.d.ts +7 -7
  91. package/dist/namespaces/Fire.d.ts.map +1 -1
  92. package/dist/namespaces/Fire.js +9 -9
  93. package/dist/namespaces/Graphics.d.ts +688 -688
  94. package/dist/namespaces/Graphics.d.ts.map +1 -1
  95. package/dist/namespaces/Graphics.js +876 -876
  96. package/dist/namespaces/Hud.d.ts +456 -456
  97. package/dist/namespaces/Hud.d.ts.map +1 -1
  98. package/dist/namespaces/Hud.js +598 -598
  99. package/dist/namespaces/InteriorStatics.d.ts +42 -42
  100. package/dist/namespaces/InteriorStatics.d.ts.map +1 -1
  101. package/dist/namespaces/InteriorStatics.js +56 -56
  102. package/dist/namespaces/Inventory.d.ts +156 -156
  103. package/dist/namespaces/Inventory.d.ts.map +1 -1
  104. package/dist/namespaces/Inventory.js +210 -210
  105. package/dist/namespaces/Itemdatabase.d.ts +3 -3
  106. package/dist/namespaces/Itemdatabase.d.ts.map +1 -1
  107. package/dist/namespaces/Law.d.ts +2 -2
  108. package/dist/namespaces/Law.d.ts.map +1 -1
  109. package/dist/namespaces/Map.d.ts +128 -128
  110. package/dist/namespaces/Map.d.ts.map +1 -1
  111. package/dist/namespaces/Map.js +180 -180
  112. package/dist/namespaces/Minigame.d.ts +60 -60
  113. package/dist/namespaces/Minigame.d.ts.map +1 -1
  114. package/dist/namespaces/Minigame.js +88 -88
  115. package/dist/namespaces/Misc.d.ts +5 -5
  116. package/dist/namespaces/Misc.d.ts.map +1 -1
  117. package/dist/namespaces/Missiondata.d.ts +3 -3
  118. package/dist/namespaces/Missiondata.d.ts.map +1 -1
  119. package/dist/namespaces/Netshopping.d.ts +1 -1
  120. package/dist/namespaces/Netshopping.d.ts.map +1 -1
  121. package/dist/namespaces/Network.d.ts +1528 -1536
  122. package/dist/namespaces/Network.d.ts.map +1 -1
  123. package/dist/namespaces/Network.js +2196 -2204
  124. package/dist/namespaces/Object.d.ts +244 -244
  125. package/dist/namespaces/Object.d.ts.map +1 -1
  126. package/dist/namespaces/Object.js +355 -355
  127. package/dist/namespaces/Pad.d.ts +43 -43
  128. package/dist/namespaces/Pad.d.ts.map +1 -1
  129. package/dist/namespaces/Pad.js +58 -58
  130. package/dist/namespaces/PedStatics.d.ts +21 -21
  131. package/dist/namespaces/PedStatics.d.ts.map +1 -1
  132. package/dist/namespaces/PedStatics.js +26 -26
  133. package/dist/namespaces/Perschar.d.ts +62 -62
  134. package/dist/namespaces/Perschar.d.ts.map +1 -1
  135. package/dist/namespaces/Perschar.js +91 -91
  136. package/dist/namespaces/Persistence.d.ts +30 -30
  137. package/dist/namespaces/Persistence.d.ts.map +1 -1
  138. package/dist/namespaces/Persistence.js +42 -42
  139. package/dist/namespaces/Physics.d.ts +207 -207
  140. package/dist/namespaces/Physics.d.ts.map +1 -1
  141. package/dist/namespaces/Physics.js +310 -310
  142. package/dist/namespaces/PlayerStatics.d.ts +72 -72
  143. package/dist/namespaces/PlayerStatics.d.ts.map +1 -1
  144. package/dist/namespaces/PlayerStatics.js +103 -103
  145. package/dist/namespaces/Population.d.ts +88 -88
  146. package/dist/namespaces/Population.d.ts.map +1 -1
  147. package/dist/namespaces/Population.js +116 -116
  148. package/dist/namespaces/Posse.d.ts +49 -49
  149. package/dist/namespaces/Posse.d.ts.map +1 -1
  150. package/dist/namespaces/Posse.js +79 -79
  151. package/dist/namespaces/Propset.d.ts +1 -1
  152. package/dist/namespaces/Propset.d.ts.map +1 -1
  153. package/dist/namespaces/Scripts.d.ts +3 -3
  154. package/dist/namespaces/Scripts.d.ts.map +1 -1
  155. package/dist/namespaces/Shapetest.d.ts +11 -11
  156. package/dist/namespaces/Shapetest.d.ts.map +1 -1
  157. package/dist/namespaces/Shapetest.js +13 -13
  158. package/dist/namespaces/Socialclub.d.ts +1 -1
  159. package/dist/namespaces/Socialclub.d.ts.map +1 -1
  160. package/dist/namespaces/Stats.d.ts +174 -174
  161. package/dist/namespaces/Stats.d.ts.map +1 -1
  162. package/dist/namespaces/Stats.js +240 -240
  163. package/dist/namespaces/Streaming.d.ts +127 -127
  164. package/dist/namespaces/Streaming.d.ts.map +1 -1
  165. package/dist/namespaces/Streaming.js +193 -193
  166. package/dist/namespaces/Task.d.ts +220 -220
  167. package/dist/namespaces/Task.d.ts.map +1 -1
  168. package/dist/namespaces/Task.js +299 -299
  169. package/dist/namespaces/Telemetry.d.ts +188 -188
  170. package/dist/namespaces/Telemetry.d.ts.map +1 -1
  171. package/dist/namespaces/Telemetry.js +249 -249
  172. package/dist/namespaces/Uiapps.d.ts +24 -24
  173. package/dist/namespaces/Uiapps.d.ts.map +1 -1
  174. package/dist/namespaces/Uiapps.js +33 -33
  175. package/dist/namespaces/Uistickyfeed.d.ts +16 -16
  176. package/dist/namespaces/Uistickyfeed.d.ts.map +1 -1
  177. package/dist/namespaces/Uistickyfeed.js +21 -21
  178. package/dist/namespaces/VehicleStatics.d.ts +2 -2
  179. package/dist/namespaces/VehicleStatics.d.ts.map +1 -1
  180. package/dist/namespaces/VolumeStatics.d.ts +64 -64
  181. package/dist/namespaces/VolumeStatics.d.ts.map +1 -1
  182. package/dist/namespaces/VolumeStatics.js +85 -85
  183. package/dist/namespaces/WeaponStatics.d.ts +262 -262
  184. package/dist/namespaces/WeaponStatics.d.ts.map +1 -1
  185. package/dist/namespaces/WeaponStatics.js +361 -361
  186. package/dist/namespaces/Zone.d.ts +2 -2
  187. package/dist/namespaces/Zone.d.ts.map +1 -1
  188. package/package.json +1 -1
  189. package/src/classes/AnimScene.ts +230 -230
  190. package/src/classes/BaseModel.ts +50 -50
  191. package/src/classes/BaseTask.ts +46 -46
  192. package/src/classes/Cam.ts +113 -113
  193. package/src/classes/Entity.ts +537 -532
  194. package/src/classes/Interior.ts +43 -43
  195. package/src/classes/Ped.ts +100 -95
  196. package/src/classes/PedTask.ts +1969 -1969
  197. package/src/classes/PersChar.ts +28 -28
  198. package/src/classes/Pickup.ts +13 -13
  199. package/src/classes/Player.ts +364 -364
  200. package/src/classes/Prop.ts +167 -162
  201. package/src/classes/PropSet.ts +1 -1
  202. package/src/classes/Vehicle.ts +5 -0
  203. package/src/classes/VehicleTask.ts +30 -30
  204. package/src/classes/Volume.ts +62 -62
  205. package/src/classes/Weapon.ts +517 -517
  206. package/src/namespaces/Aitransport.ts +102 -102
  207. package/src/namespaces/Animscene.ts +92 -92
  208. package/src/namespaces/Audio.ts +765 -765
  209. package/src/namespaces/Bounty.ts +46 -46
  210. package/src/namespaces/Brain.ts +22 -22
  211. package/src/namespaces/CamStatics.ts +747 -747
  212. package/src/namespaces/Collection.ts +112 -112
  213. package/src/namespaces/Companion.ts +34 -34
  214. package/src/namespaces/Compendium.ts +131 -131
  215. package/src/namespaces/Databinding.ts +170 -170
  216. package/src/namespaces/Dlc.ts +9 -9
  217. package/src/namespaces/EntityStatics.ts +237 -237
  218. package/src/namespaces/Event.ts +92 -92
  219. package/src/namespaces/Fire.ts +10 -10
  220. package/src/namespaces/Graphics.ts +1206 -1206
  221. package/src/namespaces/Hud.ts +647 -647
  222. package/src/namespaces/InteriorStatics.ts +66 -66
  223. package/src/namespaces/Inventory.ts +237 -237
  224. package/src/namespaces/Itemdatabase.ts +3 -3
  225. package/src/namespaces/Law.ts +2 -2
  226. package/src/namespaces/Map.ts +204 -204
  227. package/src/namespaces/Minigame.ts +100 -100
  228. package/src/namespaces/Misc.ts +5 -5
  229. package/src/namespaces/Missiondata.ts +3 -3
  230. package/src/namespaces/Netshopping.ts +1 -1
  231. package/src/namespaces/Network.ts +2217 -2225
  232. package/src/namespaces/Object.ts +381 -381
  233. package/src/namespaces/Pad.ts +67 -67
  234. package/src/namespaces/PedStatics.ts +33 -33
  235. package/src/namespaces/Perschar.ts +105 -105
  236. package/src/namespaces/Persistence.ts +48 -48
  237. package/src/namespaces/Physics.ts +326 -326
  238. package/src/namespaces/PlayerStatics.ts +113 -113
  239. package/src/namespaces/Population.ts +133 -133
  240. package/src/namespaces/Posse.ts +80 -80
  241. package/src/namespaces/Propset.ts +1 -1
  242. package/src/namespaces/Scripts.ts +3 -3
  243. package/src/namespaces/Shapetest.ts +14 -14
  244. package/src/namespaces/Socialclub.ts +1 -1
  245. package/src/namespaces/Stats.ts +266 -266
  246. package/src/namespaces/Streaming.ts +226 -226
  247. package/src/namespaces/Task.ts +527 -527
  248. package/src/namespaces/Telemetry.ts +300 -300
  249. package/src/namespaces/Uiapps.ts +39 -39
  250. package/src/namespaces/Uistickyfeed.ts +23 -23
  251. package/src/namespaces/VehicleStatics.ts +2 -2
  252. package/src/namespaces/VolumeStatics.ts +87 -87
  253. package/src/namespaces/WeaponStatics.ts +365 -365
  254. package/src/namespaces/Zone.ts +2 -2
@@ -19,94 +19,136 @@ export class Entity implements IHandle {
19
19
  return handle === 0 ? null : new Entity(handle);
20
20
  }
21
21
 
22
+ static fromNetworkId(netId: number): Entity | null {
23
+ if (!inv<number>('0x38CE16C96BD11F2C', netId, rai())) return null;
24
+ return Entity.fromHandle(inv<number>('0x5B912C3F653822E6', netId, rai()));
25
+ }
26
+
22
27
  /**
23
- * @param targetEntity
24
28
  * @returns
25
29
  */
26
- isTouchingEntity(targetEntity: Entity): boolean {
27
- return inv<boolean>('0x9A2304A64C3C8423', this.handle, targetEntity.handle, rai());
30
+ getIsBird(): any {
31
+ return inv<number>('0xC346A546612C49A9', this.handle);
28
32
  }
29
33
 
30
- deleteCarriable(): void {
31
- inv<void>('0x0D0DB2B6AF19A987', this.handle);
34
+ /**
35
+ * Gets the entity's forward vector in YX(Z) eulers. Similar to GET_ENTITY_FORWARD_VECTOR
36
+ *
37
+ * @returns
38
+ */
39
+ getForwardVectorYx(): Vector3 {
40
+ return Vector3.fromArray(inv<number[]>('0x935A30AA88FB1014', this.handle, rav()));
32
41
  }
33
42
 
34
43
  /**
35
- * Returns a normalized value between 0.0f and 1.0f. You can get the actual anim time by multiplying this by GET_ANIM_DURATION
36
- *
37
- * @param animDict
38
- * @param animName
44
+ * @param pos
45
+ * @param xAxis
46
+ * @param yAxis
47
+ * @param zAxis
48
+ * @param clearArea
49
+ */
50
+ setCoords(pos: Vector3, xAxis: boolean, yAxis: boolean, zAxis: boolean, clearArea: boolean): void {
51
+ inv<void>('0x06843DA7060A026B', this.handle, f(pos.x), f(pos.y), f(pos.z), xAxis, yAxis, zAxis, clearArea);
52
+ }
53
+
54
+ /**
55
+ * @param boneName
39
56
  * @returns
40
57
  */
41
- getAnimCurrentTime(animDict: string | null, animName: string | null): number {
42
- return inv<number>('0x627520389E288A73', this.handle, animDict, animName, raf());
58
+ getBoneIndexByName(boneName: string | null): number {
59
+ return inv<number>('0xBACA8FE9C76C124E', this.handle, boneName, rai());
43
60
  }
44
61
 
45
62
  /**
46
- * @param entity2
47
- * @param thisFrameOnly
63
+ * @param pause
48
64
  */
49
- setNoCollisionEntity(entity2: Entity, thisFrameOnly: boolean): void {
50
- inv<void>('0xE037BF068223C38D', this.handle, entity2.handle, thisFrameOnly);
65
+ pauseTracking(pause: boolean): void {
66
+ inv<void>('0x36EB4D34D4A092C5', this.handle, pause);
51
67
  }
52
68
 
53
69
  /**
54
- * Result is in meters per second (m/s)
70
+ * @param toggle
71
+ */
72
+ setLoadCollisionFlag(toggle: boolean): void {
73
+ inv<void>('0x9B9EE31AED48072E', this.handle, toggle);
74
+ }
75
+
76
+ /**
77
+ * Changes type and quality of skins
78
+ * type hashes: https://pastebin.com/C1WvQjCy
55
79
  *
56
- * @returns
80
+ * @param type
57
81
  */
58
- getSpeed(): number {
59
- return inv<number>('0xFB6BA510A533DF81', this.handle, raf());
82
+ setCarcassType(type: string | number): void {
83
+ inv<void>('0x399657ED871B3A6C', this.handle, _h(type));
60
84
  }
61
85
 
62
86
  /**
63
- * @param bOnlyDamagedWhenRunningScript
87
+ * @param toggle
64
88
  */
65
- setCanOnlyBeDamagedByScriptParticipants(bOnlyDamagedWhenRunningScript: boolean): void {
66
- inv<void>('0xFF83AF534156B399', this.handle, bOnlyDamagedWhenRunningScript);
89
+ setHasGravity(toggle: boolean): void {
90
+ inv<void>('0x0CEDB728A1083FA7', this.handle, toggle);
67
91
  }
68
92
 
69
93
  /**
94
+ * @param relative
70
95
  * @returns
71
96
  */
72
- isTrackedVisible(): any {
73
- return inv<number>('0xC8CCDB712FBCBA92', this.handle);
97
+ getSpeedVector(relative: boolean): Vector3 {
98
+ return Vector3.fromArray(inv<number[]>('0xF2DB09816A419DC5', this.handle, relative, rav()));
74
99
  }
75
100
 
76
101
  /**
77
- * @param p1
78
- * @param collision
102
+ * @param entity2
103
+ * @param p2
104
+ * @param p3
105
+ * @returns
79
106
  */
80
- detachEntity(p1: boolean, collision: boolean): void {
81
- inv<void>('0x64CDE9D6BF8ECAD3', this.handle, p1, collision);
107
+ hasBeenDamagedByEntity(entity2: Entity, p2: boolean, p3: boolean): boolean {
108
+ return inv<boolean>('0x7B6E7BEC1143AC86', this.handle, entity2.handle, p2, p3, rai());
82
109
  }
83
110
 
84
111
  /**
85
112
  * @returns
86
113
  */
87
- isVisibleToScript(): boolean {
88
- return inv<boolean>('0xF213C724E77F321A', this.handle, rai());
114
+ isFullyLooted(): any {
115
+ return inv<number>('0x8DE41E9902E85756', this.handle);
89
116
  }
90
117
 
91
118
  /**
92
- * @param entity2
93
- * @param traceType
94
119
  * @returns
95
120
  */
96
- hasClearLosToEntity(entity2: Entity, traceType: number): boolean {
97
- return inv<boolean>('0xFCDFF7B72D23A1AC', this.handle, entity2.handle, traceType, rai());
121
+ isOccluded(): boolean {
122
+ return inv<boolean>('0x140188E884645624', this.handle, rai());
123
+ }
124
+
125
+ /**
126
+ * @param toggle
127
+ */
128
+ setCanBeDamaged(toggle: boolean): void {
129
+ inv<void>('0x0D06D522B90E861F', this.handle, toggle);
130
+ }
131
+
132
+ /**
133
+ * @param forceFlags
134
+ * @param pos
135
+ * @param offset
136
+ * @param boneIndex
137
+ * @param isDirectionRel
138
+ * @param ignoreUpVec
139
+ * @param isForceRel
140
+ * @param p12
141
+ * @param p13
142
+ */
143
+ applyForceToEntity(forceFlags: number, pos: Vector3, offset: Vector3, boneIndex: number, isDirectionRel: boolean, ignoreUpVec: boolean, isForceRel: boolean, p12: boolean, p13: boolean): void {
144
+ inv<void>('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);
98
145
  }
99
146
 
100
147
  /**
101
- * Used in Script Function GENERIC_ITEM_HAS_ANIM_COMPLETED
102
- * *GET_ENTITY**
103
- *
104
- * @param animDict
105
- * @param animClip
106
148
  * @returns
107
149
  */
108
- N_0x8E46E18AA828334F(animDict: string | null, animClip: string | null): number {
109
- return inv<number>('0x8E46E18AA828334F', this.handle, animDict, animClip, raf());
150
+ isDead(): boolean {
151
+ return inv<boolean>('0x7D5B1F88E7504BBA', this.handle, rai());
110
152
  }
111
153
 
112
154
  /**
@@ -200,7 +242,7 @@ export class Entity implements IHandle {
200
242
  /**
201
243
  * @returns argStruct
202
244
  */
203
- getScript(): [string | number, number] {
245
+ getScript(): [number, number] {
204
246
  const result = inv<[number, number]>('0x2A08A32B6D49906F', this.handle, pvi(), rai());
205
247
  return [result[0] & 0xFFFFFFFF, result[1]];
206
248
  }
@@ -280,7 +322,7 @@ export class Entity implements IHandle {
280
322
  *
281
323
  * @returns
282
324
  */
283
- getModel(): string | number {
325
+ getModel(): number {
284
326
  return (inv<number>('0xDA76A9F39210D365', this.handle, rai())) & 0xFFFFFFFF;
285
327
  }
286
328
 
@@ -301,6 +343,101 @@ export class Entity implements IHandle {
301
343
  return createFromHandle<Player>('Player', inv<number>('0xB2C30C3B4AFF718C', this.handle, team, playerPedToIgnore.handle, flags, rai()));
302
344
  }
303
345
 
346
+ /**
347
+ * Returns the LOD distance of an entity.
348
+ *
349
+ * @returns
350
+ */
351
+ getLodDist(): number {
352
+ return inv<number>('0xDF240D0C2A948683', this.handle, rai());
353
+ }
354
+
355
+ /**
356
+ * @returns
357
+ */
358
+ doesHaveDrawable(): boolean {
359
+ return inv<boolean>('0x20487F0DA9AF164A', this.handle, rai());
360
+ }
361
+
362
+ /**
363
+ * @param xyzw
364
+ */
365
+ setQuaternion(xyzw: Vector4): void {
366
+ inv<void>('0x100E7007D13E3687', this.handle, f(xyzw.x), f(xyzw.y), f(xyzw.z), f(xyzw.w));
367
+ }
368
+
369
+ /**
370
+ * @returns
371
+ */
372
+ isAttachedToAnyObject(): boolean {
373
+ return inv<boolean>('0x306C1F6178F01AB3', this.handle, rai());
374
+ }
375
+
376
+ /**
377
+ * Sets a ped or an object totally invincible. It doesn't take any kind of damage. Peds will not ragdoll on explosions.
378
+ *
379
+ * @param toggle
380
+ */
381
+ setInvincible(toggle: boolean): void {
382
+ inv<void>('0xA5C38736C426FCB8', this.handle, toggle);
383
+ }
384
+
385
+ /**
386
+ * 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.
387
+ * https://github.com/femga/rdr3_discoveries/tree/master/boneNames useSoftPinning - if set to false attached entity will not detach when fixed
388
+ * collision - controls collision between the two entities (FALSE disables collision).
389
+ * isPed - pitch doesn't work when false and roll will only work on negative numbers (only peds)
390
+ * vertexIndex - position of vertex
391
+ * fixedRot - if false it ignores entity vector
392
+ *
393
+ * @param entity2
394
+ * @param boneIndex
395
+ * @param pos
396
+ * @param rot
397
+ * @param p9
398
+ * @param useSoftPinning
399
+ * @param collision
400
+ * @param isPed
401
+ * @param vertexIndex
402
+ * @param fixedRot
403
+ * @param p15
404
+ * @param p16
405
+ */
406
+ attachToEntity(entity2: Entity, boneIndex: number, pos: Vector3, rot: Vector3, p9: boolean, useSoftPinning: boolean, collision: boolean, isPed: boolean, vertexIndex: number, fixedRot: boolean, p15: boolean, p16: boolean): void {
407
+ inv<void>('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);
408
+ }
409
+
410
+ /**
411
+ * @returns
412
+ */
413
+ getIsAnimal(): any {
414
+ return inv<number>('0x9A100F1CF4546629', this.handle);
415
+ }
416
+
417
+ /**
418
+ * p6/relative - makes the xyz force not relative to world coords, but to something else
419
+ * p7/highForce - setting false will make the force really low
420
+ *
421
+ * @param forceType
422
+ * @param pos
423
+ * @param component
424
+ * @param isDirectionRel
425
+ * @param isForceRel
426
+ * @param p8
427
+ */
428
+ applyForceToCenterOfMass(forceType: number, pos: Vector3, component: number, isDirectionRel: boolean, isForceRel: boolean, p8: boolean): void {
429
+ inv<void>('0x31DA7CEC5334DB37', this.handle, forceType, f(pos.x), f(pos.y), f(pos.z), component, isDirectionRel, isForceRel, p8);
430
+ }
431
+
432
+ /**
433
+ * Old name: _GET_ENTITY_CAN_BE_DAMAGED
434
+ *
435
+ * @returns
436
+ */
437
+ getCanBeDamaged(): any {
438
+ return inv<number>('0x75DF9E73F2F005FD', this.handle);
439
+ }
440
+
304
441
  /**
305
442
  * @param p1
306
443
  */
@@ -384,349 +521,416 @@ export class Entity implements IHandle {
384
521
  }
385
522
 
386
523
  /**
387
- * enum eCarriableState
388
- * {
389
- * CARRIABLE_STATE_NONE,
390
- * CARRIABLE_STATE_TRANSITIONING_TO_HOGTIED,
391
- * CARRIABLE_STATE_CARRIABLE_INTRO,
392
- * CARRIABLE_STATE_CARRIABLE,
393
- * CARRIABLE_STATE_BEING_PICKED_UP_FROM_GROUND,
394
- * CARRIABLE_STATE_CARRIED_BY_HUMAN,
395
- * CARRIABLE_STATE_BEING_PLACED_ON_GROUND,
396
- * CARRIABLE_STATE_CARRIED_BY_MOUNT,
397
- * CARRIABLE_STATE_BEING_PLACED_ON_MOUNT,
398
- * CARRIABLE_STATE_BEING_PICKED_UP_FROM_MOUNT,
399
- * CARRIABLE_STATE_BEING_CUT_FREE,
400
- * CARRIABLE_STATE_BEING_PLACED_ON_GROUND_ESCAPE,
401
- * CARRIABLE_STATE_BEING_PLACED_IN_VEHICLE
402
- * };
524
+ * Returns entityType: https://github.com/Halen84/RDR3-Native-Flags-And-Enums/tree/main/eEntityType
403
525
  *
404
526
  * @returns
405
527
  */
406
- getCarriableState(): number {
407
- return inv<number>('0x61914209C36EFDDB', this.handle, rai());
528
+ getType(): number {
529
+ return inv<number>('0x97F696ACA466B4E0', this.handle, rai());
408
530
  }
409
531
 
410
532
  /**
411
- * @param value
533
+ * @returns
412
534
  */
413
- setMaxHealth(value: number): void {
414
- inv<void>('0x166E7CF68597D8B5', this.handle, value);
535
+ isOwnedByPersistenceSystem(): any {
536
+ return inv<number>('0xA7E51B53309EAC97', this.handle);
415
537
  }
416
538
 
417
539
  /**
418
- * Params: p1 (probably animType) = 1, 0
419
- *
420
- * @param p1
540
+ * @param animDict
541
+ * @param animName
542
+ * @param animType
421
543
  * @returns
422
544
  */
423
- isPlayingAnyAnim(p1: number): boolean {
424
- return inv<boolean>('0x0B7CB1300CBFE19C', this.handle, p1, rai());
545
+ isPlayingAnim(animDict: string | null, animName: string | null, animType: number): boolean {
546
+ return inv<boolean>('0xDEE49D5CA6C49148', this.handle, animDict, animName, animType, rai());
425
547
  }
426
548
 
427
549
  /**
428
- * @param enabled
550
+ * Marks the specified entity (ped, vehicle or object) as no longer needed, allowing the game engine to delete it whenever it sees fit.
429
551
  */
430
- setLightsEnabled(enabled: boolean): void {
431
- inv<void>('0xEBDC12861D079ABA', this.handle, enabled);
552
+ setAsNoLongerNeeded(): void {
553
+ inv<void>('0x4971D2F8162B9674', this.handle);
432
554
  }
433
555
 
434
556
  /**
435
- * Offset values are relative to the entity. x = left/right
436
- * y = forward/backward
437
- * z = up/down
438
- *
439
- * @param offset
440
557
  * @returns
441
558
  */
442
- getOffsetFromInWorldCoords(offset: Vector3): Vector3 {
443
- return Vector3.fromArray(inv<number[]>('0x1899F328B0E12848', this.handle, f(offset.x), f(offset.y), f(offset.z), rav()));
559
+ hasBeenDamagedByAnyVehicle(): boolean {
560
+ return inv<boolean>('0x695D7C26DE65C423', this.handle, rai());
444
561
  }
445
562
 
446
563
  /**
447
- * 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
564
+ * @param animDict
565
+ * @param animName
566
+ * @param speedMultiplier
567
+ */
568
+ setAnimSpeed(animDict: string | null, animName: string | null, speedMultiplier: number): void {
569
+ inv<void>('0xEAA885BA3CEA4E4A', this.handle, animDict, animName, f(speedMultiplier));
570
+ }
571
+
572
+ unpinMapEntity(): void {
573
+ inv<void>('0xD2B9C78537ED5759', this.handle);
574
+ }
575
+
576
+ /**
577
+ * Get how much of the entity is submerged. 1.0f is whole entity.
448
578
  *
449
- * @param entity2
450
- * @param xSize
451
- * @param ySize
452
- * @param zSize
453
- * @param p5
454
- * @param p6
455
- * @param p7
456
579
  * @returns
457
580
  */
458
- isAtEntity(entity2: Entity, xSize: number, ySize: number, zSize: number, p5: boolean, p6: boolean, p7: number): boolean {
459
- return inv<boolean>('0xC057F02B837A27F6', this.handle, entity2.handle, f(xSize), f(ySize), f(zSize), p5, p6, p7, rai());
581
+ getSubmergedLevel(): number {
582
+ return inv<number>('0x4A77C3F73FD9E831', this.handle, raf());
460
583
  }
461
584
 
462
585
  /**
463
- * @param toggle
586
+ * @returns
464
587
  */
465
- setVisible(toggle: boolean): void {
466
- inv<void>('0x1794B4FCC84D812F', this.handle, toggle);
588
+ isAttached(): boolean {
589
+ return inv<boolean>('0xEE6AD63ABF59C0B7', this.handle, rai());
467
590
  }
468
591
 
469
592
  /**
470
- * Old name: _SET_ENTITY_CLEANUP_BY_ENGINE
593
+ * SET_ENTITY_A*
471
594
  *
472
- * @param toggle
595
+ * @param p1
473
596
  */
474
- setShouldFreezeWaitingOnCollision(toggle: boolean): void {
475
- inv<void>('0x740CB4F3F602C9F4', this.handle, toggle);
597
+ N_0xC0EDEF16D90661EE(p1: number): void {
598
+ inv<void>('0xC0EDEF16D90661EE', this.handle, f(p1));
599
+ }
600
+
601
+ /**
602
+ * @param looted
603
+ */
604
+ setFullyLooted(looted: boolean): void {
605
+ inv<void>('0x6BCF5F3D8FFE988D', this.handle, looted);
476
606
  }
477
607
 
478
608
  /**
479
- * Note: this native was removed in 1232 but added back in 1311
480
- * Old name: _GET_ENTITY_PROOFS
481
- *
482
609
  * @returns
483
610
  */
484
- getProofs(): number {
485
- return inv<number>('0x6CF0DAD7FA1088EA', this.handle, rai());
611
+ isAttachedToAnyVehicle(): boolean {
612
+ return inv<boolean>('0x12DF6E0D2E736749', this.handle, rai());
486
613
  }
487
614
 
488
615
  /**
489
- * skin - everything alpha except skin
490
- * Set entity alpha level. Ranging from 0 to 255 but changes occur after every 20 percent (after every 51).
491
- *
492
- * @param alphaLevel
493
- * @param skin
616
+ * @param p1
494
617
  */
495
- setAlpha(alphaLevel: number, skin: boolean): void {
496
- inv<void>('0x0DF7692B1D9E7BA7', this.handle, alphaLevel, skin);
618
+ N_0xA48E4801DEBDF7E4(p1: boolean): void {
619
+ inv<void>('0xA48E4801DEBDF7E4', this.handle, p1);
497
620
  }
498
621
 
499
622
  /**
500
- * @returns
623
+ * @param toggle
624
+ * @param keepPhysics
501
625
  */
502
- getThreatTier(): number {
503
- return inv<number>('0xE12F56CB25D9CE23', this.handle, rai());
626
+ setCompletelyDisableCollision(toggle: boolean, keepPhysics: boolean): void {
627
+ inv<void>('0xE0580EC84813875A', this.handle, toggle, keepPhysics);
628
+ }
629
+
630
+ /**
631
+ * @param p1
632
+ */
633
+ N_0xCDB682BB47C02F0A(p1: string | number): void {
634
+ inv<void>('0xCDB682BB47C02F0A', this.handle, _h(p1));
504
635
  }
505
636
 
506
637
  /**
638
+ * @param volume
639
+ * @param p2
640
+ * @param p3
507
641
  * @returns
508
642
  */
509
- isUpsidedown(): boolean {
510
- return inv<boolean>('0x109DE3DA41AAD94A', this.handle, rai());
643
+ isInVolume(volume: number, p2: boolean, p3: number): boolean {
644
+ return inv<boolean>('0x5A5526BC09C06623', this.handle, volume, p2, p3, rai());
645
+ }
646
+
647
+ /**
648
+ * @returns rightVector; forwardVector; upVector; position
649
+ */
650
+ getMatrix(): [Vector3, Vector3, Vector3, Vector3] {
651
+ const result = inv<[number[], number[], number[], number[]]>('0x3A9B1120AF13FBF2', this.handle, pvv(), pvv(), pvv(), pvv());
652
+ return [Vector3.fromArray(result[0]), Vector3.fromArray(result[1]), Vector3.fromArray(result[2]), Vector3.fromArray(result[3])];
653
+ }
654
+
655
+ /**
656
+ * Called if entity is in water and submerged level is larger than 1f. If CARRYING_FLAG_FORCE_ALLOW_WARP_TO_SAFE_GROUND_LOCATION is true, it gets disabled as well.
657
+ */
658
+ N_0x371D179701D9C082(): void {
659
+ inv<void>('0x371D179701D9C082', this.handle);
511
660
  }
512
661
 
513
662
  /**
514
663
  * @param p1
515
664
  * @returns
516
665
  */
517
- doesBelongToThisScript(p1: boolean): boolean {
518
- return inv<boolean>('0x622B1980CBE13332', this.handle, p1, rai());
666
+ getMaxHealth(p1: boolean): number {
667
+ return inv<number>('0x15D757606D170C3C', this.handle, p1, rai());
519
668
  }
520
669
 
521
670
  /**
522
- * Returns a hash of an entity's name. (Alternative Name: _GET_ENTITY_PROMPT_NAME_HASH)
671
+ * @param animDict
672
+ * @param animName
673
+ * @param time
674
+ */
675
+ setAnimCurrentTime(animDict: string | null, animName: string | null, time: number): void {
676
+ inv<void>('0x11CDABDC7783B2BC', this.handle, animDict, animName, f(time));
677
+ }
678
+
679
+ /**
680
+ * Gets the current coordinates for a specified entity.
681
+ * `entity` = The entity to get the coordinates from.
682
+ * `alive` = Unused by the game, potentially used by debug builds in order to assert whether or not an entity was alive. If entity is a ped and it's in a vehicle or on a mount the coords of that entity are returned. Set 'realCoords' to true when you need the true ped coords.
523
683
  *
684
+ * @param alive
685
+ * @param realCoords
524
686
  * @returns
525
687
  */
526
- getCarriableFromEntity(): string | number {
527
- return (inv<number>('0x31FEF6A20F00B963', this.handle, rai())) & 0xFFFFFFFF;
688
+ getCoords(alive: boolean, realCoords: boolean): Vector3 {
689
+ return Vector3.fromArray(inv<number[]>('0xA86D5F069399F44D', this.handle, alive, realCoords, rav()));
690
+ }
691
+
692
+ /**
693
+ * @returns
694
+ */
695
+ isAnObject(): boolean {
696
+ return inv<boolean>('0x0A27A546A375FDEF', this.handle, rai());
697
+ }
698
+
699
+ /**
700
+ * 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).
701
+ *
702
+ * @param value
703
+ */
704
+ setLodDist(value: number): void {
705
+ inv<void>('0x5FB407F0A7C877BF', this.handle, value);
528
706
  }
529
707
 
530
708
  /**
531
709
  * @param toggle
532
- * @param keepPhysics
533
710
  */
534
- setCollision(toggle: boolean, keepPhysics: boolean): void {
535
- inv<void>('0xF66F820909453B8C', this.handle, toggle, keepPhysics);
711
+ setDynamic(toggle: boolean): void {
712
+ inv<void>('0xFBFC4473F66CE344', this.handle, toggle);
536
713
  }
537
714
 
538
715
  /**
539
- * @param p1
540
- * @returns
716
+ * @param radius
541
717
  */
542
- placeOnGroundProperly(p1: boolean): any {
543
- return inv<number>('0x9587913B9E772D29', this.handle, p1);
718
+ setCustomPickupRadius(radius: number): void {
719
+ inv<void>('0x482D17E45665DA44', this.handle, f(radius));
544
720
  }
545
721
 
546
722
  /**
547
723
  * @returns
548
724
  */
549
- isInWater(): boolean {
550
- return inv<boolean>('0xDDE5C125AC446723', this.handle, rai());
725
+ getPopulationType(): number {
726
+ return inv<number>('0xADE28862B6D7B85B', this.handle, rai());
551
727
  }
552
728
 
553
729
  /**
554
- * @returns Returns `true` if the entity exists
730
+ * @returns
555
731
  */
556
- doesExist(): boolean {
557
- return inv<boolean>('0xD42BD6EB2E0F1677', this.handle, rai());
732
+ isAVehicle(): boolean {
733
+ return inv<boolean>('0xC3D96AF45FCCEC4C', this.handle, rai());
558
734
  }
559
735
 
560
736
  /**
737
+ * @param pos
738
+ * @param atTop
739
+ * @param inWorldCoords
561
740
  * @returns
562
741
  */
563
- getAlpha(): number {
564
- return inv<number>('0x1BB501624FAF2BEA', this.handle, rai());
742
+ getHeight(pos: Vector3, atTop: boolean, inWorldCoords: boolean): number {
743
+ return inv<number>('0x296DEBC84474B375', this.handle, f(pos.x), f(pos.y), f(pos.z), atTop, inWorldCoords, raf());
565
744
  }
566
745
 
567
746
  /**
568
- * This native only works on `Ped` and `Object` entity types
569
- *
570
- * @param flagId Refer to [enum: eCarryingFlags]
747
+ * @param pos
571
748
  * @returns
572
749
  */
573
- getCarryingFlag(flagId: eCarryingFlags): number {
574
- return inv<number>('0x808077647856DE62', this.handle, flagId, rai());
750
+ getOffsetFromGivenWorldCoords(pos: Vector3): Vector3 {
751
+ return Vector3.fromArray(inv<number[]>('0x497C6B1A2C9AE69C', this.handle, f(pos.x), f(pos.y), f(pos.z), rav()));
752
+ }
753
+
754
+ addTrackingTrails(): void {
755
+ inv<void>('0x1AD922AB5038DEF3', this.handle);
575
756
  }
576
757
 
577
758
  /**
578
- * @param p1
759
+ * @param toggle
579
760
  */
580
- forceAiAndAnimationUpdate(p1: boolean): void {
581
- inv<void>('0x4C9E96473D4F1A88', this.handle, p1);
761
+ setCanClimbOnEntity(toggle: boolean): void {
762
+ inv<void>('0x24AED2A608F93C4C', this.handle, toggle);
582
763
  }
583
764
 
584
765
  /**
585
- * Axis - Invert Axis Flags
586
- *
587
- * @param pos
588
- * @param xAxis
589
- * @param yAxis
590
- * @param zAxis
766
+ * @returns minimum; maximum
591
767
  */
592
- setCoordsNoOffset(pos: Vector3, xAxis: boolean, yAxis: boolean, zAxis: boolean): void {
593
- inv<void>('0x239A3351AC1DA385', this.handle, f(pos.x), f(pos.y), f(pos.z), xAxis, yAxis, zAxis);
768
+ getWorldPositionOfDimensions(): [Vector3, Vector3] {
769
+ const result = inv<[number[], number[]]>('0xF3FDA9A617A15145', this.handle, pvv(), pvv());
770
+ return [Vector3.fromArray(result[0]), Vector3.fromArray(result[1])];
594
771
  }
595
772
 
596
773
  /**
597
- * Returns (CUR_HEALTH / MAX_HEALTH)
598
- *
774
+ * @param p1
599
775
  * @returns
600
776
  */
601
- getHealthFloat(): number {
602
- return inv<number>('0x96C638784DB4C815', this.handle, raf());
777
+ isUnderwater(p1: boolean): any {
778
+ return inv<number>('0xD4E5C1E93C466127', this.handle, p1);
603
779
  }
604
780
 
605
781
  /**
782
+ * @param animation
783
+ * @param animGroup
784
+ * @param p3
606
785
  * @returns
607
786
  */
608
- getIsBird(): any {
609
- return inv<number>('0xC346A546612C49A9', this.handle);
787
+ stopAnim(animation: string | null, animGroup: string | null, p3: number): any {
788
+ return inv<number>('0x786591D986DE9159', this.handle, animation, animGroup, f(p3));
610
789
  }
611
790
 
612
791
  /**
613
- * Gets the entity's forward vector in YX(Z) eulers. Similar to GET_ENTITY_FORWARD_VECTOR
614
- *
615
792
  * @returns
616
793
  */
617
- getForwardVectorYx(): Vector3 {
618
- return Vector3.fromArray(inv<number[]>('0x935A30AA88FB1014', this.handle, rav()));
794
+ hasCollidedWithAnything(): boolean {
795
+ return inv<boolean>('0xDF18751EC74F90FF', this.handle, rai());
619
796
  }
620
797
 
621
798
  /**
622
- * @param pos
623
- * @param xAxis
624
- * @param yAxis
625
- * @param zAxis
626
- * @param clearArea
799
+ * Simply returns whatever is passed to it (Regardless of whether the handle is valid or not).
800
+ *
801
+ * @returns
627
802
  */
628
- setCoords(pos: Vector3, xAxis: boolean, yAxis: boolean, zAxis: boolean, clearArea: boolean): void {
629
- inv<void>('0x06843DA7060A026B', this.handle, f(pos.x), f(pos.y), f(pos.z), xAxis, yAxis, zAxis, clearArea);
803
+ getVehicleIndexFromIndex(): Vehicle | null {
804
+ return createFromHandle<Vehicle>('Vehicle', inv<number>('0xDF1E5AAC561AFC59', this.handle, rai()));
630
805
  }
631
806
 
632
807
  /**
633
- * @param boneName
634
808
  * @returns
635
809
  */
636
- getBoneIndexByName(boneName: string | null): number {
637
- return inv<number>('0xBACA8FE9C76C124E', this.handle, boneName, rai());
810
+ isVisible(): boolean {
811
+ return inv<boolean>('0xFFC96ECB7FA404CA', this.handle, rai());
638
812
  }
639
813
 
640
814
  /**
641
- * @param pause
815
+ * SET_ENTITY_LO*
816
+ *
817
+ * @param toggle
642
818
  */
643
- pauseTracking(pause: boolean): void {
644
- inv<void>('0x36EB4D34D4A092C5', this.handle, pause);
819
+ N_0xFF9965C47FA404DA(toggle: boolean): void {
820
+ inv<void>('0xFF9965C47FA404DA', this.handle, toggle);
645
821
  }
646
822
 
647
823
  /**
648
- * @param toggle
824
+ * Valid indices: 0 - 3
825
+ * Index 1 always returns a `hogtied` config, doesn't matter the entity.
826
+ * It's for humans only and the ped must be resurrected first if it's dead.
827
+ *
828
+ * @param index
829
+ * @returns
649
830
  */
650
- setLoadCollisionFlag(toggle: boolean): void {
651
- inv<void>('0x9B9EE31AED48072E', this.handle, toggle);
831
+ getOptimalCarryConfig(index: number): number {
832
+ return (inv<number>('0x34F008A7E48C496B', this.handle, index, rai())) & 0xFFFFFFFF;
833
+ }
834
+
835
+ setFadeIn(): void {
836
+ inv<void>('0xA91E6CF94404E8C9', this.handle);
652
837
  }
653
838
 
654
839
  /**
655
- * Changes type and quality of skins
656
- * type hashes: https://pastebin.com/C1WvQjCy
840
+ * @returns
841
+ */
842
+ hasBeenDamagedByAnyPed(): boolean {
843
+ return inv<boolean>('0x9934E9C42D52D87E', this.handle, rai());
844
+ }
845
+
846
+ /**
847
+ * @param targetEntity
848
+ * @returns
849
+ */
850
+ isTouchingEntity(targetEntity: Entity): boolean {
851
+ return inv<boolean>('0x9A2304A64C3C8423', this.handle, targetEntity.handle, rai());
852
+ }
853
+
854
+ deleteCarriable(): void {
855
+ inv<void>('0x0D0DB2B6AF19A987', this.handle);
856
+ }
857
+
858
+ /**
859
+ * Returns a normalized value between 0.0f and 1.0f. You can get the actual anim time by multiplying this by GET_ANIM_DURATION
657
860
  *
658
- * @param type
861
+ * @param animDict
862
+ * @param animName
863
+ * @returns
659
864
  */
660
- setCarcassType(type: string | number): void {
661
- inv<void>('0x399657ED871B3A6C', this.handle, _h(type));
865
+ getAnimCurrentTime(animDict: string | null, animName: string | null): number {
866
+ return inv<number>('0x627520389E288A73', this.handle, animDict, animName, raf());
662
867
  }
663
868
 
664
869
  /**
665
- * @param toggle
870
+ * @param entity2
871
+ * @param thisFrameOnly
666
872
  */
667
- setHasGravity(toggle: boolean): void {
668
- inv<void>('0x0CEDB728A1083FA7', this.handle, toggle);
873
+ setNoCollisionEntity(entity2: Entity, thisFrameOnly: boolean): void {
874
+ inv<void>('0xE037BF068223C38D', this.handle, entity2.handle, thisFrameOnly);
669
875
  }
670
876
 
671
877
  /**
672
- * @param relative
878
+ * Result is in meters per second (m/s)
879
+ *
673
880
  * @returns
674
881
  */
675
- getSpeedVector(relative: boolean): Vector3 {
676
- return Vector3.fromArray(inv<number[]>('0xF2DB09816A419DC5', this.handle, relative, rav()));
882
+ getSpeed(): number {
883
+ return inv<number>('0xFB6BA510A533DF81', this.handle, raf());
677
884
  }
678
885
 
679
886
  /**
680
- * @param entity2
681
- * @param p2
682
- * @param p3
683
- * @returns
887
+ * @param bOnlyDamagedWhenRunningScript
684
888
  */
685
- hasBeenDamagedByEntity(entity2: Entity, p2: boolean, p3: boolean): boolean {
686
- return inv<boolean>('0x7B6E7BEC1143AC86', this.handle, entity2.handle, p2, p3, rai());
889
+ setCanOnlyBeDamagedByScriptParticipants(bOnlyDamagedWhenRunningScript: boolean): void {
890
+ inv<void>('0xFF83AF534156B399', this.handle, bOnlyDamagedWhenRunningScript);
687
891
  }
688
892
 
689
893
  /**
690
894
  * @returns
691
895
  */
692
- isFullyLooted(): any {
693
- return inv<number>('0x8DE41E9902E85756', this.handle);
896
+ isTrackedVisible(): any {
897
+ return inv<number>('0xC8CCDB712FBCBA92', this.handle);
694
898
  }
695
899
 
696
900
  /**
697
- * @returns
901
+ * @param p1
902
+ * @param collision
698
903
  */
699
- isOccluded(): boolean {
700
- return inv<boolean>('0x140188E884645624', this.handle, rai());
904
+ detachEntity(p1: boolean, collision: boolean): void {
905
+ inv<void>('0x64CDE9D6BF8ECAD3', this.handle, p1, collision);
701
906
  }
702
907
 
703
908
  /**
704
- * @param toggle
909
+ * @returns
705
910
  */
706
- setCanBeDamaged(toggle: boolean): void {
707
- inv<void>('0x0D06D522B90E861F', this.handle, toggle);
911
+ isVisibleToScript(): boolean {
912
+ return inv<boolean>('0xF213C724E77F321A', this.handle, rai());
708
913
  }
709
914
 
710
915
  /**
711
- * @param forceFlags
712
- * @param pos
713
- * @param offset
714
- * @param boneIndex
715
- * @param isDirectionRel
716
- * @param ignoreUpVec
717
- * @param isForceRel
718
- * @param p12
719
- * @param p13
916
+ * @param entity2
917
+ * @param traceType
918
+ * @returns
720
919
  */
721
- applyForceToEntity(forceFlags: number, pos: Vector3, offset: Vector3, boneIndex: number, isDirectionRel: boolean, ignoreUpVec: boolean, isForceRel: boolean, p12: boolean, p13: boolean): void {
722
- inv<void>('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);
920
+ hasClearLosToEntity(entity2: Entity, traceType: number): boolean {
921
+ return inv<boolean>('0xFCDFF7B72D23A1AC', this.handle, entity2.handle, traceType, rai());
723
922
  }
724
923
 
725
924
  /**
925
+ * Used in Script Function GENERIC_ITEM_HAS_ANIM_COMPLETED
926
+ * *GET_ENTITY**
927
+ *
928
+ * @param animDict
929
+ * @param animClip
726
930
  * @returns
727
931
  */
728
- isDead(): boolean {
729
- return inv<boolean>('0x7D5B1F88E7504BBA', this.handle, rai());
932
+ N_0x8E46E18AA828334F(animDict: string | null, animClip: string | null): number {
933
+ return inv<number>('0x8E46E18AA828334F', this.handle, animDict, animClip, raf());
730
934
  }
731
935
 
732
936
  /**
@@ -820,7 +1024,7 @@ export class Entity implements IHandle {
820
1024
  *
821
1025
  * @returns
822
1026
  */
823
- getCarryConfig(): string | number {
1027
+ getCarryConfig(): number {
824
1028
  return (inv<number>('0x0FD25587BB306C86', this.handle, rai())) & 0xFFFFFFFF;
825
1029
  }
826
1030
 
@@ -843,101 +1047,6 @@ export class Entity implements IHandle {
843
1047
  return inv<number>('0xC230DD956E2F5507', this.handle, raf());
844
1048
  }
845
1049
 
846
- /**
847
- * Returns the LOD distance of an entity.
848
- *
849
- * @returns
850
- */
851
- getLodDist(): number {
852
- return inv<number>('0xDF240D0C2A948683', this.handle, rai());
853
- }
854
-
855
- /**
856
- * @returns
857
- */
858
- doesHaveDrawable(): boolean {
859
- return inv<boolean>('0x20487F0DA9AF164A', this.handle, rai());
860
- }
861
-
862
- /**
863
- * @param xyzw
864
- */
865
- setQuaternion(xyzw: Vector4): void {
866
- inv<void>('0x100E7007D13E3687', this.handle, f(xyzw.x), f(xyzw.y), f(xyzw.z), f(xyzw.w));
867
- }
868
-
869
- /**
870
- * @returns
871
- */
872
- isAttachedToAnyObject(): boolean {
873
- return inv<boolean>('0x306C1F6178F01AB3', this.handle, rai());
874
- }
875
-
876
- /**
877
- * Sets a ped or an object totally invincible. It doesn't take any kind of damage. Peds will not ragdoll on explosions.
878
- *
879
- * @param toggle
880
- */
881
- setInvincible(toggle: boolean): void {
882
- inv<void>('0xA5C38736C426FCB8', this.handle, toggle);
883
- }
884
-
885
- /**
886
- * 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.
887
- * https://github.com/femga/rdr3_discoveries/tree/master/boneNames useSoftPinning - if set to false attached entity will not detach when fixed
888
- * collision - controls collision between the two entities (FALSE disables collision).
889
- * isPed - pitch doesn't work when false and roll will only work on negative numbers (only peds)
890
- * vertexIndex - position of vertex
891
- * fixedRot - if false it ignores entity vector
892
- *
893
- * @param entity2
894
- * @param boneIndex
895
- * @param pos
896
- * @param rot
897
- * @param p9
898
- * @param useSoftPinning
899
- * @param collision
900
- * @param isPed
901
- * @param vertexIndex
902
- * @param fixedRot
903
- * @param p15
904
- * @param p16
905
- */
906
- attachToEntity(entity2: Entity, boneIndex: number, pos: Vector3, rot: Vector3, p9: boolean, useSoftPinning: boolean, collision: boolean, isPed: boolean, vertexIndex: number, fixedRot: boolean, p15: boolean, p16: boolean): void {
907
- inv<void>('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);
908
- }
909
-
910
- /**
911
- * @returns
912
- */
913
- getIsAnimal(): any {
914
- return inv<number>('0x9A100F1CF4546629', this.handle);
915
- }
916
-
917
- /**
918
- * p6/relative - makes the xyz force not relative to world coords, but to something else
919
- * p7/highForce - setting false will make the force really low
920
- *
921
- * @param forceType
922
- * @param pos
923
- * @param component
924
- * @param isDirectionRel
925
- * @param isForceRel
926
- * @param p8
927
- */
928
- applyForceToCenterOfMass(forceType: number, pos: Vector3, component: number, isDirectionRel: boolean, isForceRel: boolean, p8: boolean): void {
929
- inv<void>('0x31DA7CEC5334DB37', this.handle, forceType, f(pos.x), f(pos.y), f(pos.z), component, isDirectionRel, isForceRel, p8);
930
- }
931
-
932
- /**
933
- * Old name: _GET_ENTITY_CAN_BE_DAMAGED
934
- *
935
- * @returns
936
- */
937
- getCanBeDamaged(): any {
938
- return inv<number>('0x75DF9E73F2F005FD', this.handle);
939
- }
940
-
941
1050
  /**
942
1051
  * Seems to return true if entity is burned / scorched
943
1052
  * *GET_ENTITY**
@@ -1125,183 +1234,127 @@ export class Entity implements IHandle {
1125
1234
  * @returns
1126
1235
  */
1127
1236
  getIsPredator(): any {
1128
- return inv<number>('0x5594AFE9DE0C01B7', this.handle);
1129
- }
1130
-
1131
- /**
1132
- * Returns entityType: https://github.com/Halen84/RDR3-Native-Flags-And-Enums/tree/main/eEntityType
1133
- *
1134
- * @returns
1135
- */
1136
- getType(): number {
1137
- return inv<number>('0x97F696ACA466B4E0', this.handle, rai());
1138
- }
1139
-
1140
- /**
1141
- * @returns
1142
- */
1143
- isOwnedByPersistenceSystem(): any {
1144
- return inv<number>('0xA7E51B53309EAC97', this.handle);
1145
- }
1146
-
1147
- /**
1148
- * @param animDict
1149
- * @param animName
1150
- * @param animType
1151
- * @returns
1152
- */
1153
- isPlayingAnim(animDict: string | null, animName: string | null, animType: number): boolean {
1154
- return inv<boolean>('0xDEE49D5CA6C49148', this.handle, animDict, animName, animType, rai());
1155
- }
1156
-
1157
- /**
1158
- * Marks the specified entity (ped, vehicle or object) as no longer needed, allowing the game engine to delete it whenever it sees fit.
1159
- */
1160
- setAsNoLongerNeeded(): void {
1161
- inv<void>('0x4971D2F8162B9674', this.handle);
1162
- }
1163
-
1164
- /**
1165
- * @returns
1166
- */
1167
- hasBeenDamagedByAnyVehicle(): boolean {
1168
- return inv<boolean>('0x695D7C26DE65C423', this.handle, rai());
1169
- }
1170
-
1171
- /**
1172
- * @param animDict
1173
- * @param animName
1174
- * @param speedMultiplier
1175
- */
1176
- setAnimSpeed(animDict: string | null, animName: string | null, speedMultiplier: number): void {
1177
- inv<void>('0xEAA885BA3CEA4E4A', this.handle, animDict, animName, f(speedMultiplier));
1178
- }
1179
-
1180
- unpinMapEntity(): void {
1181
- inv<void>('0xD2B9C78537ED5759', this.handle);
1182
- }
1183
-
1184
- /**
1185
- * Get how much of the entity is submerged. 1.0f is whole entity.
1186
- *
1187
- * @returns
1188
- */
1189
- getSubmergedLevel(): number {
1190
- return inv<number>('0x4A77C3F73FD9E831', this.handle, raf());
1191
- }
1192
-
1193
- /**
1194
- * @returns
1195
- */
1196
- isAttached(): boolean {
1197
- return inv<boolean>('0xEE6AD63ABF59C0B7', this.handle, rai());
1198
- }
1199
-
1200
- /**
1201
- * SET_ENTITY_A*
1202
- *
1203
- * @param p1
1204
- */
1205
- N_0xC0EDEF16D90661EE(p1: number): void {
1206
- inv<void>('0xC0EDEF16D90661EE', this.handle, f(p1));
1207
- }
1208
-
1209
- /**
1210
- * @param looted
1211
- */
1212
- setFullyLooted(looted: boolean): void {
1213
- inv<void>('0x6BCF5F3D8FFE988D', this.handle, looted);
1237
+ return inv<number>('0x5594AFE9DE0C01B7', this.handle);
1214
1238
  }
1215
1239
 
1216
1240
  /**
1241
+ * enum eCarriableState
1242
+ * {
1243
+ * CARRIABLE_STATE_NONE,
1244
+ * CARRIABLE_STATE_TRANSITIONING_TO_HOGTIED,
1245
+ * CARRIABLE_STATE_CARRIABLE_INTRO,
1246
+ * CARRIABLE_STATE_CARRIABLE,
1247
+ * CARRIABLE_STATE_BEING_PICKED_UP_FROM_GROUND,
1248
+ * CARRIABLE_STATE_CARRIED_BY_HUMAN,
1249
+ * CARRIABLE_STATE_BEING_PLACED_ON_GROUND,
1250
+ * CARRIABLE_STATE_CARRIED_BY_MOUNT,
1251
+ * CARRIABLE_STATE_BEING_PLACED_ON_MOUNT,
1252
+ * CARRIABLE_STATE_BEING_PICKED_UP_FROM_MOUNT,
1253
+ * CARRIABLE_STATE_BEING_CUT_FREE,
1254
+ * CARRIABLE_STATE_BEING_PLACED_ON_GROUND_ESCAPE,
1255
+ * CARRIABLE_STATE_BEING_PLACED_IN_VEHICLE
1256
+ * };
1257
+ *
1217
1258
  * @returns
1218
1259
  */
1219
- isAttachedToAnyVehicle(): boolean {
1220
- return inv<boolean>('0x12DF6E0D2E736749', this.handle, rai());
1260
+ getCarriableState(): number {
1261
+ return inv<number>('0x61914209C36EFDDB', this.handle, rai());
1221
1262
  }
1222
1263
 
1223
1264
  /**
1224
- * @param p1
1265
+ * @param value
1225
1266
  */
1226
- N_0xA48E4801DEBDF7E4(p1: boolean): void {
1227
- inv<void>('0xA48E4801DEBDF7E4', this.handle, p1);
1267
+ setMaxHealth(value: number): void {
1268
+ inv<void>('0x166E7CF68597D8B5', this.handle, value);
1228
1269
  }
1229
1270
 
1230
1271
  /**
1231
- * @param toggle
1232
- * @param keepPhysics
1272
+ * Params: p1 (probably animType) = 1, 0
1273
+ *
1274
+ * @param p1
1275
+ * @returns
1233
1276
  */
1234
- setCompletelyDisableCollision(toggle: boolean, keepPhysics: boolean): void {
1235
- inv<void>('0xE0580EC84813875A', this.handle, toggle, keepPhysics);
1277
+ isPlayingAnyAnim(p1: number): boolean {
1278
+ return inv<boolean>('0x0B7CB1300CBFE19C', this.handle, p1, rai());
1236
1279
  }
1237
1280
 
1238
1281
  /**
1239
- * @param p1
1282
+ * @param enabled
1240
1283
  */
1241
- N_0xCDB682BB47C02F0A(p1: string | number): void {
1242
- inv<void>('0xCDB682BB47C02F0A', this.handle, _h(p1));
1284
+ setLightsEnabled(enabled: boolean): void {
1285
+ inv<void>('0xEBDC12861D079ABA', this.handle, enabled);
1243
1286
  }
1244
1287
 
1245
1288
  /**
1246
- * @param volume
1247
- * @param p2
1248
- * @param p3
1289
+ * Offset values are relative to the entity. x = left/right
1290
+ * y = forward/backward
1291
+ * z = up/down
1292
+ *
1293
+ * @param offset
1249
1294
  * @returns
1250
1295
  */
1251
- isInVolume(volume: number, p2: boolean, p3: number): boolean {
1252
- return inv<boolean>('0x5A5526BC09C06623', this.handle, volume, p2, p3, rai());
1296
+ getOffsetFromInWorldCoords(offset: Vector3): Vector3 {
1297
+ return Vector3.fromArray(inv<number[]>('0x1899F328B0E12848', this.handle, f(offset.x), f(offset.y), f(offset.z), rav()));
1253
1298
  }
1254
1299
 
1255
1300
  /**
1256
- * @returns rightVector; forwardVector; upVector; position
1301
+ * 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
1302
+ *
1303
+ * @param entity2
1304
+ * @param xSize
1305
+ * @param ySize
1306
+ * @param zSize
1307
+ * @param p5
1308
+ * @param p6
1309
+ * @param p7
1310
+ * @returns
1257
1311
  */
1258
- getMatrix(): [Vector3, Vector3, Vector3, Vector3] {
1259
- const result = inv<[number[], number[], number[], number[]]>('0x3A9B1120AF13FBF2', this.handle, pvv(), pvv(), pvv(), pvv());
1260
- return [Vector3.fromArray(result[0]), Vector3.fromArray(result[1]), Vector3.fromArray(result[2]), Vector3.fromArray(result[3])];
1312
+ isAtEntity(entity2: Entity, xSize: number, ySize: number, zSize: number, p5: boolean, p6: boolean, p7: number): boolean {
1313
+ return inv<boolean>('0xC057F02B837A27F6', this.handle, entity2.handle, f(xSize), f(ySize), f(zSize), p5, p6, p7, rai());
1261
1314
  }
1262
1315
 
1263
1316
  /**
1264
- * Called if entity is in water and submerged level is larger than 1f. If CARRYING_FLAG_FORCE_ALLOW_WARP_TO_SAFE_GROUND_LOCATION is true, it gets disabled as well.
1317
+ * @param toggle
1265
1318
  */
1266
- N_0x371D179701D9C082(): void {
1267
- inv<void>('0x371D179701D9C082', this.handle);
1319
+ setVisible(toggle: boolean): void {
1320
+ inv<void>('0x1794B4FCC84D812F', this.handle, toggle);
1268
1321
  }
1269
1322
 
1270
1323
  /**
1271
- * @param p1
1272
- * @returns
1324
+ * Old name: _SET_ENTITY_CLEANUP_BY_ENGINE
1325
+ *
1326
+ * @param toggle
1273
1327
  */
1274
- getMaxHealth(p1: boolean): number {
1275
- return inv<number>('0x15D757606D170C3C', this.handle, p1, rai());
1328
+ setShouldFreezeWaitingOnCollision(toggle: boolean): void {
1329
+ inv<void>('0x740CB4F3F602C9F4', this.handle, toggle);
1276
1330
  }
1277
1331
 
1278
1332
  /**
1279
- * @param animDict
1280
- * @param animName
1281
- * @param time
1333
+ * Note: this native was removed in 1232 but added back in 1311
1334
+ * Old name: _GET_ENTITY_PROOFS
1335
+ *
1336
+ * @returns
1282
1337
  */
1283
- setAnimCurrentTime(animDict: string | null, animName: string | null, time: number): void {
1284
- inv<void>('0x11CDABDC7783B2BC', this.handle, animDict, animName, f(time));
1338
+ getProofs(): number {
1339
+ return inv<number>('0x6CF0DAD7FA1088EA', this.handle, rai());
1285
1340
  }
1286
1341
 
1287
1342
  /**
1288
- * Gets the current coordinates for a specified entity.
1289
- * `entity` = The entity to get the coordinates from.
1290
- * `alive` = Unused by the game, potentially used by debug builds in order to assert whether or not an entity was alive. If entity is a ped and it's in a vehicle or on a mount the coords of that entity are returned. Set 'realCoords' to true when you need the true ped coords.
1343
+ * skin - everything alpha except skin
1344
+ * Set entity alpha level. Ranging from 0 to 255 but changes occur after every 20 percent (after every 51).
1291
1345
  *
1292
- * @param alive
1293
- * @param realCoords
1294
- * @returns
1346
+ * @param alphaLevel
1347
+ * @param skin
1295
1348
  */
1296
- getCoords(alive: boolean, realCoords: boolean): Vector3 {
1297
- return Vector3.fromArray(inv<number[]>('0xA86D5F069399F44D', this.handle, alive, realCoords, rav()));
1349
+ setAlpha(alphaLevel: number, skin: boolean): void {
1350
+ inv<void>('0x0DF7692B1D9E7BA7', this.handle, alphaLevel, skin);
1298
1351
  }
1299
1352
 
1300
1353
  /**
1301
1354
  * @returns
1302
1355
  */
1303
- isAnObject(): boolean {
1304
- return inv<boolean>('0x0A27A546A375FDEF', this.handle, rai());
1356
+ getThreatTier(): number {
1357
+ return inv<number>('0xE12F56CB25D9CE23', this.handle, rai());
1305
1358
  }
1306
1359
 
1307
1360
  /**
@@ -1396,102 +1449,102 @@ export class Entity implements IHandle {
1396
1449
  }
1397
1450
 
1398
1451
  /**
1399
- * 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).
1400
- *
1401
- * @param value
1452
+ * @returns
1402
1453
  */
1403
- setLodDist(value: number): void {
1404
- inv<void>('0x5FB407F0A7C877BF', this.handle, value);
1454
+ isUpsidedown(): boolean {
1455
+ return inv<boolean>('0x109DE3DA41AAD94A', this.handle, rai());
1405
1456
  }
1406
1457
 
1407
1458
  /**
1408
- * @param toggle
1459
+ * @param p1
1460
+ * @returns
1409
1461
  */
1410
- setDynamic(toggle: boolean): void {
1411
- inv<void>('0xFBFC4473F66CE344', this.handle, toggle);
1462
+ doesBelongToThisScript(p1: boolean): boolean {
1463
+ return inv<boolean>('0x622B1980CBE13332', this.handle, p1, rai());
1412
1464
  }
1413
1465
 
1414
1466
  /**
1415
- * @param radius
1467
+ * Returns a hash of an entity's name. (Alternative Name: _GET_ENTITY_PROMPT_NAME_HASH)
1468
+ *
1469
+ * @returns
1416
1470
  */
1417
- setCustomPickupRadius(radius: number): void {
1418
- inv<void>('0x482D17E45665DA44', this.handle, f(radius));
1471
+ getCarriableFromEntity(): number {
1472
+ return (inv<number>('0x31FEF6A20F00B963', this.handle, rai())) & 0xFFFFFFFF;
1419
1473
  }
1420
1474
 
1421
1475
  /**
1422
- * @returns
1476
+ * @param toggle
1477
+ * @param keepPhysics
1423
1478
  */
1424
- getPopulationType(): number {
1425
- return inv<number>('0xADE28862B6D7B85B', this.handle, rai());
1479
+ setCollision(toggle: boolean, keepPhysics: boolean): void {
1480
+ inv<void>('0xF66F820909453B8C', this.handle, toggle, keepPhysics);
1426
1481
  }
1427
1482
 
1428
1483
  /**
1484
+ * @param p1
1429
1485
  * @returns
1430
1486
  */
1431
- isAVehicle(): boolean {
1432
- return inv<boolean>('0xC3D96AF45FCCEC4C', this.handle, rai());
1487
+ placeOnGroundProperly(p1: boolean): any {
1488
+ return inv<number>('0x9587913B9E772D29', this.handle, p1);
1433
1489
  }
1434
1490
 
1435
1491
  /**
1436
- * @param pos
1437
- * @param atTop
1438
- * @param inWorldCoords
1439
1492
  * @returns
1440
1493
  */
1441
- getHeight(pos: Vector3, atTop: boolean, inWorldCoords: boolean): number {
1442
- return inv<number>('0x296DEBC84474B375', this.handle, f(pos.x), f(pos.y), f(pos.z), atTop, inWorldCoords, raf());
1494
+ isInWater(): boolean {
1495
+ return inv<boolean>('0xDDE5C125AC446723', this.handle, rai());
1443
1496
  }
1444
1497
 
1445
1498
  /**
1446
- * @param pos
1447
- * @returns
1499
+ * @returns Returns `true` if the entity exists
1448
1500
  */
1449
- getOffsetFromGivenWorldCoords(pos: Vector3): Vector3 {
1450
- return Vector3.fromArray(inv<number[]>('0x497C6B1A2C9AE69C', this.handle, f(pos.x), f(pos.y), f(pos.z), rav()));
1451
- }
1452
-
1453
- addTrackingTrails(): void {
1454
- inv<void>('0x1AD922AB5038DEF3', this.handle);
1501
+ doesExist(): boolean {
1502
+ return inv<boolean>('0xD42BD6EB2E0F1677', this.handle, rai());
1455
1503
  }
1456
1504
 
1457
1505
  /**
1458
- * @param toggle
1506
+ * @returns
1459
1507
  */
1460
- setCanClimbOnEntity(toggle: boolean): void {
1461
- inv<void>('0x24AED2A608F93C4C', this.handle, toggle);
1508
+ getAlpha(): number {
1509
+ return inv<number>('0x1BB501624FAF2BEA', this.handle, rai());
1462
1510
  }
1463
1511
 
1464
1512
  /**
1465
- * @returns minimum; maximum
1513
+ * This native only works on `Ped` and `Object` entity types
1514
+ *
1515
+ * @param flagId Refer to [enum: eCarryingFlags]
1516
+ * @returns
1466
1517
  */
1467
- getWorldPositionOfDimensions(): [Vector3, Vector3] {
1468
- const result = inv<[number[], number[]]>('0xF3FDA9A617A15145', this.handle, pvv(), pvv());
1469
- return [Vector3.fromArray(result[0]), Vector3.fromArray(result[1])];
1518
+ getCarryingFlag(flagId: eCarryingFlags): number {
1519
+ return inv<number>('0x808077647856DE62', this.handle, flagId, rai());
1470
1520
  }
1471
1521
 
1472
1522
  /**
1473
1523
  * @param p1
1474
- * @returns
1475
1524
  */
1476
- isUnderwater(p1: boolean): any {
1477
- return inv<number>('0xD4E5C1E93C466127', this.handle, p1);
1525
+ forceAiAndAnimationUpdate(p1: boolean): void {
1526
+ inv<void>('0x4C9E96473D4F1A88', this.handle, p1);
1478
1527
  }
1479
1528
 
1480
1529
  /**
1481
- * @param animation
1482
- * @param animGroup
1483
- * @param p3
1484
- * @returns
1530
+ * Axis - Invert Axis Flags
1531
+ *
1532
+ * @param pos
1533
+ * @param xAxis
1534
+ * @param yAxis
1535
+ * @param zAxis
1485
1536
  */
1486
- stopAnim(animation: string | null, animGroup: string | null, p3: number): any {
1487
- return inv<number>('0x786591D986DE9159', this.handle, animation, animGroup, f(p3));
1537
+ setCoordsNoOffset(pos: Vector3, xAxis: boolean, yAxis: boolean, zAxis: boolean): void {
1538
+ inv<void>('0x239A3351AC1DA385', this.handle, f(pos.x), f(pos.y), f(pos.z), xAxis, yAxis, zAxis);
1488
1539
  }
1489
1540
 
1490
1541
  /**
1542
+ * Returns (CUR_HEALTH / MAX_HEALTH)
1543
+ *
1491
1544
  * @returns
1492
1545
  */
1493
- hasCollidedWithAnything(): boolean {
1494
- return inv<boolean>('0xDF18751EC74F90FF', this.handle, rai());
1546
+ getHealthFloat(): number {
1547
+ return inv<number>('0x96C638784DB4C815', this.handle, raf());
1495
1548
  }
1496
1549
 
1497
1550
  /**
@@ -1628,54 +1681,6 @@ export class Entity implements IHandle {
1628
1681
  return inv<boolean>('0xF6F6AFD8D4FB2658', this.handle, f(angle), rai());
1629
1682
  }
1630
1683
 
1631
- /**
1632
- * Simply returns whatever is passed to it (Regardless of whether the handle is valid or not).
1633
- *
1634
- * @returns
1635
- */
1636
- getVehicleIndexFromIndex(): Vehicle | null {
1637
- return createFromHandle<Vehicle>('Vehicle', inv<number>('0xDF1E5AAC561AFC59', this.handle, rai()));
1638
- }
1639
-
1640
- /**
1641
- * @returns
1642
- */
1643
- isVisible(): boolean {
1644
- return inv<boolean>('0xFFC96ECB7FA404CA', this.handle, rai());
1645
- }
1646
-
1647
- /**
1648
- * SET_ENTITY_LO*
1649
- *
1650
- * @param toggle
1651
- */
1652
- N_0xFF9965C47FA404DA(toggle: boolean): void {
1653
- inv<void>('0xFF9965C47FA404DA', this.handle, toggle);
1654
- }
1655
-
1656
- /**
1657
- * Valid indices: 0 - 3
1658
- * Index 1 always returns a `hogtied` config, doesn't matter the entity.
1659
- * It's for humans only and the ped must be resurrected first if it's dead.
1660
- *
1661
- * @param index
1662
- * @returns
1663
- */
1664
- getOptimalCarryConfig(index: number): string | number {
1665
- return (inv<number>('0x34F008A7E48C496B', this.handle, index, rai())) & 0xFFFFFFFF;
1666
- }
1667
-
1668
- setFadeIn(): void {
1669
- inv<void>('0xA91E6CF94404E8C9', this.handle);
1670
- }
1671
-
1672
- /**
1673
- * @returns
1674
- */
1675
- hasBeenDamagedByAnyPed(): boolean {
1676
- return inv<boolean>('0x9934E9C42D52D87E', this.handle, rai());
1677
- }
1678
-
1679
1684
  }
1680
1685
 
1681
1686
  registerHandle('Entity', Entity);