@nativewrappers/redm-codegen 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (213) hide show
  1. package/dist/classes/AnimScene.d.ts +126 -126
  2. package/dist/classes/AnimScene.d.ts.map +1 -1
  3. package/dist/classes/AnimScene.js +184 -184
  4. package/dist/classes/BaseModel.d.ts +17 -17
  5. package/dist/classes/BaseModel.d.ts.map +1 -1
  6. package/dist/classes/BaseModel.js +25 -25
  7. package/dist/classes/BaseTask.d.ts +12 -12
  8. package/dist/classes/BaseTask.d.ts.map +1 -1
  9. package/dist/classes/BaseTask.js +14 -14
  10. package/dist/classes/Cam.d.ts +94 -94
  11. package/dist/classes/Cam.d.ts.map +1 -1
  12. package/dist/classes/Cam.js +126 -126
  13. package/dist/classes/Entity.d.ts +471 -471
  14. package/dist/classes/Entity.d.ts.map +1 -1
  15. package/dist/classes/Entity.js +672 -672
  16. package/dist/classes/PedTask.d.ts +155 -155
  17. package/dist/classes/PedTask.d.ts.map +1 -1
  18. package/dist/classes/PedTask.js +204 -204
  19. package/dist/classes/PersChar.d.ts +9 -9
  20. package/dist/classes/PersChar.d.ts.map +1 -1
  21. package/dist/classes/PersChar.js +21 -21
  22. package/dist/classes/Pickup.d.ts +5 -5
  23. package/dist/classes/Pickup.d.ts.map +1 -1
  24. package/dist/classes/Pickup.js +9 -9
  25. package/dist/classes/Player.d.ts +687 -687
  26. package/dist/classes/Player.d.ts.map +1 -1
  27. package/dist/classes/Player.js +1013 -1013
  28. package/dist/classes/Prop.d.ts +87 -87
  29. package/dist/classes/Prop.d.ts.map +1 -1
  30. package/dist/classes/Prop.js +121 -121
  31. package/dist/classes/PropSet.d.ts +4 -4
  32. package/dist/classes/PropSet.d.ts.map +1 -1
  33. package/dist/classes/PropSet.js +6 -6
  34. package/dist/classes/VehicleTask.d.ts +17 -17
  35. package/dist/classes/VehicleTask.d.ts.map +1 -1
  36. package/dist/classes/VehicleTask.js +21 -21
  37. package/dist/classes/Weapon.d.ts +306 -306
  38. package/dist/classes/Weapon.d.ts.map +1 -1
  39. package/dist/classes/Weapon.js +411 -411
  40. package/dist/namespaces/Animscene.d.ts +59 -59
  41. package/dist/namespaces/Animscene.d.ts.map +1 -1
  42. package/dist/namespaces/Animscene.js +77 -77
  43. package/dist/namespaces/Audio.d.ts +569 -569
  44. package/dist/namespaces/Audio.d.ts.map +1 -1
  45. package/dist/namespaces/Audio.js +728 -728
  46. package/dist/namespaces/Bounty.d.ts +70 -70
  47. package/dist/namespaces/Bounty.d.ts.map +1 -1
  48. package/dist/namespaces/Bounty.js +115 -115
  49. package/dist/namespaces/Brain.d.ts +15 -15
  50. package/dist/namespaces/Brain.d.ts.map +1 -1
  51. package/dist/namespaces/Brain.js +20 -20
  52. package/dist/namespaces/CamStatics.d.ts +399 -399
  53. package/dist/namespaces/CamStatics.d.ts.map +1 -1
  54. package/dist/namespaces/CamStatics.js +574 -574
  55. package/dist/namespaces/Clock.d.ts +51 -51
  56. package/dist/namespaces/Clock.d.ts.map +1 -1
  57. package/dist/namespaces/Clock.js +73 -73
  58. package/dist/namespaces/Collection.d.ts +76 -76
  59. package/dist/namespaces/Collection.d.ts.map +1 -1
  60. package/dist/namespaces/Collection.js +108 -108
  61. package/dist/namespaces/Companion.d.ts +22 -22
  62. package/dist/namespaces/Companion.d.ts.map +1 -1
  63. package/dist/namespaces/Companion.js +30 -30
  64. package/dist/namespaces/Compendium.d.ts +38 -38
  65. package/dist/namespaces/Compendium.d.ts.map +1 -1
  66. package/dist/namespaces/Compendium.js +52 -52
  67. package/dist/namespaces/Crashlog.d.ts +10 -10
  68. package/dist/namespaces/Crashlog.d.ts.map +1 -1
  69. package/dist/namespaces/Crashlog.js +14 -14
  70. package/dist/namespaces/Crew.d.ts +9 -9
  71. package/dist/namespaces/Crew.d.ts.map +1 -1
  72. package/dist/namespaces/Crew.js +14 -14
  73. package/dist/namespaces/Databinding.d.ts +177 -177
  74. package/dist/namespaces/Databinding.d.ts.map +1 -1
  75. package/dist/namespaces/Databinding.js +271 -271
  76. package/dist/namespaces/Dlc.d.ts +5 -5
  77. package/dist/namespaces/Dlc.d.ts.map +1 -1
  78. package/dist/namespaces/Dlc.js +9 -9
  79. package/dist/namespaces/EntityStatics.d.ts +193 -193
  80. package/dist/namespaces/EntityStatics.d.ts.map +1 -1
  81. package/dist/namespaces/EntityStatics.js +263 -263
  82. package/dist/namespaces/Fire.d.ts +7 -7
  83. package/dist/namespaces/Fire.d.ts.map +1 -1
  84. package/dist/namespaces/Fire.js +9 -9
  85. package/dist/namespaces/Graphics.d.ts +820 -820
  86. package/dist/namespaces/Graphics.d.ts.map +1 -1
  87. package/dist/namespaces/Graphics.js +1118 -1118
  88. package/dist/namespaces/Hud.d.ts +494 -494
  89. package/dist/namespaces/Hud.d.ts.map +1 -1
  90. package/dist/namespaces/Hud.js +789 -789
  91. package/dist/namespaces/Inventory.d.ts +180 -180
  92. package/dist/namespaces/Inventory.d.ts.map +1 -1
  93. package/dist/namespaces/Inventory.js +239 -239
  94. package/dist/namespaces/Itemdatabase.d.ts +78 -78
  95. package/dist/namespaces/Itemdatabase.d.ts.map +1 -1
  96. package/dist/namespaces/Itemdatabase.js +106 -106
  97. package/dist/namespaces/Map.d.ts +156 -156
  98. package/dist/namespaces/Map.d.ts.map +1 -1
  99. package/dist/namespaces/Map.js +207 -207
  100. package/dist/namespaces/Minigame.d.ts +78 -78
  101. package/dist/namespaces/Minigame.d.ts.map +1 -1
  102. package/dist/namespaces/Minigame.js +116 -116
  103. package/dist/namespaces/Missiondata.d.ts +15 -15
  104. package/dist/namespaces/Missiondata.d.ts.map +1 -1
  105. package/dist/namespaces/Missiondata.js +23 -23
  106. package/dist/namespaces/Network.d.ts +636 -636
  107. package/dist/namespaces/Network.d.ts.map +1 -1
  108. package/dist/namespaces/Network.js +915 -915
  109. package/dist/namespaces/Object.d.ts +121 -121
  110. package/dist/namespaces/Object.d.ts.map +1 -1
  111. package/dist/namespaces/Object.js +162 -162
  112. package/dist/namespaces/Pad.d.ts +94 -94
  113. package/dist/namespaces/Pad.d.ts.map +1 -1
  114. package/dist/namespaces/Pad.js +127 -127
  115. package/dist/namespaces/Perschar.d.ts +44 -44
  116. package/dist/namespaces/Perschar.d.ts.map +1 -1
  117. package/dist/namespaces/Perschar.js +68 -68
  118. package/dist/namespaces/Physics.d.ts +158 -158
  119. package/dist/namespaces/Physics.d.ts.map +1 -1
  120. package/dist/namespaces/Physics.js +207 -207
  121. package/dist/namespaces/PlayerStatics.d.ts +127 -127
  122. package/dist/namespaces/PlayerStatics.d.ts.map +1 -1
  123. package/dist/namespaces/PlayerStatics.js +177 -177
  124. package/dist/namespaces/Population.d.ts +75 -75
  125. package/dist/namespaces/Population.d.ts.map +1 -1
  126. package/dist/namespaces/Population.js +101 -101
  127. package/dist/namespaces/Posse.d.ts +38 -38
  128. package/dist/namespaces/Posse.d.ts.map +1 -1
  129. package/dist/namespaces/Posse.js +62 -62
  130. package/dist/namespaces/Propset.d.ts +30 -30
  131. package/dist/namespaces/Propset.d.ts.map +1 -1
  132. package/dist/namespaces/Propset.js +38 -38
  133. package/dist/namespaces/Shapetest.d.ts +11 -11
  134. package/dist/namespaces/Shapetest.d.ts.map +1 -1
  135. package/dist/namespaces/Shapetest.js +13 -13
  136. package/dist/namespaces/Stats.d.ts +88 -88
  137. package/dist/namespaces/Stats.d.ts.map +1 -1
  138. package/dist/namespaces/Stats.js +123 -123
  139. package/dist/namespaces/Streaming.d.ts +58 -58
  140. package/dist/namespaces/Streaming.d.ts.map +1 -1
  141. package/dist/namespaces/Streaming.js +92 -92
  142. package/dist/namespaces/Task.d.ts +62 -62
  143. package/dist/namespaces/Task.d.ts.map +1 -1
  144. package/dist/namespaces/Task.js +90 -90
  145. package/dist/namespaces/Telemetry.d.ts +172 -172
  146. package/dist/namespaces/Telemetry.d.ts.map +1 -1
  147. package/dist/namespaces/Telemetry.js +240 -240
  148. package/dist/namespaces/Uifeed.d.ts +15 -15
  149. package/dist/namespaces/Uifeed.d.ts.map +1 -1
  150. package/dist/namespaces/Uifeed.js +24 -24
  151. package/dist/namespaces/Voice.d.ts +38 -38
  152. package/dist/namespaces/Voice.d.ts.map +1 -1
  153. package/dist/namespaces/Voice.js +56 -56
  154. package/dist/namespaces/Water.d.ts +27 -27
  155. package/dist/namespaces/Water.d.ts.map +1 -1
  156. package/dist/namespaces/Water.js +41 -41
  157. package/dist/namespaces/WeaponStatics.d.ts +250 -250
  158. package/dist/namespaces/WeaponStatics.d.ts.map +1 -1
  159. package/dist/namespaces/WeaponStatics.js +346 -346
  160. package/package.json +1 -1
  161. package/src/classes/AnimScene.ts +199 -199
  162. package/src/classes/BaseModel.ts +29 -29
  163. package/src/classes/BaseTask.ts +15 -15
  164. package/src/classes/Cam.ts +135 -135
  165. package/src/classes/Entity.ts +687 -687
  166. package/src/classes/PedTask.ts +223 -223
  167. package/src/classes/PersChar.ts +24 -24
  168. package/src/classes/Pickup.ts +10 -10
  169. package/src/classes/Player.ts +1024 -1024
  170. package/src/classes/Prop.ts +136 -136
  171. package/src/classes/PropSet.ts +7 -7
  172. package/src/classes/VehicleTask.ts +23 -23
  173. package/src/classes/Weapon.ts +429 -429
  174. package/src/namespaces/Animscene.ts +86 -86
  175. package/src/namespaces/Audio.ts +804 -804
  176. package/src/namespaces/Bounty.ts +131 -131
  177. package/src/namespaces/Brain.ts +22 -22
  178. package/src/namespaces/CamStatics.ts +599 -599
  179. package/src/namespaces/Clock.ts +82 -82
  180. package/src/namespaces/Collection.ts +109 -109
  181. package/src/namespaces/Companion.ts +34 -34
  182. package/src/namespaces/Compendium.ts +59 -59
  183. package/src/namespaces/Crashlog.ts +16 -16
  184. package/src/namespaces/Crew.ts +16 -16
  185. package/src/namespaces/Databinding.ts +286 -286
  186. package/src/namespaces/Dlc.ts +9 -9
  187. package/src/namespaces/EntityStatics.ts +279 -279
  188. package/src/namespaces/Fire.ts +10 -10
  189. package/src/namespaces/Graphics.ts +1196 -1196
  190. package/src/namespaces/Hud.ts +799 -799
  191. package/src/namespaces/Inventory.ts +245 -245
  192. package/src/namespaces/Itemdatabase.ts +118 -118
  193. package/src/namespaces/Map.ts +215 -215
  194. package/src/namespaces/Minigame.ts +132 -132
  195. package/src/namespaces/Missiondata.ts +27 -27
  196. package/src/namespaces/Network.ts +951 -951
  197. package/src/namespaces/Object.ts +171 -171
  198. package/src/namespaces/Pad.ts +127 -127
  199. package/src/namespaces/Perschar.ts +72 -72
  200. package/src/namespaces/Physics.ts +231 -231
  201. package/src/namespaces/PlayerStatics.ts +202 -202
  202. package/src/namespaces/Population.ts +114 -114
  203. package/src/namespaces/Posse.ts +62 -62
  204. package/src/namespaces/Propset.ts +42 -42
  205. package/src/namespaces/Shapetest.ts +14 -14
  206. package/src/namespaces/Stats.ts +139 -139
  207. package/src/namespaces/Streaming.ts +104 -104
  208. package/src/namespaces/Task.ts +100 -100
  209. package/src/namespaces/Telemetry.ts +265 -265
  210. package/src/namespaces/Uifeed.ts +27 -27
  211. package/src/namespaces/Voice.ts +65 -65
  212. package/src/namespaces/Water.ts +47 -47
  213. package/src/namespaces/WeaponStatics.ts +365 -365
