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