@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
@@ -8,84 +8,122 @@ export class Entity {
8
8
  static fromHandle(handle) {
9
9
  return handle === 0 ? null : new Entity(handle);
10
10
  }
11
+ static fromNetworkId(netId) {
12
+ if (!inv('0x38CE16C96BD11F2C', netId, rai()))
13
+ return null;
14
+ return Entity.fromHandle(inv('0x5B912C3F653822E6', netId, rai()));
15
+ }
11
16
  /**
12
- * @param targetEntity
13
17
  * @returns
14
18
  */
15
- isTouchingEntity(targetEntity) {
16
- return inv('0x9A2304A64C3C8423', this.handle, targetEntity.handle, rai());
17
- }
18
- deleteCarriable() {
19
- inv('0x0D0DB2B6AF19A987', this.handle);
19
+ getIsBird() {
20
+ return inv('0xC346A546612C49A9', this.handle);
20
21
  }
21
22
  /**
22
- * Returns a normalized value between 0.0f and 1.0f. You can get the actual anim time by multiplying this by GET_ANIM_DURATION
23
+ * Gets the entity's forward vector in YX(Z) eulers. Similar to GET_ENTITY_FORWARD_VECTOR
23
24
  *
24
- * @param animDict
25
- * @param animName
26
25
  * @returns
27
26
  */
28
- getAnimCurrentTime(animDict, animName) {
29
- return inv('0x627520389E288A73', this.handle, animDict, animName, raf());
27
+ getForwardVectorYx() {
28
+ return Vector3.fromArray(inv('0x935A30AA88FB1014', this.handle, rav()));
30
29
  }
31
30
  /**
32
- * @param entity2
33
- * @param thisFrameOnly
31
+ * @param pos
32
+ * @param xAxis
33
+ * @param yAxis
34
+ * @param zAxis
35
+ * @param clearArea
34
36
  */
35
- setNoCollisionEntity(entity2, thisFrameOnly) {
36
- inv('0xE037BF068223C38D', this.handle, entity2.handle, thisFrameOnly);
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);
37
39
  }
38
40
  /**
39
- * Result is in meters per second (m/s)
40
- *
41
+ * @param boneName
41
42
  * @returns
42
43
  */
43
- getSpeed() {
44
- return inv('0xFB6BA510A533DF81', this.handle, raf());
44
+ getBoneIndexByName(boneName) {
45
+ return inv('0xBACA8FE9C76C124E', this.handle, boneName, rai());
45
46
  }
46
47
  /**
47
- * @param bOnlyDamagedWhenRunningScript
48
+ * @param pause
48
49
  */
49
- setCanOnlyBeDamagedByScriptParticipants(bOnlyDamagedWhenRunningScript) {
50
- inv('0xFF83AF534156B399', this.handle, bOnlyDamagedWhenRunningScript);
50
+ pauseTracking(pause) {
51
+ inv('0x36EB4D34D4A092C5', this.handle, pause);
51
52
  }
52
53
  /**
53
- * @returns
54
+ * @param toggle
54
55
  */
55
- isTrackedVisible() {
56
- return inv('0xC8CCDB712FBCBA92', this.handle);
56
+ setLoadCollisionFlag(toggle) {
57
+ inv('0x9B9EE31AED48072E', this.handle, toggle);
57
58
  }
58
59
  /**
59
- * @param p1
60
- * @param collision
60
+ * Changes type and quality of skins
61
+ * type hashes: https://pastebin.com/C1WvQjCy
62
+ *
63
+ * @param type
61
64
  */
62
- detachEntity(p1, collision) {
63
- inv('0x64CDE9D6BF8ECAD3', this.handle, p1, collision);
65
+ setCarcassType(type) {
66
+ inv('0x399657ED871B3A6C', this.handle, _h(type));
67
+ }
68
+ /**
69
+ * @param toggle
70
+ */
71
+ setHasGravity(toggle) {
72
+ inv('0x0CEDB728A1083FA7', this.handle, toggle);
64
73
  }
65
74
  /**
75
+ * @param relative
66
76
  * @returns
67
77
  */
68
- isVisibleToScript() {
69
- return inv('0xF213C724E77F321A', this.handle, rai());
78
+ getSpeedVector(relative) {
79
+ return Vector3.fromArray(inv('0xF2DB09816A419DC5', this.handle, relative, rav()));
70
80
  }
71
81
  /**
72
82
  * @param entity2
73
- * @param traceType
83
+ * @param p2
84
+ * @param p3
74
85
  * @returns
75
86
  */
76
- hasClearLosToEntity(entity2, traceType) {
77
- return inv('0xFCDFF7B72D23A1AC', this.handle, entity2.handle, traceType, rai());
87
+ hasBeenDamagedByEntity(entity2, p2, p3) {
88
+ return inv('0x7B6E7BEC1143AC86', this.handle, entity2.handle, p2, p3, rai());
78
89
  }
79
90
  /**
80
- * Used in Script Function GENERIC_ITEM_HAS_ANIM_COMPLETED
81
- * *GET_ENTITY**
82
- *
83
- * @param animDict
84
- * @param animClip
85
91
  * @returns
86
92
  */
87
- N_0x8E46E18AA828334F(animDict, animClip) {
88
- return inv('0x8E46E18AA828334F', this.handle, animDict, animClip, raf());
93
+ isFullyLooted() {
94
+ return inv('0x8DE41E9902E85756', this.handle);
95
+ }
96
+ /**
97
+ * @returns
98
+ */
99
+ isOccluded() {
100
+ return inv('0x140188E884645624', this.handle, rai());
101
+ }
102
+ /**
103
+ * @param toggle
104
+ */
105
+ setCanBeDamaged(toggle) {
106
+ inv('0x0D06D522B90E861F', this.handle, toggle);
107
+ }
108
+ /**
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
+ */
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);
121
+ }
122
+ /**
123
+ * @returns
124
+ */
125
+ isDead() {
126
+ return inv('0x7D5B1F88E7504BBA', this.handle, rai());
89
127
  }
90
128
  /**
91
129
  * @param playerPedToIgnore
@@ -256,6 +294,92 @@ export class Entity {
256
294
  getNearestPlayerToOnTeam(team, playerPedToIgnore, flags) {
257
295
  return createFromHandle('Player', inv('0xB2C30C3B4AFF718C', this.handle, team, playerPedToIgnore.handle, flags, rai()));
258
296
  }
297
+ /**
298
+ * Returns the LOD distance of an entity.
299
+ *
300
+ * @returns
301
+ */
302
+ getLodDist() {
303
+ return inv('0xDF240D0C2A948683', this.handle, rai());
304
+ }
305
+ /**
306
+ * @returns
307
+ */
308
+ doesHaveDrawable() {
309
+ return inv('0x20487F0DA9AF164A', this.handle, rai());
310
+ }
311
+ /**
312
+ * @param xyzw
313
+ */
314
+ setQuaternion(xyzw) {
315
+ inv('0x100E7007D13E3687', this.handle, f(xyzw.x), f(xyzw.y), f(xyzw.z), f(xyzw.w));
316
+ }
317
+ /**
318
+ * @returns
319
+ */
320
+ isAttachedToAnyObject() {
321
+ return inv('0x306C1F6178F01AB3', this.handle, rai());
322
+ }
323
+ /**
324
+ * Sets a ped or an object totally invincible. It doesn't take any kind of damage. Peds will not ragdoll on explosions.
325
+ *
326
+ * @param toggle
327
+ */
328
+ setInvincible(toggle) {
329
+ inv('0xA5C38736C426FCB8', this.handle, toggle);
330
+ }
331
+ /**
332
+ * 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.
333
+ * https://github.com/femga/rdr3_discoveries/tree/master/boneNames useSoftPinning - if set to false attached entity will not detach when fixed
334
+ * collision - controls collision between the two entities (FALSE disables collision).
335
+ * isPed - pitch doesn't work when false and roll will only work on negative numbers (only peds)
336
+ * vertexIndex - position of vertex
337
+ * fixedRot - if false it ignores entity vector
338
+ *
339
+ * @param entity2
340
+ * @param boneIndex
341
+ * @param pos
342
+ * @param rot
343
+ * @param p9
344
+ * @param useSoftPinning
345
+ * @param collision
346
+ * @param isPed
347
+ * @param vertexIndex
348
+ * @param fixedRot
349
+ * @param p15
350
+ * @param p16
351
+ */
352
+ attachToEntity(entity2, boneIndex, pos, rot, p9, useSoftPinning, collision, isPed, vertexIndex, fixedRot, p15, p16) {
353
+ 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);
354
+ }
355
+ /**
356
+ * @returns
357
+ */
358
+ getIsAnimal() {
359
+ return inv('0x9A100F1CF4546629', this.handle);
360
+ }
361
+ /**
362
+ * p6/relative - makes the xyz force not relative to world coords, but to something else
363
+ * p7/highForce - setting false will make the force really low
364
+ *
365
+ * @param forceType
366
+ * @param pos
367
+ * @param component
368
+ * @param isDirectionRel
369
+ * @param isForceRel
370
+ * @param p8
371
+ */
372
+ applyForceToCenterOfMass(forceType, pos, component, isDirectionRel, isForceRel, p8) {
373
+ inv('0x31DA7CEC5334DB37', this.handle, forceType, f(pos.x), f(pos.y), f(pos.z), component, isDirectionRel, isForceRel, p8);
374
+ }
375
+ /**
376
+ * Old name: _GET_ENTITY_CAN_BE_DAMAGED
377
+ *
378
+ * @returns
379
+ */
380
+ getCanBeDamaged() {
381
+ return inv('0x75DF9E73F2F005FD', this.handle);
382
+ }
259
383
  /**
260
384
  * @param p1
261
385
  */
@@ -329,312 +453,365 @@ export class Entity {
329
453
  return createFromHandle('Player', inv('0x6888A43C35A5F630', this.handle, rai()));
330
454
  }
331
455
  /**
332
- * enum eCarriableState
333
- * {
334
- * CARRIABLE_STATE_NONE,
335
- * CARRIABLE_STATE_TRANSITIONING_TO_HOGTIED,
336
- * CARRIABLE_STATE_CARRIABLE_INTRO,
337
- * CARRIABLE_STATE_CARRIABLE,
338
- * CARRIABLE_STATE_BEING_PICKED_UP_FROM_GROUND,
339
- * CARRIABLE_STATE_CARRIED_BY_HUMAN,
340
- * CARRIABLE_STATE_BEING_PLACED_ON_GROUND,
341
- * CARRIABLE_STATE_CARRIED_BY_MOUNT,
342
- * CARRIABLE_STATE_BEING_PLACED_ON_MOUNT,
343
- * CARRIABLE_STATE_BEING_PICKED_UP_FROM_MOUNT,
344
- * CARRIABLE_STATE_BEING_CUT_FREE,
345
- * CARRIABLE_STATE_BEING_PLACED_ON_GROUND_ESCAPE,
346
- * CARRIABLE_STATE_BEING_PLACED_IN_VEHICLE
347
- * };
456
+ * Returns entityType: https://github.com/Halen84/RDR3-Native-Flags-And-Enums/tree/main/eEntityType
348
457
  *
349
458
  * @returns
350
459
  */
351
- getCarriableState() {
352
- return inv('0x61914209C36EFDDB', this.handle, rai());
460
+ getType() {
461
+ return inv('0x97F696ACA466B4E0', this.handle, rai());
353
462
  }
354
463
  /**
355
- * @param value
464
+ * @returns
356
465
  */
357
- setMaxHealth(value) {
358
- inv('0x166E7CF68597D8B5', this.handle, value);
466
+ isOwnedByPersistenceSystem() {
467
+ return inv('0xA7E51B53309EAC97', this.handle);
359
468
  }
360
469
  /**
361
- * Params: p1 (probably animType) = 1, 0
362
- *
363
- * @param p1
470
+ * @param animDict
471
+ * @param animName
472
+ * @param animType
364
473
  * @returns
365
474
  */
366
- isPlayingAnyAnim(p1) {
367
- return inv('0x0B7CB1300CBFE19C', this.handle, p1, rai());
475
+ isPlayingAnim(animDict, animName, animType) {
476
+ return inv('0xDEE49D5CA6C49148', this.handle, animDict, animName, animType, rai());
368
477
  }
369
478
  /**
370
- * @param enabled
479
+ * Marks the specified entity (ped, vehicle or object) as no longer needed, allowing the game engine to delete it whenever it sees fit.
371
480
  */
372
- setLightsEnabled(enabled) {
373
- inv('0xEBDC12861D079ABA', this.handle, enabled);
481
+ setAsNoLongerNeeded() {
482
+ inv('0x4971D2F8162B9674', this.handle);
374
483
  }
375
484
  /**
376
- * Offset values are relative to the entity. x = left/right
377
- * y = forward/backward
378
- * z = up/down
379
- *
380
- * @param offset
381
485
  * @returns
382
486
  */
383
- getOffsetFromInWorldCoords(offset) {
384
- return Vector3.fromArray(inv('0x1899F328B0E12848', this.handle, f(offset.x), f(offset.y), f(offset.z), rav()));
487
+ hasBeenDamagedByAnyVehicle() {
488
+ return inv('0x695D7C26DE65C423', this.handle, rai());
385
489
  }
386
490
  /**
387
- * 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
388
- *
389
- * @param entity2
390
- * @param xSize
391
- * @param ySize
392
- * @param zSize
393
- * @param p5
394
- * @param p6
395
- * @param p7
396
- * @returns
491
+ * @param animDict
492
+ * @param animName
493
+ * @param speedMultiplier
397
494
  */
398
- isAtEntity(entity2, xSize, ySize, zSize, p5, p6, p7) {
399
- return inv('0xC057F02B837A27F6', this.handle, entity2.handle, f(xSize), f(ySize), f(zSize), p5, p6, p7, rai());
495
+ setAnimSpeed(animDict, animName, speedMultiplier) {
496
+ inv('0xEAA885BA3CEA4E4A', this.handle, animDict, animName, f(speedMultiplier));
400
497
  }
401
- /**
402
- * @param toggle
403
- */
404
- setVisible(toggle) {
405
- inv('0x1794B4FCC84D812F', this.handle, toggle);
498
+ unpinMapEntity() {
499
+ inv('0xD2B9C78537ED5759', this.handle);
406
500
  }
407
501
  /**
408
- * Old name: _SET_ENTITY_CLEANUP_BY_ENGINE
502
+ * Get how much of the entity is submerged. 1.0f is whole entity.
409
503
  *
410
- * @param toggle
504
+ * @returns
411
505
  */
412
- setShouldFreezeWaitingOnCollision(toggle) {
413
- inv('0x740CB4F3F602C9F4', this.handle, toggle);
506
+ getSubmergedLevel() {
507
+ return inv('0x4A77C3F73FD9E831', this.handle, raf());
414
508
  }
415
509
  /**
416
- * Note: this native was removed in 1232 but added back in 1311
417
- * Old name: _GET_ENTITY_PROOFS
418
- *
419
510
  * @returns
420
511
  */
421
- getProofs() {
422
- return inv('0x6CF0DAD7FA1088EA', this.handle, rai());
512
+ isAttached() {
513
+ return inv('0xEE6AD63ABF59C0B7', this.handle, rai());
423
514
  }
424
515
  /**
425
- * skin - everything alpha except skin
426
- * Set entity alpha level. Ranging from 0 to 255 but changes occur after every 20 percent (after every 51).
516
+ * SET_ENTITY_A*
427
517
  *
428
- * @param alphaLevel
429
- * @param skin
518
+ * @param p1
430
519
  */
431
- setAlpha(alphaLevel, skin) {
432
- inv('0x0DF7692B1D9E7BA7', this.handle, alphaLevel, skin);
520
+ N_0xC0EDEF16D90661EE(p1) {
521
+ inv('0xC0EDEF16D90661EE', this.handle, f(p1));
433
522
  }
434
523
  /**
435
- * @returns
524
+ * @param looted
436
525
  */
437
- getThreatTier() {
438
- return inv('0xE12F56CB25D9CE23', this.handle, rai());
526
+ setFullyLooted(looted) {
527
+ inv('0x6BCF5F3D8FFE988D', this.handle, looted);
439
528
  }
440
529
  /**
441
530
  * @returns
442
531
  */
443
- isUpsidedown() {
444
- return inv('0x109DE3DA41AAD94A', this.handle, rai());
532
+ isAttachedToAnyVehicle() {
533
+ return inv('0x12DF6E0D2E736749', this.handle, rai());
445
534
  }
446
535
  /**
447
536
  * @param p1
448
- * @returns
449
537
  */
450
- doesBelongToThisScript(p1) {
451
- return inv('0x622B1980CBE13332', this.handle, p1, rai());
538
+ N_0xA48E4801DEBDF7E4(p1) {
539
+ inv('0xA48E4801DEBDF7E4', this.handle, p1);
452
540
  }
453
541
  /**
454
- * Returns a hash of an entity's name. (Alternative Name: _GET_ENTITY_PROMPT_NAME_HASH)
455
- *
542
+ * @param toggle
543
+ * @param keepPhysics
544
+ */
545
+ setCompletelyDisableCollision(toggle, keepPhysics) {
546
+ inv('0xE0580EC84813875A', this.handle, toggle, keepPhysics);
547
+ }
548
+ /**
549
+ * @param p1
550
+ */
551
+ N_0xCDB682BB47C02F0A(p1) {
552
+ inv('0xCDB682BB47C02F0A', this.handle, _h(p1));
553
+ }
554
+ /**
555
+ * @param volume
556
+ * @param p2
557
+ * @param p3
456
558
  * @returns
457
559
  */
458
- getCarriableFromEntity() {
459
- return (inv('0x31FEF6A20F00B963', this.handle, rai())) & 0xFFFFFFFF;
560
+ isInVolume(volume, p2, p3) {
561
+ return inv('0x5A5526BC09C06623', this.handle, volume, p2, p3, rai());
460
562
  }
461
563
  /**
462
- * @param toggle
463
- * @param keepPhysics
564
+ * @returns rightVector; forwardVector; upVector; position
464
565
  */
465
- setCollision(toggle, keepPhysics) {
466
- inv('0xF66F820909453B8C', this.handle, toggle, keepPhysics);
566
+ getMatrix() {
567
+ const result = inv('0x3A9B1120AF13FBF2', this.handle, pvv(), pvv(), pvv(), pvv());
568
+ return [Vector3.fromArray(result[0]), Vector3.fromArray(result[1]), Vector3.fromArray(result[2]), Vector3.fromArray(result[3])];
569
+ }
570
+ /**
571
+ * 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.
572
+ */
573
+ N_0x371D179701D9C082() {
574
+ inv('0x371D179701D9C082', this.handle);
467
575
  }
468
576
  /**
469
577
  * @param p1
470
578
  * @returns
471
579
  */
472
- placeOnGroundProperly(p1) {
473
- return inv('0x9587913B9E772D29', this.handle, p1);
580
+ getMaxHealth(p1) {
581
+ return inv('0x15D757606D170C3C', this.handle, p1, rai());
474
582
  }
475
583
  /**
476
- * @returns
584
+ * @param animDict
585
+ * @param animName
586
+ * @param time
477
587
  */
478
- isInWater() {
479
- return inv('0xDDE5C125AC446723', this.handle, rai());
588
+ setAnimCurrentTime(animDict, animName, time) {
589
+ inv('0x11CDABDC7783B2BC', this.handle, animDict, animName, f(time));
480
590
  }
481
591
  /**
482
- * @returns Returns `true` if the entity exists
592
+ * Gets the current coordinates for a specified entity.
593
+ * `entity` = The entity to get the coordinates from.
594
+ * `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.
595
+ *
596
+ * @param alive
597
+ * @param realCoords
598
+ * @returns
483
599
  */
484
- doesExist() {
485
- return inv('0xD42BD6EB2E0F1677', this.handle, rai());
600
+ getCoords(alive, realCoords) {
601
+ return Vector3.fromArray(inv('0xA86D5F069399F44D', this.handle, alive, realCoords, rav()));
486
602
  }
487
603
  /**
488
604
  * @returns
489
605
  */
490
- getAlpha() {
491
- return inv('0x1BB501624FAF2BEA', this.handle, rai());
606
+ isAnObject() {
607
+ return inv('0x0A27A546A375FDEF', this.handle, rai());
492
608
  }
493
609
  /**
494
- * This native only works on `Ped` and `Object` entity types
610
+ * 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).
495
611
  *
496
- * @param flagId Refer to [enum: eCarryingFlags]
612
+ * @param value
613
+ */
614
+ setLodDist(value) {
615
+ inv('0x5FB407F0A7C877BF', this.handle, value);
616
+ }
617
+ /**
618
+ * @param toggle
619
+ */
620
+ setDynamic(toggle) {
621
+ inv('0xFBFC4473F66CE344', this.handle, toggle);
622
+ }
623
+ /**
624
+ * @param radius
625
+ */
626
+ setCustomPickupRadius(radius) {
627
+ inv('0x482D17E45665DA44', this.handle, f(radius));
628
+ }
629
+ /**
497
630
  * @returns
498
631
  */
499
- getCarryingFlag(flagId) {
500
- return inv('0x808077647856DE62', this.handle, flagId, rai());
632
+ getPopulationType() {
633
+ return inv('0xADE28862B6D7B85B', this.handle, rai());
501
634
  }
502
635
  /**
503
- * @param p1
636
+ * @returns
504
637
  */
505
- forceAiAndAnimationUpdate(p1) {
506
- inv('0x4C9E96473D4F1A88', this.handle, p1);
638
+ isAVehicle() {
639
+ return inv('0xC3D96AF45FCCEC4C', this.handle, rai());
507
640
  }
508
641
  /**
509
- * Axis - Invert Axis Flags
510
- *
511
642
  * @param pos
512
- * @param xAxis
513
- * @param yAxis
514
- * @param zAxis
643
+ * @param atTop
644
+ * @param inWorldCoords
645
+ * @returns
515
646
  */
516
- setCoordsNoOffset(pos, xAxis, yAxis, zAxis) {
517
- inv('0x239A3351AC1DA385', this.handle, f(pos.x), f(pos.y), f(pos.z), xAxis, yAxis, zAxis);
647
+ getHeight(pos, atTop, inWorldCoords) {
648
+ return inv('0x296DEBC84474B375', this.handle, f(pos.x), f(pos.y), f(pos.z), atTop, inWorldCoords, raf());
518
649
  }
519
650
  /**
520
- * Returns (CUR_HEALTH / MAX_HEALTH)
521
- *
651
+ * @param pos
522
652
  * @returns
523
653
  */
524
- getHealthFloat() {
525
- return inv('0x96C638784DB4C815', this.handle, raf());
654
+ getOffsetFromGivenWorldCoords(pos) {
655
+ return Vector3.fromArray(inv('0x497C6B1A2C9AE69C', this.handle, f(pos.x), f(pos.y), f(pos.z), rav()));
656
+ }
657
+ addTrackingTrails() {
658
+ inv('0x1AD922AB5038DEF3', this.handle);
659
+ }
660
+ /**
661
+ * @param toggle
662
+ */
663
+ setCanClimbOnEntity(toggle) {
664
+ inv('0x24AED2A608F93C4C', this.handle, toggle);
665
+ }
666
+ /**
667
+ * @returns minimum; maximum
668
+ */
669
+ getWorldPositionOfDimensions() {
670
+ const result = inv('0xF3FDA9A617A15145', this.handle, pvv(), pvv());
671
+ return [Vector3.fromArray(result[0]), Vector3.fromArray(result[1])];
526
672
  }
527
673
  /**
674
+ * @param p1
528
675
  * @returns
529
676
  */
530
- getIsBird() {
531
- return inv('0xC346A546612C49A9', this.handle);
677
+ isUnderwater(p1) {
678
+ return inv('0xD4E5C1E93C466127', this.handle, p1);
532
679
  }
533
680
  /**
534
- * Gets the entity's forward vector in YX(Z) eulers. Similar to GET_ENTITY_FORWARD_VECTOR
535
- *
681
+ * @param animation
682
+ * @param animGroup
683
+ * @param p3
536
684
  * @returns
537
685
  */
538
- getForwardVectorYx() {
539
- return Vector3.fromArray(inv('0x935A30AA88FB1014', this.handle, rav()));
686
+ stopAnim(animation, animGroup, p3) {
687
+ return inv('0x786591D986DE9159', this.handle, animation, animGroup, f(p3));
540
688
  }
541
689
  /**
542
- * @param pos
543
- * @param xAxis
544
- * @param yAxis
545
- * @param zAxis
546
- * @param clearArea
690
+ * @returns
547
691
  */
548
- setCoords(pos, xAxis, yAxis, zAxis, clearArea) {
549
- inv('0x06843DA7060A026B', this.handle, f(pos.x), f(pos.y), f(pos.z), xAxis, yAxis, zAxis, clearArea);
692
+ hasCollidedWithAnything() {
693
+ return inv('0xDF18751EC74F90FF', this.handle, rai());
550
694
  }
551
695
  /**
552
- * @param boneName
696
+ * Simply returns whatever is passed to it (Regardless of whether the handle is valid or not).
697
+ *
553
698
  * @returns
554
699
  */
555
- getBoneIndexByName(boneName) {
556
- return inv('0xBACA8FE9C76C124E', this.handle, boneName, rai());
700
+ getVehicleIndexFromIndex() {
701
+ return createFromHandle('Vehicle', inv('0xDF1E5AAC561AFC59', this.handle, rai()));
557
702
  }
558
703
  /**
559
- * @param pause
704
+ * @returns
560
705
  */
561
- pauseTracking(pause) {
562
- inv('0x36EB4D34D4A092C5', this.handle, pause);
706
+ isVisible() {
707
+ return inv('0xFFC96ECB7FA404CA', this.handle, rai());
563
708
  }
564
709
  /**
710
+ * SET_ENTITY_LO*
711
+ *
565
712
  * @param toggle
566
713
  */
567
- setLoadCollisionFlag(toggle) {
568
- inv('0x9B9EE31AED48072E', this.handle, toggle);
714
+ N_0xFF9965C47FA404DA(toggle) {
715
+ inv('0xFF9965C47FA404DA', this.handle, toggle);
569
716
  }
570
717
  /**
571
- * Changes type and quality of skins
572
- * type hashes: https://pastebin.com/C1WvQjCy
718
+ * Valid indices: 0 - 3
719
+ * Index 1 always returns a `hogtied` config, doesn't matter the entity.
720
+ * It's for humans only and the ped must be resurrected first if it's dead.
573
721
  *
574
- * @param type
722
+ * @param index
723
+ * @returns
575
724
  */
576
- setCarcassType(type) {
577
- inv('0x399657ED871B3A6C', this.handle, _h(type));
725
+ getOptimalCarryConfig(index) {
726
+ return (inv('0x34F008A7E48C496B', this.handle, index, rai())) & 0xFFFFFFFF;
727
+ }
728
+ setFadeIn() {
729
+ inv('0xA91E6CF94404E8C9', this.handle);
578
730
  }
579
731
  /**
580
- * @param toggle
732
+ * @returns
581
733
  */
582
- setHasGravity(toggle) {
583
- inv('0x0CEDB728A1083FA7', this.handle, toggle);
734
+ hasBeenDamagedByAnyPed() {
735
+ return inv('0x9934E9C42D52D87E', this.handle, rai());
584
736
  }
585
737
  /**
586
- * @param relative
738
+ * @param targetEntity
587
739
  * @returns
588
740
  */
589
- getSpeedVector(relative) {
590
- return Vector3.fromArray(inv('0xF2DB09816A419DC5', this.handle, relative, rav()));
741
+ isTouchingEntity(targetEntity) {
742
+ return inv('0x9A2304A64C3C8423', this.handle, targetEntity.handle, rai());
743
+ }
744
+ deleteCarriable() {
745
+ inv('0x0D0DB2B6AF19A987', this.handle);
591
746
  }
592
747
  /**
593
- * @param entity2
594
- * @param p2
595
- * @param p3
748
+ * Returns a normalized value between 0.0f and 1.0f. You can get the actual anim time by multiplying this by GET_ANIM_DURATION
749
+ *
750
+ * @param animDict
751
+ * @param animName
596
752
  * @returns
597
753
  */
598
- hasBeenDamagedByEntity(entity2, p2, p3) {
599
- return inv('0x7B6E7BEC1143AC86', this.handle, entity2.handle, p2, p3, rai());
754
+ getAnimCurrentTime(animDict, animName) {
755
+ return inv('0x627520389E288A73', this.handle, animDict, animName, raf());
756
+ }
757
+ /**
758
+ * @param entity2
759
+ * @param thisFrameOnly
760
+ */
761
+ setNoCollisionEntity(entity2, thisFrameOnly) {
762
+ inv('0xE037BF068223C38D', this.handle, entity2.handle, thisFrameOnly);
600
763
  }
601
764
  /**
765
+ * Result is in meters per second (m/s)
766
+ *
602
767
  * @returns
603
768
  */
604
- isFullyLooted() {
605
- return inv('0x8DE41E9902E85756', this.handle);
769
+ getSpeed() {
770
+ return inv('0xFB6BA510A533DF81', this.handle, raf());
771
+ }
772
+ /**
773
+ * @param bOnlyDamagedWhenRunningScript
774
+ */
775
+ setCanOnlyBeDamagedByScriptParticipants(bOnlyDamagedWhenRunningScript) {
776
+ inv('0xFF83AF534156B399', this.handle, bOnlyDamagedWhenRunningScript);
606
777
  }
607
778
  /**
608
779
  * @returns
609
780
  */
610
- isOccluded() {
611
- return inv('0x140188E884645624', this.handle, rai());
781
+ isTrackedVisible() {
782
+ return inv('0xC8CCDB712FBCBA92', this.handle);
612
783
  }
613
784
  /**
614
- * @param toggle
785
+ * @param p1
786
+ * @param collision
615
787
  */
616
- setCanBeDamaged(toggle) {
617
- inv('0x0D06D522B90E861F', this.handle, toggle);
788
+ detachEntity(p1, collision) {
789
+ inv('0x64CDE9D6BF8ECAD3', this.handle, p1, collision);
618
790
  }
619
791
  /**
620
- * @param forceFlags
621
- * @param pos
622
- * @param offset
623
- * @param boneIndex
624
- * @param isDirectionRel
625
- * @param ignoreUpVec
626
- * @param isForceRel
627
- * @param p12
628
- * @param p13
792
+ * @returns
629
793
  */
630
- applyForceToEntity(forceFlags, pos, offset, boneIndex, isDirectionRel, ignoreUpVec, isForceRel, p12, p13) {
631
- 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);
794
+ isVisibleToScript() {
795
+ return inv('0xF213C724E77F321A', this.handle, rai());
632
796
  }
633
797
  /**
798
+ * @param entity2
799
+ * @param traceType
634
800
  * @returns
635
801
  */
636
- isDead() {
637
- return inv('0x7D5B1F88E7504BBA', this.handle, rai());
802
+ hasClearLosToEntity(entity2, traceType) {
803
+ return inv('0xFCDFF7B72D23A1AC', this.handle, entity2.handle, traceType, rai());
804
+ }
805
+ /**
806
+ * Used in Script Function GENERIC_ITEM_HAS_ANIM_COMPLETED
807
+ * *GET_ENTITY**
808
+ *
809
+ * @param animDict
810
+ * @param animClip
811
+ * @returns
812
+ */
813
+ N_0x8E46E18AA828334F(animDict, animClip) {
814
+ return inv('0x8E46E18AA828334F', this.handle, animDict, animClip, raf());
638
815
  }
639
816
  /**
640
817
  * @param pos1
@@ -739,92 +916,6 @@ export class Entity {
739
916
  getHeading() {
740
917
  return inv('0xC230DD956E2F5507', this.handle, raf());
741
918
  }
742
- /**
743
- * Returns the LOD distance of an entity.
744
- *
745
- * @returns
746
- */
747
- getLodDist() {
748
- return inv('0xDF240D0C2A948683', this.handle, rai());
749
- }
750
- /**
751
- * @returns
752
- */
753
- doesHaveDrawable() {
754
- return inv('0x20487F0DA9AF164A', this.handle, rai());
755
- }
756
- /**
757
- * @param xyzw
758
- */
759
- setQuaternion(xyzw) {
760
- inv('0x100E7007D13E3687', this.handle, f(xyzw.x), f(xyzw.y), f(xyzw.z), f(xyzw.w));
761
- }
762
- /**
763
- * @returns
764
- */
765
- isAttachedToAnyObject() {
766
- return inv('0x306C1F6178F01AB3', this.handle, rai());
767
- }
768
- /**
769
- * Sets a ped or an object totally invincible. It doesn't take any kind of damage. Peds will not ragdoll on explosions.
770
- *
771
- * @param toggle
772
- */
773
- setInvincible(toggle) {
774
- inv('0xA5C38736C426FCB8', this.handle, toggle);
775
- }
776
- /**
777
- * 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.
778
- * https://github.com/femga/rdr3_discoveries/tree/master/boneNames useSoftPinning - if set to false attached entity will not detach when fixed
779
- * collision - controls collision between the two entities (FALSE disables collision).
780
- * isPed - pitch doesn't work when false and roll will only work on negative numbers (only peds)
781
- * vertexIndex - position of vertex
782
- * fixedRot - if false it ignores entity vector
783
- *
784
- * @param entity2
785
- * @param boneIndex
786
- * @param pos
787
- * @param rot
788
- * @param p9
789
- * @param useSoftPinning
790
- * @param collision
791
- * @param isPed
792
- * @param vertexIndex
793
- * @param fixedRot
794
- * @param p15
795
- * @param p16
796
- */
797
- attachToEntity(entity2, boneIndex, pos, rot, p9, useSoftPinning, collision, isPed, vertexIndex, fixedRot, p15, p16) {
798
- 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);
799
- }
800
- /**
801
- * @returns
802
- */
803
- getIsAnimal() {
804
- return inv('0x9A100F1CF4546629', this.handle);
805
- }
806
- /**
807
- * p6/relative - makes the xyz force not relative to world coords, but to something else
808
- * p7/highForce - setting false will make the force really low
809
- *
810
- * @param forceType
811
- * @param pos
812
- * @param component
813
- * @param isDirectionRel
814
- * @param isForceRel
815
- * @param p8
816
- */
817
- applyForceToCenterOfMass(forceType, pos, component, isDirectionRel, isForceRel, p8) {
818
- inv('0x31DA7CEC5334DB37', this.handle, forceType, f(pos.x), f(pos.y), f(pos.z), component, isDirectionRel, isForceRel, p8);
819
- }
820
- /**
821
- * Old name: _GET_ENTITY_CAN_BE_DAMAGED
822
- *
823
- * @returns
824
- */
825
- getCanBeDamaged() {
826
- return inv('0x75DF9E73F2F005FD', this.handle);
827
- }
828
919
  /**
829
920
  * Seems to return true if entity is burned / scorched
830
921
  * *GET_ENTITY**
@@ -988,164 +1079,119 @@ export class Entity {
988
1079
  inv('0x18FF3110CF47115D', this.handle, flagId, value);
989
1080
  }
990
1081
  /**
991
- * @returns
992
- */
993
- getIsPredator() {
994
- return inv('0x5594AFE9DE0C01B7', this.handle);
995
- }
996
- /**
997
- * Returns entityType: https://github.com/Halen84/RDR3-Native-Flags-And-Enums/tree/main/eEntityType
998
- *
999
- * @returns
1000
- */
1001
- getType() {
1002
- return inv('0x97F696ACA466B4E0', this.handle, rai());
1003
- }
1004
- /**
1005
- * @returns
1006
- */
1007
- isOwnedByPersistenceSystem() {
1008
- return inv('0xA7E51B53309EAC97', this.handle);
1009
- }
1010
- /**
1011
- * @param animDict
1012
- * @param animName
1013
- * @param animType
1014
- * @returns
1015
- */
1016
- isPlayingAnim(animDict, animName, animType) {
1017
- return inv('0xDEE49D5CA6C49148', this.handle, animDict, animName, animType, rai());
1018
- }
1019
- /**
1020
- * Marks the specified entity (ped, vehicle or object) as no longer needed, allowing the game engine to delete it whenever it sees fit.
1021
- */
1022
- setAsNoLongerNeeded() {
1023
- inv('0x4971D2F8162B9674', this.handle);
1024
- }
1025
- /**
1026
- * @returns
1027
- */
1028
- hasBeenDamagedByAnyVehicle() {
1029
- return inv('0x695D7C26DE65C423', this.handle, rai());
1030
- }
1031
- /**
1032
- * @param animDict
1033
- * @param animName
1034
- * @param speedMultiplier
1035
- */
1036
- setAnimSpeed(animDict, animName, speedMultiplier) {
1037
- inv('0xEAA885BA3CEA4E4A', this.handle, animDict, animName, f(speedMultiplier));
1038
- }
1039
- unpinMapEntity() {
1040
- inv('0xD2B9C78537ED5759', this.handle);
1041
- }
1042
- /**
1043
- * Get how much of the entity is submerged. 1.0f is whole entity.
1044
- *
1045
- * @returns
1046
- */
1047
- getSubmergedLevel() {
1048
- return inv('0x4A77C3F73FD9E831', this.handle, raf());
1049
- }
1050
- /**
1051
- * @returns
1052
- */
1053
- isAttached() {
1054
- return inv('0xEE6AD63ABF59C0B7', this.handle, rai());
1055
- }
1056
- /**
1057
- * SET_ENTITY_A*
1058
- *
1059
- * @param p1
1060
- */
1061
- N_0xC0EDEF16D90661EE(p1) {
1062
- inv('0xC0EDEF16D90661EE', this.handle, f(p1));
1063
- }
1064
- /**
1065
- * @param looted
1082
+ * @returns
1066
1083
  */
1067
- setFullyLooted(looted) {
1068
- inv('0x6BCF5F3D8FFE988D', this.handle, looted);
1084
+ getIsPredator() {
1085
+ return inv('0x5594AFE9DE0C01B7', this.handle);
1069
1086
  }
1070
1087
  /**
1088
+ * enum eCarriableState
1089
+ * {
1090
+ * CARRIABLE_STATE_NONE,
1091
+ * CARRIABLE_STATE_TRANSITIONING_TO_HOGTIED,
1092
+ * CARRIABLE_STATE_CARRIABLE_INTRO,
1093
+ * CARRIABLE_STATE_CARRIABLE,
1094
+ * CARRIABLE_STATE_BEING_PICKED_UP_FROM_GROUND,
1095
+ * CARRIABLE_STATE_CARRIED_BY_HUMAN,
1096
+ * CARRIABLE_STATE_BEING_PLACED_ON_GROUND,
1097
+ * CARRIABLE_STATE_CARRIED_BY_MOUNT,
1098
+ * CARRIABLE_STATE_BEING_PLACED_ON_MOUNT,
1099
+ * CARRIABLE_STATE_BEING_PICKED_UP_FROM_MOUNT,
1100
+ * CARRIABLE_STATE_BEING_CUT_FREE,
1101
+ * CARRIABLE_STATE_BEING_PLACED_ON_GROUND_ESCAPE,
1102
+ * CARRIABLE_STATE_BEING_PLACED_IN_VEHICLE
1103
+ * };
1104
+ *
1071
1105
  * @returns
1072
1106
  */
1073
- isAttachedToAnyVehicle() {
1074
- return inv('0x12DF6E0D2E736749', this.handle, rai());
1107
+ getCarriableState() {
1108
+ return inv('0x61914209C36EFDDB', this.handle, rai());
1075
1109
  }
1076
1110
  /**
1077
- * @param p1
1111
+ * @param value
1078
1112
  */
1079
- N_0xA48E4801DEBDF7E4(p1) {
1080
- inv('0xA48E4801DEBDF7E4', this.handle, p1);
1113
+ setMaxHealth(value) {
1114
+ inv('0x166E7CF68597D8B5', this.handle, value);
1081
1115
  }
1082
1116
  /**
1083
- * @param toggle
1084
- * @param keepPhysics
1117
+ * Params: p1 (probably animType) = 1, 0
1118
+ *
1119
+ * @param p1
1120
+ * @returns
1085
1121
  */
1086
- setCompletelyDisableCollision(toggle, keepPhysics) {
1087
- inv('0xE0580EC84813875A', this.handle, toggle, keepPhysics);
1122
+ isPlayingAnyAnim(p1) {
1123
+ return inv('0x0B7CB1300CBFE19C', this.handle, p1, rai());
1088
1124
  }
1089
1125
  /**
1090
- * @param p1
1126
+ * @param enabled
1091
1127
  */
1092
- N_0xCDB682BB47C02F0A(p1) {
1093
- inv('0xCDB682BB47C02F0A', this.handle, _h(p1));
1128
+ setLightsEnabled(enabled) {
1129
+ inv('0xEBDC12861D079ABA', this.handle, enabled);
1094
1130
  }
1095
1131
  /**
1096
- * @param volume
1097
- * @param p2
1098
- * @param p3
1132
+ * Offset values are relative to the entity. x = left/right
1133
+ * y = forward/backward
1134
+ * z = up/down
1135
+ *
1136
+ * @param offset
1099
1137
  * @returns
1100
1138
  */
1101
- isInVolume(volume, p2, p3) {
1102
- return inv('0x5A5526BC09C06623', this.handle, volume, p2, p3, rai());
1139
+ getOffsetFromInWorldCoords(offset) {
1140
+ return Vector3.fromArray(inv('0x1899F328B0E12848', this.handle, f(offset.x), f(offset.y), f(offset.z), rav()));
1103
1141
  }
1104
1142
  /**
1105
- * @returns rightVector; forwardVector; upVector; position
1143
+ * 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
1144
+ *
1145
+ * @param entity2
1146
+ * @param xSize
1147
+ * @param ySize
1148
+ * @param zSize
1149
+ * @param p5
1150
+ * @param p6
1151
+ * @param p7
1152
+ * @returns
1106
1153
  */
1107
- getMatrix() {
1108
- const result = inv('0x3A9B1120AF13FBF2', this.handle, pvv(), pvv(), pvv(), pvv());
1109
- return [Vector3.fromArray(result[0]), Vector3.fromArray(result[1]), Vector3.fromArray(result[2]), Vector3.fromArray(result[3])];
1154
+ isAtEntity(entity2, xSize, ySize, zSize, p5, p6, p7) {
1155
+ return inv('0xC057F02B837A27F6', this.handle, entity2.handle, f(xSize), f(ySize), f(zSize), p5, p6, p7, rai());
1110
1156
  }
1111
1157
  /**
1112
- * 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.
1158
+ * @param toggle
1113
1159
  */
1114
- N_0x371D179701D9C082() {
1115
- inv('0x371D179701D9C082', this.handle);
1160
+ setVisible(toggle) {
1161
+ inv('0x1794B4FCC84D812F', this.handle, toggle);
1116
1162
  }
1117
1163
  /**
1118
- * @param p1
1119
- * @returns
1164
+ * Old name: _SET_ENTITY_CLEANUP_BY_ENGINE
1165
+ *
1166
+ * @param toggle
1120
1167
  */
1121
- getMaxHealth(p1) {
1122
- return inv('0x15D757606D170C3C', this.handle, p1, rai());
1168
+ setShouldFreezeWaitingOnCollision(toggle) {
1169
+ inv('0x740CB4F3F602C9F4', this.handle, toggle);
1123
1170
  }
1124
1171
  /**
1125
- * @param animDict
1126
- * @param animName
1127
- * @param time
1172
+ * Note: this native was removed in 1232 but added back in 1311
1173
+ * Old name: _GET_ENTITY_PROOFS
1174
+ *
1175
+ * @returns
1128
1176
  */
1129
- setAnimCurrentTime(animDict, animName, time) {
1130
- inv('0x11CDABDC7783B2BC', this.handle, animDict, animName, f(time));
1177
+ getProofs() {
1178
+ return inv('0x6CF0DAD7FA1088EA', this.handle, rai());
1131
1179
  }
1132
1180
  /**
1133
- * Gets the current coordinates for a specified entity.
1134
- * `entity` = The entity to get the coordinates from.
1135
- * `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.
1181
+ * skin - everything alpha except skin
1182
+ * Set entity alpha level. Ranging from 0 to 255 but changes occur after every 20 percent (after every 51).
1136
1183
  *
1137
- * @param alive
1138
- * @param realCoords
1139
- * @returns
1184
+ * @param alphaLevel
1185
+ * @param skin
1140
1186
  */
1141
- getCoords(alive, realCoords) {
1142
- return Vector3.fromArray(inv('0xA86D5F069399F44D', this.handle, alive, realCoords, rav()));
1187
+ setAlpha(alphaLevel, skin) {
1188
+ inv('0x0DF7692B1D9E7BA7', this.handle, alphaLevel, skin);
1143
1189
  }
1144
1190
  /**
1145
1191
  * @returns
1146
1192
  */
1147
- isAnObject() {
1148
- return inv('0x0A27A546A375FDEF', this.handle, rai());
1193
+ getThreatTier() {
1194
+ return inv('0xE12F56CB25D9CE23', this.handle, rai());
1149
1195
  }
1150
1196
  /**
1151
1197
  * Used in Script Function DUELING_DID_PLAYER_DISARM_OPPONENT
@@ -1228,90 +1274,91 @@ export class Entity {
1228
1274
  return inv('0x5E58342602E94718', this.handle, f(pos.x), f(pos.y), f(pos.z), f(xSize), f(ySize), f(zSize), p7, p8, p9, rai());
1229
1275
  }
1230
1276
  /**
1231
- * 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).
1232
- *
1233
- * @param value
1277
+ * @returns
1234
1278
  */
1235
- setLodDist(value) {
1236
- inv('0x5FB407F0A7C877BF', this.handle, value);
1279
+ isUpsidedown() {
1280
+ return inv('0x109DE3DA41AAD94A', this.handle, rai());
1237
1281
  }
1238
1282
  /**
1239
- * @param toggle
1283
+ * @param p1
1284
+ * @returns
1240
1285
  */
1241
- setDynamic(toggle) {
1242
- inv('0xFBFC4473F66CE344', this.handle, toggle);
1286
+ doesBelongToThisScript(p1) {
1287
+ return inv('0x622B1980CBE13332', this.handle, p1, rai());
1243
1288
  }
1244
1289
  /**
1245
- * @param radius
1290
+ * Returns a hash of an entity's name. (Alternative Name: _GET_ENTITY_PROMPT_NAME_HASH)
1291
+ *
1292
+ * @returns
1246
1293
  */
1247
- setCustomPickupRadius(radius) {
1248
- inv('0x482D17E45665DA44', this.handle, f(radius));
1294
+ getCarriableFromEntity() {
1295
+ return (inv('0x31FEF6A20F00B963', this.handle, rai())) & 0xFFFFFFFF;
1249
1296
  }
1250
1297
  /**
1251
- * @returns
1298
+ * @param toggle
1299
+ * @param keepPhysics
1252
1300
  */
1253
- getPopulationType() {
1254
- return inv('0xADE28862B6D7B85B', this.handle, rai());
1301
+ setCollision(toggle, keepPhysics) {
1302
+ inv('0xF66F820909453B8C', this.handle, toggle, keepPhysics);
1255
1303
  }
1256
1304
  /**
1305
+ * @param p1
1257
1306
  * @returns
1258
1307
  */
1259
- isAVehicle() {
1260
- return inv('0xC3D96AF45FCCEC4C', this.handle, rai());
1308
+ placeOnGroundProperly(p1) {
1309
+ return inv('0x9587913B9E772D29', this.handle, p1);
1261
1310
  }
1262
1311
  /**
1263
- * @param pos
1264
- * @param atTop
1265
- * @param inWorldCoords
1266
1312
  * @returns
1267
1313
  */
1268
- getHeight(pos, atTop, inWorldCoords) {
1269
- return inv('0x296DEBC84474B375', this.handle, f(pos.x), f(pos.y), f(pos.z), atTop, inWorldCoords, raf());
1314
+ isInWater() {
1315
+ return inv('0xDDE5C125AC446723', this.handle, rai());
1270
1316
  }
1271
1317
  /**
1272
- * @param pos
1273
- * @returns
1318
+ * @returns Returns `true` if the entity exists
1274
1319
  */
1275
- getOffsetFromGivenWorldCoords(pos) {
1276
- return Vector3.fromArray(inv('0x497C6B1A2C9AE69C', this.handle, f(pos.x), f(pos.y), f(pos.z), rav()));
1277
- }
1278
- addTrackingTrails() {
1279
- inv('0x1AD922AB5038DEF3', this.handle);
1320
+ doesExist() {
1321
+ return inv('0xD42BD6EB2E0F1677', this.handle, rai());
1280
1322
  }
1281
1323
  /**
1282
- * @param toggle
1324
+ * @returns
1283
1325
  */
1284
- setCanClimbOnEntity(toggle) {
1285
- inv('0x24AED2A608F93C4C', this.handle, toggle);
1326
+ getAlpha() {
1327
+ return inv('0x1BB501624FAF2BEA', this.handle, rai());
1286
1328
  }
1287
1329
  /**
1288
- * @returns minimum; maximum
1330
+ * This native only works on `Ped` and `Object` entity types
1331
+ *
1332
+ * @param flagId Refer to [enum: eCarryingFlags]
1333
+ * @returns
1289
1334
  */
1290
- getWorldPositionOfDimensions() {
1291
- const result = inv('0xF3FDA9A617A15145', this.handle, pvv(), pvv());
1292
- return [Vector3.fromArray(result[0]), Vector3.fromArray(result[1])];
1335
+ getCarryingFlag(flagId) {
1336
+ return inv('0x808077647856DE62', this.handle, flagId, rai());
1293
1337
  }
1294
1338
  /**
1295
1339
  * @param p1
1296
- * @returns
1297
1340
  */
1298
- isUnderwater(p1) {
1299
- return inv('0xD4E5C1E93C466127', this.handle, p1);
1341
+ forceAiAndAnimationUpdate(p1) {
1342
+ inv('0x4C9E96473D4F1A88', this.handle, p1);
1300
1343
  }
1301
1344
  /**
1302
- * @param animation
1303
- * @param animGroup
1304
- * @param p3
1305
- * @returns
1345
+ * Axis - Invert Axis Flags
1346
+ *
1347
+ * @param pos
1348
+ * @param xAxis
1349
+ * @param yAxis
1350
+ * @param zAxis
1306
1351
  */
1307
- stopAnim(animation, animGroup, p3) {
1308
- return inv('0x786591D986DE9159', this.handle, animation, animGroup, f(p3));
1352
+ setCoordsNoOffset(pos, xAxis, yAxis, zAxis) {
1353
+ inv('0x239A3351AC1DA385', this.handle, f(pos.x), f(pos.y), f(pos.z), xAxis, yAxis, zAxis);
1309
1354
  }
1310
1355
  /**
1356
+ * Returns (CUR_HEALTH / MAX_HEALTH)
1357
+ *
1311
1358
  * @returns
1312
1359
  */
1313
- hasCollidedWithAnything() {
1314
- return inv('0xDF18751EC74F90FF', this.handle, rai());
1360
+ getHealthFloat() {
1361
+ return inv('0x96C638784DB4C815', this.handle, raf());
1315
1362
  }
1316
1363
  /**
1317
1364
  * @param entity2
@@ -1434,47 +1481,5 @@ export class Entity {
1434
1481
  isUpright(angle) {
1435
1482
  return inv('0xF6F6AFD8D4FB2658', this.handle, f(angle), rai());
1436
1483
  }
1437
- /**
1438
- * Simply returns whatever is passed to it (Regardless of whether the handle is valid or not).
1439
- *
1440
- * @returns
1441
- */
1442
- getVehicleIndexFromIndex() {
1443
- return createFromHandle('Vehicle', inv('0xDF1E5AAC561AFC59', this.handle, rai()));
1444
- }
1445
- /**
1446
- * @returns
1447
- */
1448
- isVisible() {
1449
- return inv('0xFFC96ECB7FA404CA', this.handle, rai());
1450
- }
1451
- /**
1452
- * SET_ENTITY_LO*
1453
- *
1454
- * @param toggle
1455
- */
1456
- N_0xFF9965C47FA404DA(toggle) {
1457
- inv('0xFF9965C47FA404DA', this.handle, toggle);
1458
- }
1459
- /**
1460
- * Valid indices: 0 - 3
1461
- * Index 1 always returns a `hogtied` config, doesn't matter the entity.
1462
- * It's for humans only and the ped must be resurrected first if it's dead.
1463
- *
1464
- * @param index
1465
- * @returns
1466
- */
1467
- getOptimalCarryConfig(index) {
1468
- return (inv('0x34F008A7E48C496B', this.handle, index, rai())) & 0xFFFFFFFF;
1469
- }
1470
- setFadeIn() {
1471
- inv('0xA91E6CF94404E8C9', this.handle);
1472
- }
1473
- /**
1474
- * @returns
1475
- */
1476
- hasBeenDamagedByAnyPed() {
1477
- return inv('0x9934E9C42D52D87E', this.handle, rai());
1478
- }
1479
1484
  }
1480
1485
  registerHandle('Entity', Entity);