@@ -41,323 +41,285 @@ export class Entity implements IHandle {
41
41
  }
42
42
 
43
43
  /**
44
- * @param pos
45
- * @param xAxis
46
- * @param yAxis
47
- * @param zAxis
48
- * @param clearArea
44
+ * @param targetEntity
45
+ * @returns
49
46
  */
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);
47
+ isTouchingEntity(targetEntity: Entity): boolean {
48
+ return !!inv<boolean>('0x9A2304A64C3C8423', this.handle, targetEntity.handle, rai());
49
+ }
50
+
51
+ deleteCarriable(): void {
52
+ inv<void>('0x0D0DB2B6AF19A987', this.handle);
52
53
  }
53
54
 
54
55
  /**
55
- * @param boneName
56
+ * Returns a normalized value between 0.0f and 1.0f. You can get the actual anim time by multiplying this by GET_ANIM_DURATION
57
+ *
58
+ * @param animDict
59
+ * @param animName
56
60
  * @returns
57
61
  */
58
- getBoneIndexByName(boneName: string | null): number {
59
- return inv<number>('0xBACA8FE9C76C124E', this.handle, boneName, rai());
62
+ getAnimCurrentTime(animDict: string | null, animName: string | null): number {
63
+ return inv<number>('0x627520389E288A73', this.handle, animDict, animName, raf());
60
64
  }
61
65
 
62
66
  /**
63
- * @param pause
67
+ * @param entity2
68
+ * @param thisFrameOnly
64
69
  */
65
- pauseTracking(pause: boolean): void {
66
- inv<void>('0x36EB4D34D4A092C5', this.handle, pause);
70
+ setNoCollisionEntity(entity2: Entity, thisFrameOnly: boolean): void {
71
+ inv<void>('0xE037BF068223C38D', this.handle, entity2.handle, thisFrameOnly);
67
72
  }
68
73
 
69
74
  /**
70
- * @param toggle
75
+ * Result is in meters per second (m/s)
76
+ *
77
+ * @returns
71
78
  */
72
- set LoadCollisionFlag(toggle: boolean) {
73
- inv<void>('0x9B9EE31AED48072E', this.handle, toggle);
79
+ get Speed(): number {
80
+ return inv<number>('0xFB6BA510A533DF81', this.handle, raf());
74
81
  }
75
82
 
76
83
  /**
77
- * Changes type and quality of skins
78
- * type hashes: https://pastebin.com/C1WvQjCy
79
- *
80
- * @param type
84
+ * @param bOnlyDamagedWhenRunningScript
81
85
  */
82
- set CarcassType(type: string | number) {
83
- inv<void>('0x399657ED871B3A6C', this.handle, _h(type));
86
+ set CanOnlyBeDamagedByScriptParticipants(bOnlyDamagedWhenRunningScript: boolean) {
87
+ inv<void>('0xFF83AF534156B399', this.handle, bOnlyDamagedWhenRunningScript);
84
88
  }
85
89
 
86
90
  /**
87
- * @param toggle
91
+ * @returns
88
92
  */
89
- set HasGravity(toggle: boolean) {
90
- inv<void>('0x0CEDB728A1083FA7', this.handle, toggle);
93
+ get IsTrackedVisible(): any {
94
+ return inv<number>('0xC8CCDB712FBCBA92', this.handle);
95
+ }
96
+
97
+ /**
98
+ * @param p1
99
+ * @param collision
100
+ */
101
+ detachEntity(p1: boolean, collision: boolean): void {
102
+ inv<void>('0x64CDE9D6BF8ECAD3', this.handle, p1, collision);
91
103
  }
92
104
 
93
105
  /**
94
- * @param relative
95
106
  * @returns
96
107
  */
97
- getSpeedVector(relative: boolean): Vector3 {
98
- return Vector3.fromArray(inv<number[]>('0xF2DB09816A419DC5', this.handle, relative, rav()));
108
+ get IsVisibleToScript(): boolean {
109
+ return !!inv<boolean>('0xF213C724E77F321A', this.handle, rai());
99
110
  }
100
111
 
101
112
  /**
102
113
  * @param entity2
103
- * @param p2
104
- * @param p3
114
+ * @param traceType
105
115
  * @returns
106
116
  */
107
- hasBeenDamagedByEntity(entity2: Entity, p2: boolean, p3: boolean): boolean {
108
- return !!inv<boolean>('0x7B6E7BEC1143AC86', this.handle, entity2.handle, p2, p3, rai());
117
+ hasClearLosToEntity(entity2: Entity, traceType: number): boolean {
118
+ return !!inv<boolean>('0xFCDFF7B72D23A1AC', this.handle, entity2.handle, traceType, rai());
109
119
  }
110
120
 
111
121
  /**
122
+ * Used in Script Function GENERIC_ITEM_HAS_ANIM_COMPLETED
123
+ * *GET_ENTITY**
124
+ *
125
+ * @param animDict
126
+ * @param animClip
112
127
  * @returns
113
128
  */
114
- get IsFullyLooted(): any {
115
- return inv<number>('0x8DE41E9902E85756', this.handle);
129
+ N_0x8E46E18AA828334F(animDict: string | null, animClip: string | null): number {
130
+ return inv<number>('0x8E46E18AA828334F', this.handle, animDict, animClip, raf());
116
131
  }
117
132
 
118
133
  /**
134
+ * @param playerPedToIgnore
135
+ * @param flags
119
136
  * @returns
120
137
  */
121
- get IsOccluded(): boolean {
122
- return !!inv<boolean>('0x140188E884645624', this.handle, rai());
138
+ getNearestPlayerToEntity(playerPedToIgnore: Ped, flags: number): Player | null {
139
+ return createFromHandle<Player>('Player', inv<number>('0x990E294FC387FB88', this.handle, playerPedToIgnore.handle, flags, rai()));
123
140
  }
124
141
 
125
142
  /**
126
- * @param toggle
143
+ * Gets the Y-component of the entity's forward vector.
144
+ *
145
+ * @returns
127
146
  */
128
- set CanBeDamaged(toggle: boolean) {
129
- inv<void>('0x0D06D522B90E861F', this.handle, toggle);
147
+ get ForwardY(): number {
148
+ return inv<number>('0x9A5C073ECBDA7EE7', this.handle, raf());
130
149
  }
131
150
 
132
151
  /**
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
152
+ * @param pitch
153
+ * @param roll
154
+ * @param yaw
155
+ * @param rotationOrder
156
+ * @param p5
142
157
  */
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);
158
+ setRotation(pitch: number, roll: number, yaw: number, rotationOrder: number, p5: boolean): void {
159
+ inv<void>('0x9CC8314DFEDE441E', this.handle, f(pitch), f(roll), f(yaw), rotationOrder, p5);
145
160
  }
146
161
 
147
162
  /**
148
- * @returns
163
+ * @param p1
164
+ * @param relationshipGroup
149
165
  */
150
- get IsDead(): boolean {
151
- return !!inv<boolean>('0x7D5B1F88E7504BBA', this.handle, rai());
166
+ setOnlyDamagedByRelationshipGroup(p1: boolean, relationshipGroup: string | number): void {
167
+ inv<void>('0x6C1F6AA2F0ADD104', this.handle, p1, _h(relationshipGroup));
168
+ }
169
+
170
+ /**
171
+ * https://github.com/femga/rdr3_discoveries/tree/master/AI/ENTITY_PROOFS
172
+ * BOOL p2: handles an additional special proofs flag, so it simply indicates whether it should be enabled or disabled, not sure what exactly it proofs the entity from though
173
+ *
174
+ * @param proofsBitset
175
+ * @param specialFlag
176
+ */
177
+ setProofs(proofsBitset: number, specialFlag: boolean): void {
178
+ inv<void>('0xFAEE099C6F890BB8', this.handle, proofsBitset, specialFlag);
152
179
  }
153
180
 
154
181
  /**
155
- * @param pos1
156
- * @param pos2
157
- * @param p7
158
- * @param p8
159
- * @param p9
160
182
  * @returns
161
183
  */
162
- isInArea(pos1: Vector3, pos2: Vector3, p7: boolean, p8: boolean, p9: any): boolean {
163
- return !!inv<boolean>('0x0C2634C40A16193E', this.handle, f(pos1.x), f(pos1.y), f(pos1.z), f(pos2.x), f(pos2.y), f(pos2.z), p7, p8, p9, rai());
184
+ hasCollisionLoadedAroundEntity(): boolean {
185
+ return !!inv<boolean>('0xBEB1600952B9CF5C', this.handle, rai());
164
186
  }
165
187
 
166
188
  /**
167
- * Returns the coordinates of an entity-bone.
168
- * https://github.com/femga/rdr3_discoveries/tree/master/boneNames
169
- *
170
- * @param boneIndex
171
189
  * @returns
172
190
  */
173
- getWorldPositionOfBone(boneIndex: number): Vector3 {
174
- return Vector3.fromArray(inv<number[]>('0x82CFA50E34681CA5', this.handle, boneIndex, rav()));
191
+ get IsCarriablePelt(): any {
192
+ return inv<number>('0x255B6DB4E3AD3C3E', this.handle);
175
193
  }
176
194
 
177
195
  /**
178
- * https://github.com/femga/rdr3_discoveries/tree/master/animations
179
- *
180
- * @param animName
181
- * @param animDict
182
- * @param p3
183
- * @param loop
184
- * @param stayInAnim
185
- * @param p6
186
- * @param delta
187
- * @param bitset
196
+ * @param p1
188
197
  * @returns
189
198
  */
190
- playAnim(animName: string | null, animDict: string | null, p3: number, loop: boolean, stayInAnim: boolean, p6: boolean, delta: number, bitset: any): boolean {
191
- return !!inv<boolean>('0xDC6D22FAB76D4874', this.handle, animName, animDict, f(p3), loop, stayInAnim, p6, f(delta), bitset, rai());
199
+ getVelocity(p1: number): Vector3 {
200
+ return Vector3.fromArray(inv<number[]>('0x4805D2B1D8CF94A9', this.handle, p1, rav()));
192
201
  }
193
202
 
194
203
  /**
195
- * Returns false if entity is not a ped or object.
196
- *
197
- * @returns lootTable
204
+ * @param toggle
198
205
  */
199
- get ScriptOverrideLootTablePermanent(): [any, number] {
200
- const result = inv<[number, number]>('0x1E804EA9B12030A4', this.handle, pvi());
201
- return [result[0], result[1]];
206
+ set CanAutoVaultOnEntity(toggle: boolean) {
207
+ inv<void>('0x80646744FA88F9D7', this.handle, toggle);
202
208
  }
203
209
 
204
210
  /**
205
- * @param animDict
206
- * @param animName
207
- * @param p3
211
+ * Sets the loot table an entity will carry. Returns true if loot table has been successfully set. Returns false if entity is not a ped or object.
212
+ * https://github.com/femga/rdr3_discoveries/blob/master/AI/EVENTS/loot_rewards.lua
213
+ *
214
+ * @param lootTable
208
215
  * @returns
209
216
  */
210
- hasAnimFinished(animDict: string | null, animName: string | null, p3: number): boolean {
211
- return !!inv<boolean>('0xAEB40615337EF1E3', this.handle, animDict, animName, p3, rai());
217
+ scriptOverrideLootTablePermanent(lootTable: string | number): any {
218
+ return inv<number>('0x8C03CD6B5E0E85E8', this.handle, _h(lootTable));
212
219
  }
213
220
 
214
221
  /**
215
- * @param bCanBeDamaged
216
- * @param relGroup
222
+ * @returns argStruct
217
223
  */
218
- setCanBeDamagedByRelationshipGroup(bCanBeDamaged: boolean, relGroup: string | number): void {
219
- inv<void>('0x0EF1AFB18649E015', this.handle, bCanBeDamaged, _h(relGroup));
224
+ get Script(): [number, number] {
225
+ const result = inv<[number, number]>('0x2A08A32B6D49906F', this.handle, pvi(), rai());
226
+ return [result[0] & 0xFFFFFFFF, result[1]];
220
227
  }
221
228
 
222
229
  /**
230
+ * @param actionHash
223
231
  * @returns
224
232
  */
225
- get UprightValue(): number {
226
- return inv<number>('0x56398BE65160C3BE', this.handle, raf());
233
+ hasAnimEventFired(actionHash: string | number): boolean {
234
+ return !!inv<boolean>('0x5851CC48405F4A07', this.handle, _h(actionHash), rai());
227
235
  }
228
236
 
229
237
  /**
230
- * @param pos
231
- * @param heading
232
- * @param xAxis
233
- * @param yAxis
234
- * @param zAxis
238
+ * @param p1
235
239
  */
236
- setCoordsAndHeading(pos: Vector3, heading: number, xAxis: boolean, yAxis: boolean, zAxis: boolean): void {
237
- inv<void>('0x203BEFFDBE12E96A', this.handle, f(pos.x), f(pos.y), f(pos.z), f(heading), xAxis, yAxis, zAxis);
240
+ N_0xEF259AA1E097E0AD(p1: any): void {
241
+ inv<void>('0xEF259AA1E097E0AD', this.handle, p1);
238
242
  }
239
243
 
240
244
  /**
241
- * Returns zero if the entity is not a carriable
245
+ * Getter for FREEZE_ENTITY_POSITION
242
246
  *
243
247
  * @returns
244
248
  */
245
- get CarryConfig(): number {
246
- return (inv<number>('0x0FD25587BB306C86', this.handle, rai())) & 0xFFFFFFFF;
249
+ get IsFrozen(): any {
250
+ return inv<number>('0x083D497D57B7400F', this.handle);
247
251
  }
248
252
 
249
253
  /**
250
- * tier: https://github.com/Halen84/RDR3-Native-Flags-And-Enums/tree/main/eEntityThreatTier
254
+ * Returns the entity that is looting a ped but only while the looting is active
251
255
  *
252
- * @param tier
253
- * @param p2
256
+ * @returns
254
257
  */
255
- setThreatTier(tier: number, p2: boolean): void {
256
- inv<void>('0x4B436BAC8CBE9B07', this.handle, tier, p2);
258
+ get LootingPed(): Ped | null {
259
+ return createFromHandle<Ped>('Ped', inv<number>('0xEF2D9ED7CE684F08', this.handle, rai()));
257
260
  }
258
261
 
259
262
  /**
260
- * Returns the heading of the entity in degrees. Also know as the "Yaw" of an entity.
261
- *
262
263
  * @returns
263
264
  */
264
- get Heading(): number {
265
- return inv<number>('0xC230DD956E2F5507', this.handle, raf());
265
+ get IsWaitingForWorldCollision(): boolean {
266
+ return !!inv<boolean>('0x5E1CC2E8DC3111DD', this.handle, rai());
266
267
  }
267
268
 
268
269
  /**
269
- * Returns the LOD distance of an entity.
270
+ * Gets the X-component of the entity's forward vector.
270
271
  *
271
272
  * @returns
272
273
  */
273
- get LodDist(): number {
274
- return inv<number>('0xDF240D0C2A948683', this.handle, rai());
274
+ get ForwardX(): number {
275
+ return inv<number>('0xDB0954E9960F6457', this.handle, raf());
275
276
  }
276
277
 
277
278
  /**
278
279
  * @returns
279
280
  */
280
- doesHaveDrawable(): boolean {
281
- return !!inv<boolean>('0x20487F0DA9AF164A', this.handle, rai());
281
+ get IsAPed(): boolean {
282
+ return !!inv<boolean>('0xCF8176912DDA4EA5', this.handle, rai());
282
283
  }
283
284
 
284
285
  /**
285
- * @param xyzw
286
+ * @returns
286
287
  */
287
- set Quaternion(xyzw: Vector4) {
288
- inv<void>('0x100E7007D13E3687', this.handle, f(xyzw.x), f(xyzw.y), f(xyzw.z), f(xyzw.w));
288
+ get Pitch(): number {
289
+ return inv<number>('0xEF355ABEFF7F5005', this.handle, raf());
289
290
  }
290
291
 
291
292
  /**
292
293
  * @returns
293
294
  */
294
- get IsAttachedToAnyObject(): boolean {
295
- return !!inv<boolean>('0x306C1F6178F01AB3', this.handle, rai());
295
+ get IsStatic(): boolean {
296
+ return !!inv<boolean>('0x86468ADFA0F6B861', this.handle, rai());
296
297
  }
297
298
 
298
299
  /**
299
- * Sets a ped or an object totally invincible. It doesn't take any kind of damage. Peds will not ragdoll on explosions.
300
+ * Returns the model hash from the entity
300
301
  *
301
- * @param toggle
302
+ * @returns
302
303
  */
303
- set Invincible(toggle: boolean) {
304
- inv<void>('0xA5C38736C426FCB8', this.handle, toggle);
305
- }
306
-
307
- /**
308
- * 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.
309
- * https://github.com/femga/rdr3_discoveries/tree/master/boneNames useSoftPinning - if set to false attached entity will not detach when fixed
310
- * collision - controls collision between the two entities (FALSE disables collision).
311
- * isPed - pitch doesn't work when false and roll will only work on negative numbers (only peds)
312
- * vertexIndex - position of vertex
313
- * fixedRot - if false it ignores entity vector
314
- *
315
- * @param entity2
316
- * @param boneIndex
317
- * @param pos
318
- * @param rot
319
- * @param p9
320
- * @param useSoftPinning
321
- * @param collision
322
- * @param isPed
323
- * @param vertexIndex
324
- * @param fixedRot
325
- * @param p15
326
- * @param p16
327
- */
328
- 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 {
329
- 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);
330
- }
331
-
332
- /**
333
- * @returns
334
- */
335
- get IsAnimal(): any {
336
- return inv<number>('0x9A100F1CF4546629', this.handle);
304
+ get Model(): number {
305
+ return (inv<number>('0xDA76A9F39210D365', this.handle, rai())) & 0xFFFFFFFF;
337
306
  }
338
307
 
339
308
  /**
340
- * p6/relative - makes the xyz force not relative to world coords, but to something else
341
- * p7/highForce - setting false will make the force really low
342
- *
343
- * @param forceType
344
- * @param pos
345
- * @param component
346
- * @param isDirectionRel
347
- * @param isForceRel
348
- * @param p8
309
+ * Deletes the specified entity, then sets the handle pointed to by the pointer to NULL.
349
310
  */
350
- applyForceToCenterOfMass(forceType: number, pos: Vector3, component: number, isDirectionRel: boolean, isForceRel: boolean, p8: boolean): void {
351
- inv<void>('0x31DA7CEC5334DB37', this.handle, forceType, f(pos.x), f(pos.y), f(pos.z), component, isDirectionRel, isForceRel, p8);
311
+ deleteEntity(): void {
312
+ inv<void>('0x4CD38C78BD19A497', this.handle);
352
313
  }
353
314
 
354
315
  /**
355
- * Old name: _GET_ENTITY_CAN_BE_DAMAGED
356
- *
316
+ * @param team
317
+ * @param playerPedToIgnore
318
+ * @param flags
357
319
  * @returns
358
320
  */
359
- get CanBeDamaged(): any {
360
- return inv<number>('0x75DF9E73F2F005FD', this.handle);
321
+ getNearestPlayerToOnTeam(team: number, playerPedToIgnore: Ped, flags: number): Player | null {
322
+ return createFromHandle<Player>('Player', inv<number>('0xB2C30C3B4AFF718C', this.handle, team, playerPedToIgnore.handle, flags, rai()));
361
323
  }
362
324
 
363
325
  /**
@@ -443,95 +405,211 @@ export class Entity implements IHandle {
443
405
  }
444
406
 
445
407
  /**
446
- * Returns entityType: https://github.com/Halen84/RDR3-Native-Flags-And-Enums/tree/main/eEntityType
408
+ * enum eCarriableState
409
+ * {
410
+ * CARRIABLE_STATE_NONE,
411
+ * CARRIABLE_STATE_TRANSITIONING_TO_HOGTIED,
412
+ * CARRIABLE_STATE_CARRIABLE_INTRO,
413
+ * CARRIABLE_STATE_CARRIABLE,
414
+ * CARRIABLE_STATE_BEING_PICKED_UP_FROM_GROUND,
415
+ * CARRIABLE_STATE_CARRIED_BY_HUMAN,
416
+ * CARRIABLE_STATE_BEING_PLACED_ON_GROUND,
417
+ * CARRIABLE_STATE_CARRIED_BY_MOUNT,
418
+ * CARRIABLE_STATE_BEING_PLACED_ON_MOUNT,
419
+ * CARRIABLE_STATE_BEING_PICKED_UP_FROM_MOUNT,
420
+ * CARRIABLE_STATE_BEING_CUT_FREE,
421
+ * CARRIABLE_STATE_BEING_PLACED_ON_GROUND_ESCAPE,
422
+ * CARRIABLE_STATE_BEING_PLACED_IN_VEHICLE
423
+ * };
447
424
  *
448
425
  * @returns
449
426
  */
450
- get Type(): number {
451
- return inv<number>('0x97F696ACA466B4E0', this.handle, rai());
427
+ get CarriableState(): number {
428
+ return inv<number>('0x61914209C36EFDDB', this.handle, rai());
452
429
  }
453
430
 
454
431
  /**
455
- * @returns
432
+ * @param value
456
433
  */
457
- get IsOwnedByPersistenceSystem(): any {
458
- return inv<number>('0xA7E51B53309EAC97', this.handle);
434
+ set MaxHealth(value: number) {
435
+ inv<void>('0x166E7CF68597D8B5', this.handle, value);
459
436
  }
460
437
 
461
438
  /**
462
- * @param animDict
463
- * @param animName
464
- * @param animType
439
+ * Params: p1 (probably animType) = 1, 0
440
+ *
441
+ * @param p1
465
442
  * @returns
466
443
  */
467
- isPlayingAnim(animDict: string | null, animName: string | null, animType: number): boolean {
468
- return !!inv<boolean>('0xDEE49D5CA6C49148', this.handle, animDict, animName, animType, rai());
444
+ isPlayingAnyAnim(p1: number): boolean {
445
+ return !!inv<boolean>('0x0B7CB1300CBFE19C', this.handle, p1, rai());
469
446
  }
470
447
 
471
448
  /**
472
- * Marks the specified entity (ped, vehicle or object) as no longer needed, allowing the game engine to delete it whenever it sees fit.
449
+ * @param enabled
473
450
  */
474
- setAsNoLongerNeeded(): void {
475
- inv<void>('0x4971D2F8162B9674', this.handle);
451
+ set LightsEnabled(enabled: boolean) {
452
+ inv<void>('0xEBDC12861D079ABA', this.handle, enabled);
476
453
  }
477
454
 
478
455
  /**
456
+ * Offset values are relative to the entity. x = left/right
457
+ * y = forward/backward
458
+ * z = up/down
459
+ *
460
+ * @param offset
479
461
  * @returns
480
462
  */
481
- hasBeenDamagedByAnyVehicle(): boolean {
482
- return !!inv<boolean>('0x695D7C26DE65C423', this.handle, rai());
463
+ getOffsetFromInWorldCoords(offset: Vector3): Vector3 {
464
+ return Vector3.fromArray(inv<number[]>('0x1899F328B0E12848', this.handle, f(offset.x), f(offset.y), f(offset.z), rav()));
483
465
  }
484
466
 
485
467
  /**
486
- * @param animDict
487
- * @param animName
488
- * @param speedMultiplier
468
+ * 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
469
+ *
470
+ * @param entity2
471
+ * @param xSize
472
+ * @param ySize
473
+ * @param zSize
474
+ * @param p5
475
+ * @param p6
476
+ * @param p7
477
+ * @returns
489
478
  */
490
- setAnimSpeed(animDict: string | null, animName: string | null, speedMultiplier: number): void {
491
- inv<void>('0xEAA885BA3CEA4E4A', this.handle, animDict, animName, f(speedMultiplier));
479
+ isAtEntity(entity2: Entity, xSize: number, ySize: number, zSize: number, p5: boolean, p6: boolean, p7: number): boolean {
480
+ return !!inv<boolean>('0xC057F02B837A27F6', this.handle, entity2.handle, f(xSize), f(ySize), f(zSize), p5, p6, p7, rai());
492
481
  }
493
482
 
494
- unpinMapEntity(): void {
495
- inv<void>('0xD2B9C78537ED5759', this.handle);
483
+ /**
484
+ * @param toggle
485
+ */
486
+ set Visible(toggle: boolean) {
487
+ inv<void>('0x1794B4FCC84D812F', this.handle, toggle);
496
488
  }
497
489
 
498
490
  /**
499
- * Get how much of the entity is submerged. 1.0f is whole entity.
491
+ * Old name: _SET_ENTITY_CLEANUP_BY_ENGINE
500
492
  *
501
- * @returns
493
+ * @param toggle
502
494
  */
503
- get SubmergedLevel(): number {
504
- return inv<number>('0x4A77C3F73FD9E831', this.handle, raf());
495
+ set ShouldFreezeWaitingOnCollision(toggle: boolean) {
496
+ inv<void>('0x740CB4F3F602C9F4', this.handle, toggle);
505
497
  }
506
498
 
507
499
  /**
500
+ * Note: this native was removed in 1232 but added back in 1311
501
+ * Old name: _GET_ENTITY_PROOFS
502
+ *
508
503
  * @returns
509
504
  */
510
- get IsAttached(): boolean {
511
- return !!inv<boolean>('0xEE6AD63ABF59C0B7', this.handle, rai());
505
+ get Proofs(): number {
506
+ return inv<number>('0x6CF0DAD7FA1088EA', this.handle, rai());
512
507
  }
513
508
 
514
509
  /**
515
- * SET_ENTITY_A*
510
+ * skin - everything alpha except skin
511
+ * Set entity alpha level. Ranging from 0 to 255 but changes occur after every 20 percent (after every 51).
516
512
  *
513
+ * @param alphaLevel
514
+ * @param skin
515
+ */
516
+ setAlpha(alphaLevel: number, skin: boolean): void {
517
+ inv<void>('0x0DF7692B1D9E7BA7', this.handle, alphaLevel, skin);
518
+ }
519
+
520
+ /**
521
+ * @returns
522
+ */
523
+ get ThreatTier(): number {
524
+ return inv<number>('0xE12F56CB25D9CE23', this.handle, rai());
525
+ }
526
+
527
+ /**
517
528
  * @param p1
518
529
  */
519
- N_0xC0EDEF16D90661EE(p1: number): void {
520
- inv<void>('0xC0EDEF16D90661EE', this.handle, f(p1));
530
+ N_0xA48E4801DEBDF7E4(p1: boolean): void {
531
+ inv<void>('0xA48E4801DEBDF7E4', this.handle, p1);
521
532
  }
522
533
 
523
534
  /**
524
- * @param looted
535
+ * @param toggle
536
+ * @param keepPhysics
525
537
  */
526
- set FullyLooted(looted: boolean) {
527
- inv<void>('0x6BCF5F3D8FFE988D', this.handle, looted);
538
+ setCompletelyDisableCollision(toggle: boolean, keepPhysics: boolean): void {
539
+ inv<void>('0xE0580EC84813875A', this.handle, toggle, keepPhysics);
528
540
  }
529
541
 
530
542
  /**
543
+ * @param p1
544
+ */
545
+ N_0xCDB682BB47C02F0A(p1: string | number): void {
546
+ inv<void>('0xCDB682BB47C02F0A', this.handle, _h(p1));
547
+ }
548
+
549
+ /**
550
+ * @param volume
551
+ * @param p2
552
+ * @param p3
531
553
  * @returns
532
554
  */
533
- get IsAttachedToAnyVehicle(): boolean {
534
- return !!inv<boolean>('0x12DF6E0D2E736749', this.handle, rai());
555
+ isInVolume(volume: number, p2: boolean, p3: number): boolean {
556
+ return !!inv<boolean>('0x5A5526BC09C06623', this.handle, volume, p2, p3, rai());
557
+ }
558
+
559
+ /**
560
+ * @returns rightVector; forwardVector; upVector; position
561
+ */
562
+ get Matrix(): [Vector3, Vector3, Vector3, Vector3] {
563
+ const result = inv<[number[], number[], number[], number[]]>('0x3A9B1120AF13FBF2', this.handle, pvv(), pvv(), pvv(), pvv());
564
+ return [Vector3.fromArray(result[0]), Vector3.fromArray(result[1]), Vector3.fromArray(result[2]), Vector3.fromArray(result[3])];
565
+ }
566
+
567
+ /**
568
+ * 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.
569
+ */
570
+ N_0x371D179701D9C082(): void {
571
+ inv<void>('0x371D179701D9C082', this.handle);
572
+ }
573
+
574
+ /**
575
+ * @param p1
576
+ * @returns
577
+ */
578
+ getMaxHealth(p1: boolean): number {
579
+ return inv<number>('0x15D757606D170C3C', this.handle, p1, rai());
580
+ }
581
+
582
+ /**
583
+ * @param animDict
584
+ * @param animName
585
+ * @param time
586
+ */
587
+ setAnimCurrentTime(animDict: string | null, animName: string | null, time: number): void {
588
+ inv<void>('0x11CDABDC7783B2BC', this.handle, animDict, animName, f(time));
589
+ }
590
+
591
+ /**
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
599
+ */
600
+ getCoords(alive?: boolean, realCoords?: boolean): Vector3 {
601
+ return Vector3.fromArray(inv<number[]>('0xA86D5F069399F44D', this.handle, alive, realCoords, rav()));
602
+ }
603
+
604
+ get Coords(): Vector3 {
605
+ return this.getCoords();
606
+ }
607
+
608
+ /**
609
+ * @returns
610
+ */
611
+ get IsAnObject(): boolean {
612
+ return !!inv<boolean>('0x0A27A546A375FDEF', this.handle, rai());
535
613
  }
536
614
 
537
615
  /**
@@ -554,75 +632,174 @@ export class Entity implements IHandle {
554
632
  }
555
633
 
556
634
  /**
557
- * @param p1
635
+ * @param p1
636
+ * @returns
637
+ */
638
+ isInAir(p1: any): boolean {
639
+ return !!inv<boolean>('0x886E37EC497200B6', this.handle, p1, rai());
640
+ }
641
+
642
+ /**
643
+ * @returns
644
+ */
645
+ get IsAMissionEntity(): boolean {
646
+ return !!inv<boolean>('0x138190F64DB4BBD1', this.handle, rai());
647
+ }
648
+
649
+ /**
650
+ * @returns
651
+ */
652
+ get IsAttachedToAnyPed(): boolean {
653
+ return !!inv<boolean>('0xC841153DED2CA89A', this.handle, rai());
654
+ }
655
+
656
+ /**
657
+ * @param to
658
+ * @returns
659
+ */
660
+ isAttachedToEntity(to: Entity): boolean {
661
+ return !!inv<boolean>('0x154A3C529497053E', this.handle, to.handle, rai());
662
+ }
663
+
664
+ /**
665
+ * @returns
666
+ */
667
+ hasBeenDamagedByAnyObject(): boolean {
668
+ return !!inv<boolean>('0x73BB763880CD23A6', this.handle, rai());
669
+ }
670
+
671
+ /**
672
+ * @param rotationOrder
673
+ * @returns
674
+ */
675
+ getRotation(rotationOrder: number): Vector3 {
676
+ return Vector3.fromArray(inv<number[]>('0xE09CAF86C32CB48F', this.handle, rotationOrder, rav()));
677
+ }
678
+
679
+ /**
680
+ * @param toggle
681
+ */
682
+ set MotionBlur(toggle: boolean) {
683
+ inv<void>('0x516C6ABD18322B63', this.handle, toggle);
684
+ }
685
+
686
+ resetAlpha(): void {
687
+ inv<void>('0x744B9EF44779D9AB', this.handle);
688
+ }
689
+
690
+ /**
691
+ * Checks if entity is within x/y/zSize distance of x/y/z. Last three are unknown ints, almost always p7 = 0, p8 = 1, p9 = 0
692
+ *
693
+ * @param pos
694
+ * @param xSize
695
+ * @param ySize
696
+ * @param zSize
697
+ * @param p7
698
+ * @param p8
699
+ * @param p9
700
+ * @returns
701
+ */
702
+ isAtCoord(pos: Vector3, xSize: number, ySize: number, zSize: number, p7: boolean, p8: boolean, p9: number): boolean {
703
+ return !!inv<boolean>('0x5E58342602E94718', this.handle, f(pos.x), f(pos.y), f(pos.z), f(xSize), f(ySize), f(zSize), p7, p8, p9, rai());
704
+ }
705
+
706
+ /**
707
+ * 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).
708
+ *
709
+ * @param value
710
+ */
711
+ set LodDist(value: number) {
712
+ inv<void>('0x5FB407F0A7C877BF', this.handle, value);
713
+ }
714
+
715
+ /**
716
+ * @param toggle
717
+ */
718
+ set Dynamic(toggle: boolean) {
719
+ inv<void>('0xFBFC4473F66CE344', this.handle, toggle);
720
+ }
721
+
722
+ /**
723
+ * @param radius
724
+ */
725
+ set CustomPickupRadius(radius: number) {
726
+ inv<void>('0x482D17E45665DA44', this.handle, f(radius));
727
+ }
728
+
729
+ /**
730
+ * @returns
731
+ */
732
+ get PopulationType(): number {
733
+ return inv<number>('0xADE28862B6D7B85B', this.handle, rai());
734
+ }
735
+
736
+ /**
558
737
  * @returns
559
738
  */
560
- isInAir(p1: any): boolean {
561
- return !!inv<boolean>('0x886E37EC497200B6', this.handle, p1, rai());
739
+ get IsAVehicle(): boolean {
740
+ return !!inv<boolean>('0xC3D96AF45FCCEC4C', this.handle, rai());
562
741
  }
563
742
 
564
743
  /**
744
+ * @param pos
745
+ * @param atTop
746
+ * @param inWorldCoords
565
747
  * @returns
566
748
  */
567
- get IsAMissionEntity(): boolean {
568
- return !!inv<boolean>('0x138190F64DB4BBD1', this.handle, rai());
749
+ getHeight(pos: Vector3, atTop: boolean, inWorldCoords: boolean): number {
750
+ return inv<number>('0x296DEBC84474B375', this.handle, f(pos.x), f(pos.y), f(pos.z), atTop, inWorldCoords, raf());
569
751
  }
570
752
 
571
753
  /**
754
+ * @param pos
572
755
  * @returns
573
756
  */
574
- get IsAttachedToAnyPed(): boolean {
575
- return !!inv<boolean>('0xC841153DED2CA89A', this.handle, rai());
757
+ getOffsetFromGivenWorldCoords(pos: Vector3): Vector3 {
758
+ return Vector3.fromArray(inv<number[]>('0x497C6B1A2C9AE69C', this.handle, f(pos.x), f(pos.y), f(pos.z), rav()));
759
+ }
760
+
761
+ addTrackingTrails(): void {
762
+ inv<void>('0x1AD922AB5038DEF3', this.handle);
576
763
  }
577
764
 
578
765
  /**
579
- * @param to
580
- * @returns
766
+ * @param toggle
581
767
  */
582
- isAttachedToEntity(to: Entity): boolean {
583
- return !!inv<boolean>('0x154A3C529497053E', this.handle, to.handle, rai());
768
+ set CanClimbOnEntity(toggle: boolean) {
769
+ inv<void>('0x24AED2A608F93C4C', this.handle, toggle);
584
770
  }
585
771
 
586
772
  /**
587
- * @returns
773
+ * @returns minimum; maximum
588
774
  */
589
- hasBeenDamagedByAnyObject(): boolean {
590
- return !!inv<boolean>('0x73BB763880CD23A6', this.handle, rai());
775
+ get WorldPositionOfDimensions(): [Vector3, Vector3] {
776
+ const result = inv<[number[], number[]]>('0xF3FDA9A617A15145', this.handle, pvv(), pvv());
777
+ return [Vector3.fromArray(result[0]), Vector3.fromArray(result[1])];
591
778
  }
592
779
 
593
780
  /**
594
- * @param rotationOrder
781
+ * @param p1
595
782
  * @returns
596
783
  */
597
- getRotation(rotationOrder: number): Vector3 {
598
- return Vector3.fromArray(inv<number[]>('0xE09CAF86C32CB48F', this.handle, rotationOrder, rav()));
784
+ isUnderwater(p1: boolean): any {
785
+ return inv<number>('0xD4E5C1E93C466127', this.handle, p1);
599
786
  }
600
787
 
601
788
  /**
602
- * @param toggle
789
+ * @param animation
790
+ * @param animGroup
791
+ * @param p3
792
+ * @returns
603
793
  */
604
- set MotionBlur(toggle: boolean) {
605
- inv<void>('0x516C6ABD18322B63', this.handle, toggle);
606
- }
607
-
608
- resetAlpha(): void {
609
- inv<void>('0x744B9EF44779D9AB', this.handle);
794
+ stopAnim(animation: string | null, animGroup: string | null, p3: number): any {
795
+ return inv<number>('0x786591D986DE9159', this.handle, animation, animGroup, f(p3));
610
796
  }
611
797
 
612
798
  /**
613
- * Checks if entity is within x/y/zSize distance of x/y/z. Last three are unknown ints, almost always p7 = 0, p8 = 1, p9 = 0
614
- *
615
- * @param pos
616
- * @param xSize
617
- * @param ySize
618
- * @param zSize
619
- * @param p7
620
- * @param p8
621
- * @param p9
622
799
  * @returns
623
800
  */
624
- isAtCoord(pos: Vector3, xSize: number, ySize: number, zSize: number, p7: boolean, p8: boolean, p9: number): boolean {
625
- return !!inv<boolean>('0x5E58342602E94718', this.handle, f(pos.x), f(pos.y), f(pos.z), f(xSize), f(ySize), f(zSize), p7, p8, p9, rai());
801
+ hasCollidedWithAnything(): boolean {
802
+ return !!inv<boolean>('0xDF18751EC74F90FF', this.handle, rai());
626
803
  }
627
804
 
628
805
  /**
@@ -760,285 +937,371 @@ export class Entity implements IHandle {
760
937
  }
761
938
 
762
939
  /**
763
- * @param targetEntity
940
+ * Simply returns whatever is passed to it (Regardless of whether the handle is valid or not).
941
+ *
764
942
  * @returns
765
943
  */
766
- isTouchingEntity(targetEntity: Entity): boolean {
767
- return !!inv<boolean>('0x9A2304A64C3C8423', this.handle, targetEntity.handle, rai());
944
+ get VehicleIndexFromIndex(): Vehicle | null {
945
+ return createFromHandle<Vehicle>('Vehicle', inv<number>('0xDF1E5AAC561AFC59', this.handle, rai()));
768
946
  }
769
947
 
770
- deleteCarriable(): void {
771
- inv<void>('0x0D0DB2B6AF19A987', this.handle);
948
+ /**
949
+ * @returns
950
+ */
951
+ get IsVisible(): boolean {
952
+ return !!inv<boolean>('0xFFC96ECB7FA404CA', this.handle, rai());
772
953
  }
773
954
 
774
955
  /**
775
- * Returns a normalized value between 0.0f and 1.0f. You can get the actual anim time by multiplying this by GET_ANIM_DURATION
956
+ * SET_ENTITY_LO*
776
957
  *
777
- * @param animDict
778
- * @param animName
779
- * @returns
958
+ * @param toggle
780
959
  */
781
- getAnimCurrentTime(animDict: string | null, animName: string | null): number {
782
- return inv<number>('0x627520389E288A73', this.handle, animDict, animName, raf());
960
+ N_0xFF9965C47FA404DA(toggle: boolean): void {
961
+ inv<void>('0xFF9965C47FA404DA', this.handle, toggle);
783
962
  }
784
963
 
785
964
  /**
786
- * @param entity2
787
- * @param thisFrameOnly
965
+ * Valid indices: 0 - 3
966
+ * Index 1 always returns a `hogtied` config, doesn't matter the entity.
967
+ * It's for humans only and the ped must be resurrected first if it's dead.
968
+ *
969
+ * @param index
970
+ * @returns
788
971
  */
789
- setNoCollisionEntity(entity2: Entity, thisFrameOnly: boolean): void {
790
- inv<void>('0xE037BF068223C38D', this.handle, entity2.handle, thisFrameOnly);
972
+ getOptimalCarryConfig(index: number): number {
973
+ return (inv<number>('0x34F008A7E48C496B', this.handle, index, rai())) & 0xFFFFFFFF;
974
+ }
975
+
976
+ setFadeIn(): void {
977
+ inv<void>('0xA91E6CF94404E8C9', this.handle);
791
978
  }
792
979
 
793
980
  /**
794
- * Result is in meters per second (m/s)
795
- *
796
981
  * @returns
797
982
  */
798
- get Speed(): number {
799
- return inv<number>('0xFB6BA510A533DF81', this.handle, raf());
983
+ hasBeenDamagedByAnyPed(): boolean {
984
+ return !!inv<boolean>('0x9934E9C42D52D87E', this.handle, rai());
800
985
  }
801
986
 
802
987
  /**
803
- * @param bOnlyDamagedWhenRunningScript
988
+ * @param pos
989
+ * @param xAxis
990
+ * @param yAxis
991
+ * @param zAxis
992
+ * @param clearArea
804
993
  */
805
- set CanOnlyBeDamagedByScriptParticipants(bOnlyDamagedWhenRunningScript: boolean) {
806
- inv<void>('0xFF83AF534156B399', this.handle, bOnlyDamagedWhenRunningScript);
994
+ setCoords(pos: Vector3, xAxis: boolean, yAxis: boolean, zAxis: boolean, clearArea: boolean): void {
995
+ inv<void>('0x06843DA7060A026B', this.handle, f(pos.x), f(pos.y), f(pos.z), xAxis, yAxis, zAxis, clearArea);
807
996
  }
808
997
 
809
998
  /**
999
+ * @param boneName
810
1000
  * @returns
811
1001
  */
812
- get IsTrackedVisible(): any {
813
- return inv<number>('0xC8CCDB712FBCBA92', this.handle);
1002
+ getBoneIndexByName(boneName: string | null): number {
1003
+ return inv<number>('0xBACA8FE9C76C124E', this.handle, boneName, rai());
814
1004
  }
815
1005
 
816
1006
  /**
817
- * @param p1
818
- * @param collision
1007
+ * @param pause
819
1008
  */
820
- detachEntity(p1: boolean, collision: boolean): void {
821
- inv<void>('0x64CDE9D6BF8ECAD3', this.handle, p1, collision);
1009
+ pauseTracking(pause: boolean): void {
1010
+ inv<void>('0x36EB4D34D4A092C5', this.handle, pause);
1011
+ }
1012
+
1013
+ /**
1014
+ * @param toggle
1015
+ */
1016
+ set LoadCollisionFlag(toggle: boolean) {
1017
+ inv<void>('0x9B9EE31AED48072E', this.handle, toggle);
1018
+ }
1019
+
1020
+ /**
1021
+ * Changes type and quality of skins
1022
+ * type hashes: https://pastebin.com/C1WvQjCy
1023
+ *
1024
+ * @param type
1025
+ */
1026
+ set CarcassType(type: string | number) {
1027
+ inv<void>('0x399657ED871B3A6C', this.handle, _h(type));
822
1028
  }
823
1029
 
824
1030
  /**
1031
+ * @param toggle
1032
+ */
1033
+ set HasGravity(toggle: boolean) {
1034
+ inv<void>('0x0CEDB728A1083FA7', this.handle, toggle);
1035
+ }
1036
+
1037
+ /**
1038
+ * @param relative
825
1039
  * @returns
826
1040
  */
827
- get IsVisibleToScript(): boolean {
828
- return !!inv<boolean>('0xF213C724E77F321A', this.handle, rai());
1041
+ getSpeedVector(relative: boolean): Vector3 {
1042
+ return Vector3.fromArray(inv<number[]>('0xF2DB09816A419DC5', this.handle, relative, rav()));
829
1043
  }
830
1044
 
831
1045
  /**
832
1046
  * @param entity2
833
- * @param traceType
1047
+ * @param p2
1048
+ * @param p3
834
1049
  * @returns
835
1050
  */
836
- hasClearLosToEntity(entity2: Entity, traceType: number): boolean {
837
- return !!inv<boolean>('0xFCDFF7B72D23A1AC', this.handle, entity2.handle, traceType, rai());
1051
+ hasBeenDamagedByEntity(entity2: Entity, p2: boolean, p3: boolean): boolean {
1052
+ return !!inv<boolean>('0x7B6E7BEC1143AC86', this.handle, entity2.handle, p2, p3, rai());
838
1053
  }
839
1054
 
840
1055
  /**
841
- * Used in Script Function GENERIC_ITEM_HAS_ANIM_COMPLETED
842
- * *GET_ENTITY**
843
- *
844
- * @param animDict
845
- * @param animClip
846
1056
  * @returns
847
1057
  */
848
- N_0x8E46E18AA828334F(animDict: string | null, animClip: string | null): number {
849
- return inv<number>('0x8E46E18AA828334F', this.handle, animDict, animClip, raf());
1058
+ get IsFullyLooted(): any {
1059
+ return inv<number>('0x8DE41E9902E85756', this.handle);
850
1060
  }
851
1061
 
852
1062
  /**
853
- * @param playerPedToIgnore
854
- * @param flags
855
1063
  * @returns
856
1064
  */
857
- getNearestPlayerToEntity(playerPedToIgnore: Ped, flags: number): Player | null {
858
- return createFromHandle<Player>('Player', inv<number>('0x990E294FC387FB88', this.handle, playerPedToIgnore.handle, flags, rai()));
1065
+ get IsOccluded(): boolean {
1066
+ return !!inv<boolean>('0x140188E884645624', this.handle, rai());
859
1067
  }
860
1068
 
861
1069
  /**
862
- * Gets the Y-component of the entity's forward vector.
863
- *
864
- * @returns
1070
+ * @param toggle
865
1071
  */
866
- get ForwardY(): number {
867
- return inv<number>('0x9A5C073ECBDA7EE7', this.handle, raf());
1072
+ set CanBeDamaged(toggle: boolean) {
1073
+ inv<void>('0x0D06D522B90E861F', this.handle, toggle);
868
1074
  }
869
1075
 
870
1076
  /**
871
- * @param pitch
872
- * @param roll
873
- * @param yaw
874
- * @param rotationOrder
875
- * @param p5
1077
+ * @param forceFlags
1078
+ * @param pos
1079
+ * @param offset
1080
+ * @param boneIndex
1081
+ * @param isDirectionRel
1082
+ * @param ignoreUpVec
1083
+ * @param isForceRel
1084
+ * @param p12
1085
+ * @param p13
876
1086
  */
877
- setRotation(pitch: number, roll: number, yaw: number, rotationOrder: number, p5: boolean): void {
878
- inv<void>('0x9CC8314DFEDE441E', this.handle, f(pitch), f(roll), f(yaw), rotationOrder, p5);
1087
+ applyForceToEntity(forceFlags: number, pos: Vector3, offset: Vector3, boneIndex: number, isDirectionRel: boolean, ignoreUpVec: boolean, isForceRel: boolean, p12: boolean, p13: boolean): void {
1088
+ 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);
879
1089
  }
880
1090
 
881
1091
  /**
882
- * @param p1
883
- * @param relationshipGroup
1092
+ * @returns
884
1093
  */
885
- setOnlyDamagedByRelationshipGroup(p1: boolean, relationshipGroup: string | number): void {
886
- inv<void>('0x6C1F6AA2F0ADD104', this.handle, p1, _h(relationshipGroup));
1094
+ get IsDead(): boolean {
1095
+ return !!inv<boolean>('0x7D5B1F88E7504BBA', this.handle, rai());
887
1096
  }
888
1097
 
889
1098
  /**
890
- * https://github.com/femga/rdr3_discoveries/tree/master/AI/ENTITY_PROOFS
891
- * BOOL p2: handles an additional special proofs flag, so it simply indicates whether it should be enabled or disabled, not sure what exactly it proofs the entity from though
1099
+ * @param pos1
1100
+ * @param pos2
1101
+ * @param p7
1102
+ * @param p8
1103
+ * @param p9
1104
+ * @returns
1105
+ */
1106
+ isInArea(pos1: Vector3, pos2: Vector3, p7: boolean, p8: boolean, p9: any): boolean {
1107
+ return !!inv<boolean>('0x0C2634C40A16193E', this.handle, f(pos1.x), f(pos1.y), f(pos1.z), f(pos2.x), f(pos2.y), f(pos2.z), p7, p8, p9, rai());
1108
+ }
1109
+
1110
+ /**
1111
+ * Returns the coordinates of an entity-bone.
1112
+ * https://github.com/femga/rdr3_discoveries/tree/master/boneNames
892
1113
  *
893
- * @param proofsBitset
894
- * @param specialFlag
1114
+ * @param boneIndex
1115
+ * @returns
895
1116
  */
896
- setProofs(proofsBitset: number, specialFlag: boolean): void {
897
- inv<void>('0xFAEE099C6F890BB8', this.handle, proofsBitset, specialFlag);
1117
+ getWorldPositionOfBone(boneIndex: number): Vector3 {
1118
+ return Vector3.fromArray(inv<number[]>('0x82CFA50E34681CA5', this.handle, boneIndex, rav()));
898
1119
  }
899
1120
 
900
1121
  /**
1122
+ * https://github.com/femga/rdr3_discoveries/tree/master/animations
1123
+ *
1124
+ * @param animName
1125
+ * @param animDict
1126
+ * @param p3
1127
+ * @param loop
1128
+ * @param stayInAnim
1129
+ * @param p6
1130
+ * @param delta
1131
+ * @param bitset
901
1132
  * @returns
902
1133
  */
903
- hasCollisionLoadedAroundEntity(): boolean {
904
- return !!inv<boolean>('0xBEB1600952B9CF5C', this.handle, rai());
1134
+ playAnim(animName: string | null, animDict: string | null, p3: number, loop: boolean, stayInAnim: boolean, p6: boolean, delta: number, bitset: any): boolean {
1135
+ return !!inv<boolean>('0xDC6D22FAB76D4874', this.handle, animName, animDict, f(p3), loop, stayInAnim, p6, f(delta), bitset, rai());
905
1136
  }
906
1137
 
907
1138
  /**
908
- * @returns
1139
+ * Returns false if entity is not a ped or object.
1140
+ *
1141
+ * @returns lootTable
909
1142
  */
910
- get IsCarriablePelt(): any {
911
- return inv<number>('0x255B6DB4E3AD3C3E', this.handle);
1143
+ get ScriptOverrideLootTablePermanent(): [any, number] {
1144
+ const result = inv<[number, number]>('0x1E804EA9B12030A4', this.handle, pvi());
1145
+ return [result[0], result[1]];
912
1146
  }
913
1147
 
914
1148
  /**
915
- * @param p1
1149
+ * @param animDict
1150
+ * @param animName
1151
+ * @param p3
916
1152
  * @returns
917
1153
  */
918
- getVelocity(p1: number): Vector3 {
919
- return Vector3.fromArray(inv<number[]>('0x4805D2B1D8CF94A9', this.handle, p1, rav()));
1154
+ hasAnimFinished(animDict: string | null, animName: string | null, p3: number): boolean {
1155
+ return !!inv<boolean>('0xAEB40615337EF1E3', this.handle, animDict, animName, p3, rai());
920
1156
  }
921
1157
 
922
1158
  /**
923
- * @param toggle
1159
+ * @param bCanBeDamaged
1160
+ * @param relGroup
924
1161
  */
925
- set CanAutoVaultOnEntity(toggle: boolean) {
926
- inv<void>('0x80646744FA88F9D7', this.handle, toggle);
1162
+ setCanBeDamagedByRelationshipGroup(bCanBeDamaged: boolean, relGroup: string | number): void {
1163
+ inv<void>('0x0EF1AFB18649E015', this.handle, bCanBeDamaged, _h(relGroup));
927
1164
  }
928
1165
 
929
1166
  /**
930
- * Sets the loot table an entity will carry. Returns true if loot table has been successfully set. Returns false if entity is not a ped or object.
931
- * https://github.com/femga/rdr3_discoveries/blob/master/AI/EVENTS/loot_rewards.lua
932
- *
933
- * @param lootTable
934
1167
  * @returns
935
1168
  */
936
- scriptOverrideLootTablePermanent(lootTable: string | number): any {
937
- return inv<number>('0x8C03CD6B5E0E85E8', this.handle, _h(lootTable));
1169
+ get UprightValue(): number {
1170
+ return inv<number>('0x56398BE65160C3BE', this.handle, raf());
938
1171
  }
939
1172
 
940
1173
  /**
941
- * @returns argStruct
1174
+ * @param pos
1175
+ * @param heading
1176
+ * @param xAxis
1177
+ * @param yAxis
1178
+ * @param zAxis
942
1179
  */
943
- get Script(): [number, number] {
944
- const result = inv<[number, number]>('0x2A08A32B6D49906F', this.handle, pvi(), rai());
945
- return [result[0] & 0xFFFFFFFF, result[1]];
1180
+ setCoordsAndHeading(pos: Vector3, heading: number, xAxis: boolean, yAxis: boolean, zAxis: boolean): void {
1181
+ inv<void>('0x203BEFFDBE12E96A', this.handle, f(pos.x), f(pos.y), f(pos.z), f(heading), xAxis, yAxis, zAxis);
946
1182
  }
947
1183
 
948
1184
  /**
949
- * @param actionHash
1185
+ * Returns zero if the entity is not a carriable
1186
+ *
950
1187
  * @returns
951
1188
  */
952
- hasAnimEventFired(actionHash: string | number): boolean {
953
- return !!inv<boolean>('0x5851CC48405F4A07', this.handle, _h(actionHash), rai());
1189
+ get CarryConfig(): number {
1190
+ return (inv<number>('0x0FD25587BB306C86', this.handle, rai())) & 0xFFFFFFFF;
954
1191
  }
955
1192
 
956
1193
  /**
957
- * @param p1
1194
+ * tier: https://github.com/Halen84/RDR3-Native-Flags-And-Enums/tree/main/eEntityThreatTier
1195
+ *
1196
+ * @param tier
1197
+ * @param p2
958
1198
  */
959
- N_0xEF259AA1E097E0AD(p1: any): void {
960
- inv<void>('0xEF259AA1E097E0AD', this.handle, p1);
1199
+ setThreatTier(tier: number, p2: boolean): void {
1200
+ inv<void>('0x4B436BAC8CBE9B07', this.handle, tier, p2);
961
1201
  }
962
1202
 
963
1203
  /**
964
- * Getter for FREEZE_ENTITY_POSITION
1204
+ * Returns the heading of the entity in degrees. Also know as the "Yaw" of an entity.
965
1205
  *
966
1206
  * @returns
967
1207
  */
968
- get IsFrozen(): any {
969
- return inv<number>('0x083D497D57B7400F', this.handle);
1208
+ get Heading(): number {
1209
+ return inv<number>('0xC230DD956E2F5507', this.handle, raf());
970
1210
  }
971
1211
 
972
1212
  /**
973
- * Returns the entity that is looting a ped but only while the looting is active
1213
+ * Returns the LOD distance of an entity.
974
1214
  *
975
1215
  * @returns
976
1216
  */
977
- get LootingPed(): Ped | null {
978
- return createFromHandle<Ped>('Ped', inv<number>('0xEF2D9ED7CE684F08', this.handle, rai()));
1217
+ get LodDist(): number {
1218
+ return inv<number>('0xDF240D0C2A948683', this.handle, rai());
979
1219
  }
980
1220
 
981
1221
  /**
982
1222
  * @returns
983
1223
  */
984
- get IsWaitingForWorldCollision(): boolean {
985
- return !!inv<boolean>('0x5E1CC2E8DC3111DD', this.handle, rai());
1224
+ doesHaveDrawable(): boolean {
1225
+ return !!inv<boolean>('0x20487F0DA9AF164A', this.handle, rai());
986
1226
  }
987
1227
 
988
1228
  /**
989
- * Gets the X-component of the entity's forward vector.
990
- *
991
- * @returns
1229
+ * @param xyzw
992
1230
  */
993
- get ForwardX(): number {
994
- return inv<number>('0xDB0954E9960F6457', this.handle, raf());
1231
+ set Quaternion(xyzw: Vector4) {
1232
+ inv<void>('0x100E7007D13E3687', this.handle, f(xyzw.x), f(xyzw.y), f(xyzw.z), f(xyzw.w));
995
1233
  }
996
1234
 
997
1235
  /**
998
1236
  * @returns
999
1237
  */
1000
- get IsAPed(): boolean {
1001
- return !!inv<boolean>('0xCF8176912DDA4EA5', this.handle, rai());
1238
+ get IsAttachedToAnyObject(): boolean {
1239
+ return !!inv<boolean>('0x306C1F6178F01AB3', this.handle, rai());
1002
1240
  }
1003
1241
 
1004
1242
  /**
1005
- * @returns
1243
+ * Sets a ped or an object totally invincible. It doesn't take any kind of damage. Peds will not ragdoll on explosions.
1244
+ *
1245
+ * @param toggle
1006
1246
  */
1007
- get Pitch(): number {
1008
- return inv<number>('0xEF355ABEFF7F5005', this.handle, raf());
1247
+ set Invincible(toggle: boolean) {
1248
+ inv<void>('0xA5C38736C426FCB8', this.handle, toggle);
1009
1249
  }
1010
1250
 
1011
1251
  /**
1012
- * @returns
1252
+ * 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.
1253
+ * https://github.com/femga/rdr3_discoveries/tree/master/boneNames useSoftPinning - if set to false attached entity will not detach when fixed
1254
+ * collision - controls collision between the two entities (FALSE disables collision).
1255
+ * isPed - pitch doesn't work when false and roll will only work on negative numbers (only peds)
1256
+ * vertexIndex - position of vertex
1257
+ * fixedRot - if false it ignores entity vector
1258
+ *
1259
+ * @param entity2
1260
+ * @param boneIndex
1261
+ * @param pos
1262
+ * @param rot
1263
+ * @param p9
1264
+ * @param useSoftPinning
1265
+ * @param collision
1266
+ * @param isPed
1267
+ * @param vertexIndex
1268
+ * @param fixedRot
1269
+ * @param p15
1270
+ * @param p16
1013
1271
  */
1014
- get IsStatic(): boolean {
1015
- return !!inv<boolean>('0x86468ADFA0F6B861', this.handle, rai());
1272
+ 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 {
1273
+ 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);
1016
1274
  }
1017
1275
 
1018
1276
  /**
1019
- * Returns the model hash from the entity
1020
- *
1021
1277
  * @returns
1022
1278
  */
1023
- get Model(): number {
1024
- return (inv<number>('0xDA76A9F39210D365', this.handle, rai())) & 0xFFFFFFFF;
1279
+ get IsAnimal(): any {
1280
+ return inv<number>('0x9A100F1CF4546629', this.handle);
1025
1281
  }
1026
1282
 
1027
1283
  /**
1028
- * Deletes the specified entity, then sets the handle pointed to by the pointer to NULL.
1284
+ * p6/relative - makes the xyz force not relative to world coords, but to something else
1285
+ * p7/highForce - setting false will make the force really low
1286
+ *
1287
+ * @param forceType
1288
+ * @param pos
1289
+ * @param component
1290
+ * @param isDirectionRel
1291
+ * @param isForceRel
1292
+ * @param p8
1029
1293
  */
1030
- deleteEntity(): void {
1031
- inv<void>('0x4CD38C78BD19A497', this.handle);
1294
+ applyForceToCenterOfMass(forceType: number, pos: Vector3, component: number, isDirectionRel: boolean, isForceRel: boolean, p8: boolean): void {
1295
+ inv<void>('0x31DA7CEC5334DB37', this.handle, forceType, f(pos.x), f(pos.y), f(pos.z), component, isDirectionRel, isForceRel, p8);
1032
1296
  }
1033
1297
 
1034
1298
  /**
1035
- * @param team
1036
- * @param playerPedToIgnore
1037
- * @param flags
1299
+ * Old name: _GET_ENTITY_CAN_BE_DAMAGED
1300
+ *
1038
1301
  * @returns
1039
1302
  */
1040
- getNearestPlayerToOnTeam(team: number, playerPedToIgnore: Ped, flags: number): Player | null {
1041
- return createFromHandle<Player>('Player', inv<number>('0xB2C30C3B4AFF718C', this.handle, team, playerPedToIgnore.handle, flags, rai()));
1303
+ get CanBeDamaged(): any {
1304
+ return inv<number>('0x75DF9E73F2F005FD', this.handle);
1042
1305
  }
1043
1306
 
1044
1307
  /**
@@ -1217,226 +1480,110 @@ export class Entity implements IHandle {
1217
1480
  }
1218
1481
 
1219
1482
  /**
1220
- * @param flagId Refer to [enum: eCarryingFlags]
1221
- * @param value
1222
- */
1223
- setCarryingFlag(flagId: eCarryingFlags, value: boolean): void {
1224
- inv<void>('0x18FF3110CF47115D', this.handle, flagId, value);
1225
- }
1226
-
1227
- /**
1228
- * @returns
1229
- */
1230
- get IsPredator(): any {
1231
- return inv<number>('0x5594AFE9DE0C01B7', this.handle);
1232
- }
1233
-
1234
- /**
1235
- * enum eCarriableState
1236
- * {
1237
- * CARRIABLE_STATE_NONE,
1238
- * CARRIABLE_STATE_TRANSITIONING_TO_HOGTIED,
1239
- * CARRIABLE_STATE_CARRIABLE_INTRO,
1240
- * CARRIABLE_STATE_CARRIABLE,
1241
- * CARRIABLE_STATE_BEING_PICKED_UP_FROM_GROUND,
1242
- * CARRIABLE_STATE_CARRIED_BY_HUMAN,
1243
- * CARRIABLE_STATE_BEING_PLACED_ON_GROUND,
1244
- * CARRIABLE_STATE_CARRIED_BY_MOUNT,
1245
- * CARRIABLE_STATE_BEING_PLACED_ON_MOUNT,
1246
- * CARRIABLE_STATE_BEING_PICKED_UP_FROM_MOUNT,
1247
- * CARRIABLE_STATE_BEING_CUT_FREE,
1248
- * CARRIABLE_STATE_BEING_PLACED_ON_GROUND_ESCAPE,
1249
- * CARRIABLE_STATE_BEING_PLACED_IN_VEHICLE
1250
- * };
1251
- *
1252
- * @returns
1253
- */
1254
- get CarriableState(): number {
1255
- return inv<number>('0x61914209C36EFDDB', this.handle, rai());
1256
- }
1257
-
1258
- /**
1259
- * @param value
1260
- */
1261
- set MaxHealth(value: number) {
1262
- inv<void>('0x166E7CF68597D8B5', this.handle, value);
1263
- }
1264
-
1265
- /**
1266
- * Params: p1 (probably animType) = 1, 0
1267
- *
1268
- * @param p1
1269
- * @returns
1270
- */
1271
- isPlayingAnyAnim(p1: number): boolean {
1272
- return !!inv<boolean>('0x0B7CB1300CBFE19C', this.handle, p1, rai());
1273
- }
1274
-
1275
- /**
1276
- * @param enabled
1277
- */
1278
- set LightsEnabled(enabled: boolean) {
1279
- inv<void>('0xEBDC12861D079ABA', this.handle, enabled);
1280
- }
1281
-
1282
- /**
1283
- * Offset values are relative to the entity. x = left/right
1284
- * y = forward/backward
1285
- * z = up/down
1286
- *
1287
- * @param offset
1288
- * @returns
1289
- */
1290
- getOffsetFromInWorldCoords(offset: Vector3): Vector3 {
1291
- return Vector3.fromArray(inv<number[]>('0x1899F328B0E12848', this.handle, f(offset.x), f(offset.y), f(offset.z), rav()));
1292
- }
1293
-
1294
- /**
1295
- * 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
1296
- *
1297
- * @param entity2
1298
- * @param xSize
1299
- * @param ySize
1300
- * @param zSize
1301
- * @param p5
1302
- * @param p6
1303
- * @param p7
1304
- * @returns
1305
- */
1306
- isAtEntity(entity2: Entity, xSize: number, ySize: number, zSize: number, p5: boolean, p6: boolean, p7: number): boolean {
1307
- return !!inv<boolean>('0xC057F02B837A27F6', this.handle, entity2.handle, f(xSize), f(ySize), f(zSize), p5, p6, p7, rai());
1308
- }
1309
-
1310
- /**
1311
- * @param toggle
1312
- */
1313
- set Visible(toggle: boolean) {
1314
- inv<void>('0x1794B4FCC84D812F', this.handle, toggle);
1315
- }
1316
-
1317
- /**
1318
- * Old name: _SET_ENTITY_CLEANUP_BY_ENGINE
1319
- *
1320
- * @param toggle
1321
- */
1322
- set ShouldFreezeWaitingOnCollision(toggle: boolean) {
1323
- inv<void>('0x740CB4F3F602C9F4', this.handle, toggle);
1324
- }
1325
-
1326
- /**
1327
- * Note: this native was removed in 1232 but added back in 1311
1328
- * Old name: _GET_ENTITY_PROOFS
1329
- *
1330
- * @returns
1483
+ * @param flagId Refer to [enum: eCarryingFlags]
1484
+ * @param value
1331
1485
  */
1332
- get Proofs(): number {
1333
- return inv<number>('0x6CF0DAD7FA1088EA', this.handle, rai());
1486
+ setCarryingFlag(flagId: eCarryingFlags, value: boolean): void {
1487
+ inv<void>('0x18FF3110CF47115D', this.handle, flagId, value);
1334
1488
  }
1335
1489
 
1336
1490
  /**
1337
- * skin - everything alpha except skin
1338
- * Set entity alpha level. Ranging from 0 to 255 but changes occur after every 20 percent (after every 51).
1339
- *
1340
- * @param alphaLevel
1341
- * @param skin
1491
+ * @returns
1342
1492
  */
1343
- setAlpha(alphaLevel: number, skin: boolean): void {
1344
- inv<void>('0x0DF7692B1D9E7BA7', this.handle, alphaLevel, skin);
1493
+ get IsPredator(): any {
1494
+ return inv<number>('0x5594AFE9DE0C01B7', this.handle);
1345
1495
  }
1346
1496
 
1347
1497
  /**
1498
+ * Returns entityType: https://github.com/Halen84/RDR3-Native-Flags-And-Enums/tree/main/eEntityType
1499
+ *
1348
1500
  * @returns
1349
1501
  */
1350
- get ThreatTier(): number {
1351
- return inv<number>('0xE12F56CB25D9CE23', this.handle, rai());
1502
+ get Type(): number {
1503
+ return inv<number>('0x97F696ACA466B4E0', this.handle, rai());
1352
1504
  }
1353
1505
 
1354
1506
  /**
1355
- * @param p1
1507
+ * @returns
1356
1508
  */
1357
- N_0xA48E4801DEBDF7E4(p1: boolean): void {
1358
- inv<void>('0xA48E4801DEBDF7E4', this.handle, p1);
1509
+ get IsOwnedByPersistenceSystem(): any {
1510
+ return inv<number>('0xA7E51B53309EAC97', this.handle);
1359
1511
  }
1360
1512
 
1361
1513
  /**
1362
- * @param toggle
1363
- * @param keepPhysics
1514
+ * @param animDict
1515
+ * @param animName
1516
+ * @param animType
1517
+ * @returns
1364
1518
  */
1365
- setCompletelyDisableCollision(toggle: boolean, keepPhysics: boolean): void {
1366
- inv<void>('0xE0580EC84813875A', this.handle, toggle, keepPhysics);
1519
+ isPlayingAnim(animDict: string | null, animName: string | null, animType: number): boolean {
1520
+ return !!inv<boolean>('0xDEE49D5CA6C49148', this.handle, animDict, animName, animType, rai());
1367
1521
  }
1368
1522
 
1369
1523
  /**
1370
- * @param p1
1524
+ * Marks the specified entity (ped, vehicle or object) as no longer needed, allowing the game engine to delete it whenever it sees fit.
1371
1525
  */
1372
- N_0xCDB682BB47C02F0A(p1: string | number): void {
1373
- inv<void>('0xCDB682BB47C02F0A', this.handle, _h(p1));
1526
+ setAsNoLongerNeeded(): void {
1527
+ inv<void>('0x4971D2F8162B9674', this.handle);
1374
1528
  }
1375
1529
 
1376
1530
  /**
1377
- * @param volume
1378
- * @param p2
1379
- * @param p3
1380
1531
  * @returns
1381
1532
  */
1382
- isInVolume(volume: number, p2: boolean, p3: number): boolean {
1383
- return !!inv<boolean>('0x5A5526BC09C06623', this.handle, volume, p2, p3, rai());
1533
+ hasBeenDamagedByAnyVehicle(): boolean {
1534
+ return !!inv<boolean>('0x695D7C26DE65C423', this.handle, rai());
1384
1535
  }
1385
1536
 
1386
1537
  /**
1387
- * @returns rightVector; forwardVector; upVector; position
1538
+ * @param animDict
1539
+ * @param animName
1540
+ * @param speedMultiplier
1388
1541
  */
1389
- get Matrix(): [Vector3, Vector3, Vector3, Vector3] {
1390
- const result = inv<[number[], number[], number[], number[]]>('0x3A9B1120AF13FBF2', this.handle, pvv(), pvv(), pvv(), pvv());
1391
- return [Vector3.fromArray(result[0]), Vector3.fromArray(result[1]), Vector3.fromArray(result[2]), Vector3.fromArray(result[3])];
1542
+ setAnimSpeed(animDict: string | null, animName: string | null, speedMultiplier: number): void {
1543
+ inv<void>('0xEAA885BA3CEA4E4A', this.handle, animDict, animName, f(speedMultiplier));
1392
1544
  }
1393
1545
 
1394
- /**
1395
- * 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.
1396
- */
1397
- N_0x371D179701D9C082(): void {
1398
- inv<void>('0x371D179701D9C082', this.handle);
1546
+ unpinMapEntity(): void {
1547
+ inv<void>('0xD2B9C78537ED5759', this.handle);
1399
1548
  }
1400
1549
 
1401
1550
  /**
1402
- * @param p1
1551
+ * Get how much of the entity is submerged. 1.0f is whole entity.
1552
+ *
1403
1553
  * @returns
1404
1554
  */
1405
- getMaxHealth(p1: boolean): number {
1406
- return inv<number>('0x15D757606D170C3C', this.handle, p1, rai());
1555
+ get SubmergedLevel(): number {
1556
+ return inv<number>('0x4A77C3F73FD9E831', this.handle, raf());
1407
1557
  }
1408
1558
 
1409
1559
  /**
1410
- * @param animDict
1411
- * @param animName
1412
- * @param time
1560
+ * @returns
1413
1561
  */
1414
- setAnimCurrentTime(animDict: string | null, animName: string | null, time: number): void {
1415
- inv<void>('0x11CDABDC7783B2BC', this.handle, animDict, animName, f(time));
1562
+ get IsAttached(): boolean {
1563
+ return !!inv<boolean>('0xEE6AD63ABF59C0B7', this.handle, rai());
1416
1564
  }
1417
1565
 
1418
1566
  /**
1419
- * Gets the current coordinates for a specified entity.
1420
- * `entity` = The entity to get the coordinates from.
1421
- * `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.
1567
+ * SET_ENTITY_A*
1422
1568
  *
1423
- * @param alive
1424
- * @param realCoords
1425
- * @returns
1569
+ * @param p1
1426
1570
  */
1427
- getCoords(alive?: boolean, realCoords?: boolean): Vector3 {
1428
- return Vector3.fromArray(inv<number[]>('0xA86D5F069399F44D', this.handle, alive, realCoords, rav()));
1571
+ N_0xC0EDEF16D90661EE(p1: number): void {
1572
+ inv<void>('0xC0EDEF16D90661EE', this.handle, f(p1));
1429
1573
  }
1430
1574
 
1431
- get Coords(): Vector3 {
1432
- return this.getCoords();
1575
+ /**
1576
+ * @param looted
1577
+ */
1578
+ set FullyLooted(looted: boolean) {
1579
+ inv<void>('0x6BCF5F3D8FFE988D', this.handle, looted);
1433
1580
  }
1434
1581
 
1435
1582
  /**
1436
1583
  * @returns
1437
1584
  */
1438
- get IsAnObject(): boolean {
1439
- return !!inv<boolean>('0x0A27A546A375FDEF', this.handle, rai());
1585
+ get IsAttachedToAnyVehicle(): boolean {
1586
+ return !!inv<boolean>('0x12DF6E0D2E736749', this.handle, rai());
1440
1587
  }
1441
1588
 
1442
1589
  /**
@@ -1538,159 +1685,12 @@ export class Entity implements IHandle {
1538
1685
  return inv<number>('0x96C638784DB4C815', this.handle, raf());
1539
1686
  }
1540
1687
 
1541
- /**
1542
- * 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).
1543
- *
1544
- * @param value
1545
- */
1546
- set LodDist(value: number) {
1547
- inv<void>('0x5FB407F0A7C877BF', this.handle, value);
1548
- }
1549
-
1550
- /**
1551
- * @param toggle
1552
- */
1553
- set Dynamic(toggle: boolean) {
1554
- inv<void>('0xFBFC4473F66CE344', this.handle, toggle);
1555
- }
1556
-
1557
- /**
1558
- * @param radius
1559
- */
1560
- set CustomPickupRadius(radius: number) {
1561
- inv<void>('0x482D17E45665DA44', this.handle, f(radius));
1562
- }
1563
-
1564
- /**
1565
- * @returns
1566
- */
1567
- get PopulationType(): number {
1568
- return inv<number>('0xADE28862B6D7B85B', this.handle, rai());
1569
- }
1570
-
1571
- /**
1572
- * @returns
1573
- */
1574
- get IsAVehicle(): boolean {
1575
- return !!inv<boolean>('0xC3D96AF45FCCEC4C', this.handle, rai());
1576
- }
1577
-
1578
- /**
1579
- * @param pos
1580
- * @param atTop
1581
- * @param inWorldCoords
1582
- * @returns
1583
- */
1584
- getHeight(pos: Vector3, atTop: boolean, inWorldCoords: boolean): number {
1585
- return inv<number>('0x296DEBC84474B375', this.handle, f(pos.x), f(pos.y), f(pos.z), atTop, inWorldCoords, raf());
1586
- }
1587
-
1588
- /**
1589
- * @param pos
1590
- * @returns
1591
- */
1592
- getOffsetFromGivenWorldCoords(pos: Vector3): Vector3 {
1593
- return Vector3.fromArray(inv<number[]>('0x497C6B1A2C9AE69C', this.handle, f(pos.x), f(pos.y), f(pos.z), rav()));
1594
- }
1595
-
1596
- addTrackingTrails(): void {
1597
- inv<void>('0x1AD922AB5038DEF3', this.handle);
1598
- }
1599
-
1600
- /**
1601
- * @param toggle
1602
- */
1603
- set CanClimbOnEntity(toggle: boolean) {
1604
- inv<void>('0x24AED2A608F93C4C', this.handle, toggle);
1605
- }
1606
-
1607
- /**
1608
- * @returns minimum; maximum
1609
- */
1610
- get WorldPositionOfDimensions(): [Vector3, Vector3] {
1611
- const result = inv<[number[], number[]]>('0xF3FDA9A617A15145', this.handle, pvv(), pvv());
1612
- return [Vector3.fromArray(result[0]), Vector3.fromArray(result[1])];
1613
- }
1614
-
1615
- /**
1616
- * @param p1
1617
- * @returns
1618
- */
1619
- isUnderwater(p1: boolean): any {
1620
- return inv<number>('0xD4E5C1E93C466127', this.handle, p1);
1621
- }
1622
-
1623
- /**
1624
- * @param animation
1625
- * @param animGroup
1626
- * @param p3
1627
- * @returns
1628
- */
1629
- stopAnim(animation: string | null, animGroup: string | null, p3: number): any {
1630
- return inv<number>('0x786591D986DE9159', this.handle, animation, animGroup, f(p3));
1631
- }
1632
-
1633
- /**
1634
- * @returns
1635
- */
1636
- hasCollidedWithAnything(): boolean {
1637
- return !!inv<boolean>('0xDF18751EC74F90FF', this.handle, rai());
1638
- }
1639
-
1640
- /**
1641
- * Simply returns whatever is passed to it (Regardless of whether the handle is valid or not).
1642
- *
1643
- * @returns
1644
- */
1645
- get VehicleIndexFromIndex(): Vehicle | null {
1646
- return createFromHandle<Vehicle>('Vehicle', inv<number>('0xDF1E5AAC561AFC59', this.handle, rai()));
1647
- }
1648
-
1649
- /**
1650
- * @returns
1651
- */
1652
- get IsVisible(): boolean {
1653
- return !!inv<boolean>('0xFFC96ECB7FA404CA', this.handle, rai());
1654
- }
1655
-
1656
- /**
1657
- * SET_ENTITY_LO*
1658
- *
1659
- * @param toggle
1660
- */
1661
- N_0xFF9965C47FA404DA(toggle: boolean): void {
1662
- inv<void>('0xFF9965C47FA404DA', this.handle, toggle);
1663
- }
1664
-
1665
- /**
1666
- * Valid indices: 0 - 3
1667
- * Index 1 always returns a `hogtied` config, doesn't matter the entity.
1668
- * It's for humans only and the ped must be resurrected first if it's dead.
1669
- *
1670
- * @param index
1671
- * @returns
1672
- */
1673
- getOptimalCarryConfig(index: number): number {
1674
- return (inv<number>('0x34F008A7E48C496B', this.handle, index, rai())) & 0xFFFFFFFF;
1675
- }
1676
-
1677
- setFadeIn(): void {
1678
- inv<void>('0xA91E6CF94404E8C9', this.handle);
1679
- }
1680
-
1681
- /**
1682
- * @returns
1683
- */
1684
- hasBeenDamagedByAnyPed(): boolean {
1685
- return !!inv<boolean>('0x9934E9C42D52D87E', this.handle, rai());
1686
- }
1687
-
1688
1688
 
1689
1689
  /**
1690
1690
  * Gets the network ID of this entity for network synchronization.
1691
1691
  */
1692
1692
  get NetworkId(): number {
1693
- return inv<number>('0xF260AF6F43953316', this.handle, rai());
1693
+ return inv<number>('0xA11700682F3AD45C', this.handle, rai());
1694
1694
  }
1695
1695
  }
1696
1696