@nativewrappers/redm-codegen 0.0.3 → 0.0.5

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 (313) hide show
  1. package/dist/classes/AnimScene.d.ts +135 -135
  2. package/dist/classes/AnimScene.d.ts.map +1 -1
  3. package/dist/classes/AnimScene.js +208 -208
  4. package/dist/classes/BaseModel.d.ts +21 -21
  5. package/dist/classes/BaseModel.d.ts.map +1 -1
  6. package/dist/classes/BaseModel.js +33 -33
  7. package/dist/classes/BaseTask.d.ts +23 -23
  8. package/dist/classes/BaseTask.d.ts.map +1 -1
  9. package/dist/classes/BaseTask.js +27 -27
  10. package/dist/classes/Cam.d.ts +98 -98
  11. package/dist/classes/Cam.d.ts.map +1 -1
  12. package/dist/classes/Cam.js +134 -134
  13. package/dist/classes/Entity.d.ts +385 -380
  14. package/dist/classes/Entity.d.ts.map +1 -1
  15. package/dist/classes/Entity.js +498 -489
  16. package/dist/classes/Interior.d.ts +5 -5
  17. package/dist/classes/Interior.d.ts.map +1 -1
  18. package/dist/classes/Interior.js +8 -8
  19. package/dist/classes/ItemSet.d.ts +2 -2
  20. package/dist/classes/ItemSet.d.ts.map +1 -1
  21. package/dist/classes/ItemSet.js +3 -3
  22. package/dist/classes/Ped.d.ts +336 -336
  23. package/dist/classes/Ped.d.ts.map +1 -1
  24. package/dist/classes/Ped.js +495 -495
  25. package/dist/classes/PedModel.d.ts +1 -1
  26. package/dist/classes/PedModel.d.ts.map +1 -1
  27. package/dist/classes/PedModel.js +2 -2
  28. package/dist/classes/PedTask.d.ts +255 -255
  29. package/dist/classes/PedTask.d.ts.map +1 -1
  30. package/dist/classes/PedTask.js +345 -345
  31. package/dist/classes/PersChar.d.ts +13 -13
  32. package/dist/classes/PersChar.d.ts.map +1 -1
  33. package/dist/classes/PersChar.js +29 -29
  34. package/dist/classes/Pickup.d.ts +8 -8
  35. package/dist/classes/Pickup.d.ts.map +1 -1
  36. package/dist/classes/Pickup.js +15 -15
  37. package/dist/classes/Player.d.ts +713 -709
  38. package/dist/classes/Player.d.ts.map +1 -1
  39. package/dist/classes/Player.js +979 -973
  40. package/dist/classes/Prop.d.ts +115 -115
  41. package/dist/classes/Prop.d.ts.map +1 -1
  42. package/dist/classes/Prop.js +160 -160
  43. package/dist/classes/PropSet.d.ts +5 -5
  44. package/dist/classes/PropSet.d.ts.map +1 -1
  45. package/dist/classes/PropSet.js +6 -6
  46. package/dist/classes/Vehicle.d.ts +122 -122
  47. package/dist/classes/Vehicle.d.ts.map +1 -1
  48. package/dist/classes/Vehicle.js +147 -147
  49. package/dist/classes/VehicleModel.d.ts +1 -1
  50. package/dist/classes/VehicleModel.d.ts.map +1 -1
  51. package/dist/classes/VehicleModel.js +2 -2
  52. package/dist/classes/VehicleTask.d.ts +9 -9
  53. package/dist/classes/VehicleTask.d.ts.map +1 -1
  54. package/dist/classes/VehicleTask.js +12 -12
  55. package/dist/classes/Volume.d.ts +56 -56
  56. package/dist/classes/Volume.d.ts.map +1 -1
  57. package/dist/classes/Volume.js +84 -84
  58. package/dist/classes/Weapon.d.ts +354 -354
  59. package/dist/classes/Weapon.d.ts.map +1 -1
  60. package/dist/classes/Weapon.js +464 -464
  61. package/dist/namespaces/Aicoverpoint.d.ts +23 -23
  62. package/dist/namespaces/Aicoverpoint.d.ts.map +1 -1
  63. package/dist/namespaces/Aicoverpoint.js +35 -35
  64. package/dist/namespaces/Aitransport.d.ts +78 -78
  65. package/dist/namespaces/Aitransport.d.ts.map +1 -1
  66. package/dist/namespaces/Aitransport.js +95 -95
  67. package/dist/namespaces/Animscene.d.ts +49 -49
  68. package/dist/namespaces/Animscene.d.ts.map +1 -1
  69. package/dist/namespaces/Animscene.js +67 -67
  70. package/dist/namespaces/Audio.d.ts +447 -447
  71. package/dist/namespaces/Audio.d.ts.map +1 -1
  72. package/dist/namespaces/Audio.js +635 -635
  73. package/dist/namespaces/CamStatics.d.ts +441 -441
  74. package/dist/namespaces/CamStatics.d.ts.map +1 -1
  75. package/dist/namespaces/CamStatics.js +675 -675
  76. package/dist/namespaces/Collection.d.ts +6 -6
  77. package/dist/namespaces/Collection.d.ts.map +1 -1
  78. package/dist/namespaces/Collection.js +11 -11
  79. package/dist/namespaces/Companion.d.ts +22 -22
  80. package/dist/namespaces/Companion.d.ts.map +1 -1
  81. package/dist/namespaces/Companion.js +30 -30
  82. package/dist/namespaces/Compapp.js +1 -1
  83. package/dist/namespaces/Compendium.d.ts +82 -82
  84. package/dist/namespaces/Compendium.d.ts.map +1 -1
  85. package/dist/namespaces/Compendium.js +115 -115
  86. package/dist/namespaces/Crashlog.js +9 -9
  87. package/dist/namespaces/Crew.js +4 -4
  88. package/dist/namespaces/Databinding.d.ts +164 -164
  89. package/dist/namespaces/Databinding.d.ts.map +1 -1
  90. package/dist/namespaces/Databinding.js +232 -232
  91. package/dist/namespaces/Datafile.js +4 -4
  92. package/dist/namespaces/Decorator.d.ts +19 -19
  93. package/dist/namespaces/Decorator.d.ts.map +1 -1
  94. package/dist/namespaces/Decorator.js +34 -34
  95. package/dist/namespaces/Dlc.d.ts +5 -5
  96. package/dist/namespaces/Dlc.d.ts.map +1 -1
  97. package/dist/namespaces/Dlc.js +9 -9
  98. package/dist/namespaces/EntityStatics.d.ts +119 -119
  99. package/dist/namespaces/EntityStatics.d.ts.map +1 -1
  100. package/dist/namespaces/EntityStatics.js +164 -164
  101. package/dist/namespaces/Event.js +4 -4
  102. package/dist/namespaces/Fire.d.ts +89 -89
  103. package/dist/namespaces/Fire.d.ts.map +1 -1
  104. package/dist/namespaces/Fire.js +115 -115
  105. package/dist/namespaces/Flock.js +2 -2
  106. package/dist/namespaces/Gang.js +2 -2
  107. package/dist/namespaces/GoogleAnalytics.js +2 -2
  108. package/dist/namespaces/Graphics.d.ts +375 -375
  109. package/dist/namespaces/Graphics.d.ts.map +1 -1
  110. package/dist/namespaces/Graphics.js +569 -569
  111. package/dist/namespaces/Hud.d.ts +507 -507
  112. package/dist/namespaces/Hud.d.ts.map +1 -1
  113. package/dist/namespaces/Hud.js +706 -706
  114. package/dist/namespaces/Ik.js +1 -1
  115. package/dist/namespaces/Interaction.js +3 -3
  116. package/dist/namespaces/InteriorStatics.js +2 -2
  117. package/dist/namespaces/Inventory.d.ts +159 -159
  118. package/dist/namespaces/Inventory.d.ts.map +1 -1
  119. package/dist/namespaces/Inventory.js +214 -214
  120. package/dist/namespaces/Itemdatabase.d.ts +5 -5
  121. package/dist/namespaces/Itemdatabase.d.ts.map +1 -1
  122. package/dist/namespaces/Itemdatabase.js +10 -10
  123. package/dist/namespaces/Itemset.js +2 -2
  124. package/dist/namespaces/Law.d.ts +1 -1
  125. package/dist/namespaces/Law.d.ts.map +1 -1
  126. package/dist/namespaces/Law.js +19 -19
  127. package/dist/namespaces/Localization.js +1 -1
  128. package/dist/namespaces/Map.d.ts +173 -173
  129. package/dist/namespaces/Map.d.ts.map +1 -1
  130. package/dist/namespaces/Map.js +240 -240
  131. package/dist/namespaces/Minigame.d.ts +17 -17
  132. package/dist/namespaces/Minigame.d.ts.map +1 -1
  133. package/dist/namespaces/Minigame.js +25 -25
  134. package/dist/namespaces/Misc.d.ts +3 -3
  135. package/dist/namespaces/Misc.d.ts.map +1 -1
  136. package/dist/namespaces/Misc.js +35 -35
  137. package/dist/namespaces/Missiondata.d.ts +15 -15
  138. package/dist/namespaces/Missiondata.d.ts.map +1 -1
  139. package/dist/namespaces/Missiondata.js +24 -24
  140. package/dist/namespaces/Money.js +3 -3
  141. package/dist/namespaces/Netshopping.d.ts +58 -58
  142. package/dist/namespaces/Netshopping.d.ts.map +1 -1
  143. package/dist/namespaces/Netshopping.js +89 -89
  144. package/dist/namespaces/Network.d.ts +694 -694
  145. package/dist/namespaces/Network.d.ts.map +1 -1
  146. package/dist/namespaces/Network.js +1129 -1129
  147. package/dist/namespaces/Object.d.ts +142 -142
  148. package/dist/namespaces/Object.d.ts.map +1 -1
  149. package/dist/namespaces/Object.js +195 -195
  150. package/dist/namespaces/Pad.d.ts +101 -101
  151. package/dist/namespaces/Pad.d.ts.map +1 -1
  152. package/dist/namespaces/Pad.js +142 -142
  153. package/dist/namespaces/Pathfind.js +10 -10
  154. package/dist/namespaces/PedStatics.d.ts +20 -20
  155. package/dist/namespaces/PedStatics.d.ts.map +1 -1
  156. package/dist/namespaces/PedStatics.js +36 -36
  157. package/dist/namespaces/Perschar.d.ts +49 -49
  158. package/dist/namespaces/Perschar.d.ts.map +1 -1
  159. package/dist/namespaces/Perschar.js +76 -76
  160. package/dist/namespaces/Physics.d.ts +89 -89
  161. package/dist/namespaces/Physics.d.ts.map +1 -1
  162. package/dist/namespaces/Physics.js +125 -125
  163. package/dist/namespaces/PlayerStatics.d.ts +139 -139
  164. package/dist/namespaces/PlayerStatics.d.ts.map +1 -1
  165. package/dist/namespaces/PlayerStatics.js +200 -200
  166. package/dist/namespaces/Population.d.ts +75 -75
  167. package/dist/namespaces/Population.d.ts.map +1 -1
  168. package/dist/namespaces/Population.js +101 -101
  169. package/dist/namespaces/Posse.d.ts +54 -54
  170. package/dist/namespaces/Posse.d.ts.map +1 -1
  171. package/dist/namespaces/Posse.js +86 -86
  172. package/dist/namespaces/Replay.d.ts +1 -1
  173. package/dist/namespaces/Replay.d.ts.map +1 -1
  174. package/dist/namespaces/Replay.js +2 -2
  175. package/dist/namespaces/Scripts.d.ts +1 -1
  176. package/dist/namespaces/Scripts.d.ts.map +1 -1
  177. package/dist/namespaces/Scripts.js +12 -12
  178. package/dist/namespaces/Socialclub.js +8 -8
  179. package/dist/namespaces/Socialclubfeed.js +1 -1
  180. package/dist/namespaces/Spactionproxy.js +4 -4
  181. package/dist/namespaces/Stats.d.ts +197 -197
  182. package/dist/namespaces/Stats.d.ts.map +1 -1
  183. package/dist/namespaces/Stats.js +285 -285
  184. package/dist/namespaces/Streaming.d.ts +46 -46
  185. package/dist/namespaces/Streaming.d.ts.map +1 -1
  186. package/dist/namespaces/Streaming.js +79 -79
  187. package/dist/namespaces/Task.d.ts +138 -138
  188. package/dist/namespaces/Task.d.ts.map +1 -1
  189. package/dist/namespaces/Task.js +204 -204
  190. package/dist/namespaces/Telemetry.d.ts +212 -212
  191. package/dist/namespaces/Telemetry.d.ts.map +1 -1
  192. package/dist/namespaces/Telemetry.js +308 -308
  193. package/dist/namespaces/Txd.js +1 -1
  194. package/dist/namespaces/Uiapps.d.ts +25 -25
  195. package/dist/namespaces/Uiapps.d.ts.map +1 -1
  196. package/dist/namespaces/Uiapps.js +36 -36
  197. package/dist/namespaces/Uievents.js +1 -1
  198. package/dist/namespaces/Uifeed.d.ts +15 -15
  199. package/dist/namespaces/Uifeed.d.ts.map +1 -1
  200. package/dist/namespaces/Uifeed.js +25 -25
  201. package/dist/namespaces/Uistickyfeed.d.ts +16 -16
  202. package/dist/namespaces/Uistickyfeed.d.ts.map +1 -1
  203. package/dist/namespaces/Uistickyfeed.js +21 -21
  204. package/dist/namespaces/Unlock.js +5 -5
  205. package/dist/namespaces/VehicleStatics.js +12 -12
  206. package/dist/namespaces/Voice.d.ts +38 -38
  207. package/dist/namespaces/Voice.d.ts.map +1 -1
  208. package/dist/namespaces/Voice.js +61 -61
  209. package/dist/namespaces/VolumeStatics.d.ts +161 -161
  210. package/dist/namespaces/VolumeStatics.d.ts.map +1 -1
  211. package/dist/namespaces/VolumeStatics.js +217 -217
  212. package/dist/namespaces/Water.d.ts +27 -27
  213. package/dist/namespaces/Water.d.ts.map +1 -1
  214. package/dist/namespaces/Water.js +41 -41
  215. package/dist/namespaces/WeaponStatics.d.ts +274 -274
  216. package/dist/namespaces/WeaponStatics.d.ts.map +1 -1
  217. package/dist/namespaces/WeaponStatics.js +390 -390
  218. package/dist/namespaces/Zone.d.ts +7 -7
  219. package/dist/namespaces/Zone.d.ts.map +1 -1
  220. package/dist/namespaces/Zone.js +9 -9
  221. package/dist/types/NativeAliases.d.ts +3 -1
  222. package/dist/types/NativeAliases.d.ts.map +1 -1
  223. package/dist/types/NativeAliases.js +3 -1
  224. package/package.json +1 -1
  225. package/src/classes/AnimScene.ts +227 -227
  226. package/src/classes/BaseModel.ts +36 -36
  227. package/src/classes/BaseTask.ts +29 -29
  228. package/src/classes/Cam.ts +143 -143
  229. package/src/classes/Entity.ts +517 -506
  230. package/src/classes/Interior.ts +8 -8
  231. package/src/classes/ItemSet.ts +3 -3
  232. package/src/classes/Ped.ts +512 -512
  233. package/src/classes/PedModel.ts +2 -2
  234. package/src/classes/PedTask.ts +429 -429
  235. package/src/classes/PersChar.ts +35 -35
  236. package/src/classes/Pickup.ts +16 -16
  237. package/src/classes/Player.ts +995 -988
  238. package/src/classes/Prop.ts +177 -177
  239. package/src/classes/PropSet.ts +6 -6
  240. package/src/classes/Vehicle.ts +147 -147
  241. package/src/classes/VehicleModel.ts +2 -2
  242. package/src/classes/VehicleTask.ts +13 -13
  243. package/src/classes/Volume.ts +91 -91
  244. package/src/classes/Weapon.ts +489 -489
  245. package/src/namespaces/Aicoverpoint.ts +40 -40
  246. package/src/namespaces/Aitransport.ts +104 -104
  247. package/src/namespaces/Animscene.ts +74 -74
  248. package/src/namespaces/Audio.ts +647 -647
  249. package/src/namespaces/CamStatics.ts +768 -768
  250. package/src/namespaces/Collection.ts +12 -12
  251. package/src/namespaces/Companion.ts +34 -34
  252. package/src/namespaces/Compapp.ts +1 -1
  253. package/src/namespaces/Compendium.ts +120 -120
  254. package/src/namespaces/Crashlog.ts +9 -9
  255. package/src/namespaces/Crew.ts +4 -4
  256. package/src/namespaces/Databinding.ts +249 -249
  257. package/src/namespaces/Datafile.ts +4 -4
  258. package/src/namespaces/Decorator.ts +37 -37
  259. package/src/namespaces/Dlc.ts +9 -9
  260. package/src/namespaces/EntityStatics.ts +172 -172
  261. package/src/namespaces/Event.ts +4 -4
  262. package/src/namespaces/Fire.ts +127 -127
  263. package/src/namespaces/Flock.ts +2 -2
  264. package/src/namespaces/Gang.ts +2 -2
  265. package/src/namespaces/GoogleAnalytics.ts +2 -2
  266. package/src/namespaces/Graphics.ts +583 -583
  267. package/src/namespaces/Hud.ts +741 -741
  268. package/src/namespaces/Ik.ts +1 -1
  269. package/src/namespaces/Interaction.ts +3 -3
  270. package/src/namespaces/InteriorStatics.ts +2 -2
  271. package/src/namespaces/Inventory.ts +236 -236
  272. package/src/namespaces/Itemdatabase.ts +11 -11
  273. package/src/namespaces/Itemset.ts +2 -2
  274. package/src/namespaces/Law.ts +20 -20
  275. package/src/namespaces/Localization.ts +1 -1
  276. package/src/namespaces/Map.ts +256 -256
  277. package/src/namespaces/Minigame.ts +29 -29
  278. package/src/namespaces/Misc.ts +38 -38
  279. package/src/namespaces/Missiondata.ts +28 -28
  280. package/src/namespaces/Money.ts +3 -3
  281. package/src/namespaces/Netshopping.ts +99 -99
  282. package/src/namespaces/Network.ts +1165 -1165
  283. package/src/namespaces/Object.ts +214 -214
  284. package/src/namespaces/Pad.ts +150 -150
  285. package/src/namespaces/Pathfind.ts +10 -10
  286. package/src/namespaces/PedStatics.ts +42 -42
  287. package/src/namespaces/Perschar.ts +78 -78
  288. package/src/namespaces/Physics.ts +141 -141
  289. package/src/namespaces/PlayerStatics.ts +228 -228
  290. package/src/namespaces/Population.ts +114 -114
  291. package/src/namespaces/Posse.ts +87 -87
  292. package/src/namespaces/Replay.ts +3 -3
  293. package/src/namespaces/Scripts.ts +13 -13
  294. package/src/namespaces/Socialclub.ts +8 -8
  295. package/src/namespaces/Socialclubfeed.ts +1 -1
  296. package/src/namespaces/Spactionproxy.ts +4 -4
  297. package/src/namespaces/Stats.ts +293 -293
  298. package/src/namespaces/Streaming.ts +93 -93
  299. package/src/namespaces/Task.ts +228 -228
  300. package/src/namespaces/Telemetry.ts +322 -322
  301. package/src/namespaces/Txd.ts +1 -1
  302. package/src/namespaces/Uiapps.ts +43 -43
  303. package/src/namespaces/Uievents.ts +1 -1
  304. package/src/namespaces/Uifeed.ts +28 -28
  305. package/src/namespaces/Uistickyfeed.ts +23 -23
  306. package/src/namespaces/Unlock.ts +5 -5
  307. package/src/namespaces/VehicleStatics.ts +12 -12
  308. package/src/namespaces/Voice.ts +70 -70
  309. package/src/namespaces/VolumeStatics.ts +222 -222
  310. package/src/namespaces/Water.ts +47 -47
  311. package/src/namespaces/WeaponStatics.ts +402 -402
  312. package/src/namespaces/Zone.ts +10 -10
  313. package/src/types/NativeAliases.ts +6 -1
@@ -27,7 +27,7 @@ export class Entity implements IHandle {
27
27
  /**
28
28
  * @returns
29
29
  */
30
- getIsBird(): any {
30
+ get IsBird(): any {
31
31
  return inv<number>('0xC346A546612C49A9', this.handle);
32
32
  }
33
33
 
@@ -36,7 +36,7 @@ export class Entity implements IHandle {
36
36
  *
37
37
  * @returns
38
38
  */
39
- getForwardVectorYx(): Vector3 {
39
+ get ForwardVectorYx(): Vector3 {
40
40
  return Vector3.fromArray(inv<number[]>('0x935A30AA88FB1014', this.handle, rav()));
41
41
  }
42
42
 
@@ -69,7 +69,7 @@ export class Entity implements IHandle {
69
69
  /**
70
70
  * @param toggle
71
71
  */
72
- setLoadCollisionFlag(toggle: boolean): void {
72
+ set LoadCollisionFlag(toggle: boolean) {
73
73
  inv<void>('0x9B9EE31AED48072E', this.handle, toggle);
74
74
  }
75
75
 
@@ -79,14 +79,14 @@ export class Entity implements IHandle {
79
79
  *
80
80
  * @param type
81
81
  */
82
- setCarcassType(type: string | number): void {
82
+ set CarcassType(type: string | number) {
83
83
  inv<void>('0x399657ED871B3A6C', this.handle, _h(type));
84
84
  }
85
85
 
86
86
  /**
87
87
  * @param toggle
88
88
  */
89
- setHasGravity(toggle: boolean): void {
89
+ set HasGravity(toggle: boolean) {
90
90
  inv<void>('0x0CEDB728A1083FA7', this.handle, toggle);
91
91
  }
92
92
 
@@ -105,27 +105,27 @@ export class Entity implements IHandle {
105
105
  * @returns
106
106
  */
107
107
  hasBeenDamagedByEntity(entity2: Entity, p2: boolean, p3: boolean): boolean {
108
- return inv<boolean>('0x7B6E7BEC1143AC86', this.handle, entity2.handle, p2, p3, rai());
108
+ return !!inv<boolean>('0x7B6E7BEC1143AC86', this.handle, entity2.handle, p2, p3, rai());
109
109
  }
110
110
 
111
111
  /**
112
112
  * @returns
113
113
  */
114
- isFullyLooted(): any {
114
+ get IsFullyLooted(): any {
115
115
  return inv<number>('0x8DE41E9902E85756', this.handle);
116
116
  }
117
117
 
118
118
  /**
119
119
  * @returns
120
120
  */
121
- isOccluded(): boolean {
122
- return inv<boolean>('0x140188E884645624', this.handle, rai());
121
+ get IsOccluded(): boolean {
122
+ return !!inv<boolean>('0x140188E884645624', this.handle, rai());
123
123
  }
124
124
 
125
125
  /**
126
126
  * @param toggle
127
127
  */
128
- setCanBeDamaged(toggle: boolean): void {
128
+ set CanBeDamaged(toggle: boolean) {
129
129
  inv<void>('0x0D06D522B90E861F', this.handle, toggle);
130
130
  }
131
131
 
@@ -147,200 +147,122 @@ export class Entity implements IHandle {
147
147
  /**
148
148
  * @returns
149
149
  */
150
- isDead(): boolean {
151
- return inv<boolean>('0x7D5B1F88E7504BBA', this.handle, rai());
150
+ get IsDead(): boolean {
151
+ return !!inv<boolean>('0x7D5B1F88E7504BBA', this.handle, rai());
152
152
  }
153
153
 
154
154
  /**
155
- * @param playerPedToIgnore
156
- * @param flags
155
+ * @param pos1
156
+ * @param pos2
157
+ * @param p7
158
+ * @param p8
159
+ * @param p9
157
160
  * @returns
158
161
  */
159
- getNearestPlayerToEntity(playerPedToIgnore: Ped, flags: number): Player | null {
160
- return createFromHandle<Player>('Player', inv<number>('0x990E294FC387FB88', this.handle, playerPedToIgnore.handle, flags, rai()));
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());
161
164
  }
162
165
 
163
166
  /**
164
- * Gets the Y-component of the entity's forward vector.
167
+ * Returns the coordinates of an entity-bone.
168
+ * https://github.com/femga/rdr3_discoveries/tree/master/boneNames
165
169
  *
170
+ * @param boneIndex
166
171
  * @returns
167
172
  */
168
- getForwardY(): number {
169
- return inv<number>('0x9A5C073ECBDA7EE7', this.handle, raf());
170
- }
171
-
172
- /**
173
- * @param pitch
174
- * @param roll
175
- * @param yaw
176
- * @param rotationOrder
177
- * @param p5
178
- */
179
- setRotation(pitch: number, roll: number, yaw: number, rotationOrder: number, p5: boolean): void {
180
- inv<void>('0x9CC8314DFEDE441E', this.handle, f(pitch), f(roll), f(yaw), rotationOrder, p5);
181
- }
182
-
183
- /**
184
- * @param p1
185
- * @param relationshipGroup
186
- */
187
- setOnlyDamagedByRelationshipGroup(p1: boolean, relationshipGroup: string | number): void {
188
- inv<void>('0x6C1F6AA2F0ADD104', this.handle, p1, _h(relationshipGroup));
173
+ getWorldPositionOfBone(boneIndex: number): Vector3 {
174
+ return Vector3.fromArray(inv<number[]>('0x82CFA50E34681CA5', this.handle, boneIndex, rav()));
189
175
  }
190
176
 
191
177
  /**
192
- * https://github.com/femga/rdr3_discoveries/tree/master/AI/ENTITY_PROOFS
193
- * 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
178
+ * https://github.com/femga/rdr3_discoveries/tree/master/animations
194
179
  *
195
- * @param proofsBitset
196
- * @param specialFlag
197
- */
198
- setProofs(proofsBitset: number, specialFlag: boolean): void {
199
- inv<void>('0xFAEE099C6F890BB8', this.handle, proofsBitset, specialFlag);
200
- }
201
-
202
- /**
203
- * @returns
204
- */
205
- hasCollisionLoadedAroundEntity(): boolean {
206
- return inv<boolean>('0xBEB1600952B9CF5C', this.handle, rai());
207
- }
208
-
209
- /**
210
- * @returns
211
- */
212
- getIsCarriablePelt(): any {
213
- return inv<number>('0x255B6DB4E3AD3C3E', this.handle);
214
- }
215
-
216
- /**
217
- * @param p1
180
+ * @param animName
181
+ * @param animDict
182
+ * @param p3
183
+ * @param loop
184
+ * @param stayInAnim
185
+ * @param p6
186
+ * @param delta
187
+ * @param bitset
218
188
  * @returns
219
189
  */
220
- getVelocity(p1: number): Vector3 {
221
- return Vector3.fromArray(inv<number[]>('0x4805D2B1D8CF94A9', this.handle, p1, rav()));
222
- }
223
-
224
- /**
225
- * @param toggle
226
- */
227
- setCanAutoVaultOnEntity(toggle: boolean): void {
228
- inv<void>('0x80646744FA88F9D7', this.handle, toggle);
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());
229
192
  }
230
193
 
231
194
  /**
232
- * 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.
233
- * https://github.com/femga/rdr3_discoveries/blob/master/AI/EVENTS/loot_rewards.lua
195
+ * Returns false if entity is not a ped or object.
234
196
  *
235
- * @param lootTable
236
- * @returns
237
- */
238
- scriptOverrideLootTablePermanent(lootTable: string | number): any {
239
- return inv<number>('0x8C03CD6B5E0E85E8', this.handle, _h(lootTable));
240
- }
241
-
242
- /**
243
- * @returns argStruct
197
+ * @returns lootTable
244
198
  */
245
- getScript(): [number, number] {
246
- const result = inv<[number, number]>('0x2A08A32B6D49906F', this.handle, pvi(), rai());
247
- return [result[0] & 0xFFFFFFFF, result[1]];
199
+ get ScriptOverrideLootTablePermanent(): [any, number] {
200
+ const result = inv<[number, number]>('0x1E804EA9B12030A4', this.handle, pvi());
201
+ return [result[0], result[1]];
248
202
  }
249
203
 
250
204
  /**
251
- * @param actionHash
205
+ * @param animDict
206
+ * @param animName
207
+ * @param p3
252
208
  * @returns
253
209
  */
254
- hasAnimEventFired(actionHash: string | number): boolean {
255
- return inv<boolean>('0x5851CC48405F4A07', this.handle, _h(actionHash), rai());
256
- }
257
-
258
- /**
259
- * @param p1
260
- */
261
- N_0xEF259AA1E097E0AD(p1: any): void {
262
- inv<void>('0xEF259AA1E097E0AD', this.handle, p1);
210
+ hasAnimFinished(animDict: string | null, animName: string | null, p3: number): boolean {
211
+ return !!inv<boolean>('0xAEB40615337EF1E3', this.handle, animDict, animName, p3, rai());
263
212
  }
264
213
 
265
214
  /**
266
- * Getter for FREEZE_ENTITY_POSITION
267
- *
268
- * @returns
215
+ * @param bCanBeDamaged
216
+ * @param relGroup
269
217
  */
270
- isFrozen(): any {
271
- return inv<number>('0x083D497D57B7400F', this.handle);
218
+ setCanBeDamagedByRelationshipGroup(bCanBeDamaged: boolean, relGroup: string | number): void {
219
+ inv<void>('0x0EF1AFB18649E015', this.handle, bCanBeDamaged, _h(relGroup));
272
220
  }
273
221
 
274
222
  /**
275
- * Returns the entity that is looting a ped but only while the looting is active
276
- *
277
223
  * @returns
278
224
  */
279
- getLootingPed(): Ped | null {
280
- return createFromHandle<Ped>('Ped', inv<number>('0xEF2D9ED7CE684F08', this.handle, rai()));
225
+ get UprightValue(): number {
226
+ return inv<number>('0x56398BE65160C3BE', this.handle, raf());
281
227
  }
282
228
 
283
229
  /**
284
- * @returns
230
+ * @param pos
231
+ * @param heading
232
+ * @param xAxis
233
+ * @param yAxis
234
+ * @param zAxis
285
235
  */
286
- isWaitingForWorldCollision(): boolean {
287
- return inv<boolean>('0x5E1CC2E8DC3111DD', this.handle, rai());
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);
288
238
  }
289
239
 
290
240
  /**
291
- * Gets the X-component of the entity's forward vector.
241
+ * Returns zero if the entity is not a carriable
292
242
  *
293
243
  * @returns
294
244
  */
295
- getForwardX(): number {
296
- return inv<number>('0xDB0954E9960F6457', this.handle, raf());
297
- }
298
-
299
- /**
300
- * @returns
301
- */
302
- isAPed(): boolean {
303
- return inv<boolean>('0xCF8176912DDA4EA5', this.handle, rai());
304
- }
305
-
306
- /**
307
- * @returns
308
- */
309
- getPitch(): number {
310
- return inv<number>('0xEF355ABEFF7F5005', this.handle, raf());
311
- }
312
-
313
- /**
314
- * @returns
315
- */
316
- isStatic(): boolean {
317
- return inv<boolean>('0x86468ADFA0F6B861', this.handle, rai());
245
+ get CarryConfig(): number {
246
+ return (inv<number>('0x0FD25587BB306C86', this.handle, rai())) & 0xFFFFFFFF;
318
247
  }
319
248
 
320
249
  /**
321
- * Returns the model hash from the entity
250
+ * tier: https://github.com/Halen84/RDR3-Native-Flags-And-Enums/tree/main/eEntityThreatTier
322
251
  *
323
- * @returns
324
- */
325
- getModel(): number {
326
- return (inv<number>('0xDA76A9F39210D365', this.handle, rai())) & 0xFFFFFFFF;
327
- }
328
-
329
- /**
330
- * Deletes the specified entity, then sets the handle pointed to by the pointer to NULL.
252
+ * @param tier
253
+ * @param p2
331
254
  */
332
- deleteEntity(): void {
333
- inv<void>('0x4CD38C78BD19A497', this.handle);
255
+ setThreatTier(tier: number, p2: boolean): void {
256
+ inv<void>('0x4B436BAC8CBE9B07', this.handle, tier, p2);
334
257
  }
335
258
 
336
259
  /**
337
- * @param team
338
- * @param playerPedToIgnore
339
- * @param flags
260
+ * Returns the heading of the entity in degrees. Also know as the "Yaw" of an entity.
261
+ *
340
262
  * @returns
341
263
  */
342
- getNearestPlayerToOnTeam(team: number, playerPedToIgnore: Ped, flags: number): Player | null {
343
- return createFromHandle<Player>('Player', inv<number>('0xB2C30C3B4AFF718C', this.handle, team, playerPedToIgnore.handle, flags, rai()));
264
+ get Heading(): number {
265
+ return inv<number>('0xC230DD956E2F5507', this.handle, raf());
344
266
  }
345
267
 
346
268
  /**
@@ -348,7 +270,7 @@ export class Entity implements IHandle {
348
270
  *
349
271
  * @returns
350
272
  */
351
- getLodDist(): number {
273
+ get LodDist(): number {
352
274
  return inv<number>('0xDF240D0C2A948683', this.handle, rai());
353
275
  }
354
276
 
@@ -356,21 +278,21 @@ export class Entity implements IHandle {
356
278
  * @returns
357
279
  */
358
280
  doesHaveDrawable(): boolean {
359
- return inv<boolean>('0x20487F0DA9AF164A', this.handle, rai());
281
+ return !!inv<boolean>('0x20487F0DA9AF164A', this.handle, rai());
360
282
  }
361
283
 
362
284
  /**
363
285
  * @param xyzw
364
286
  */
365
- setQuaternion(xyzw: Vector4): void {
287
+ set Quaternion(xyzw: Vector4) {
366
288
  inv<void>('0x100E7007D13E3687', this.handle, f(xyzw.x), f(xyzw.y), f(xyzw.z), f(xyzw.w));
367
289
  }
368
290
 
369
291
  /**
370
292
  * @returns
371
293
  */
372
- isAttachedToAnyObject(): boolean {
373
- return inv<boolean>('0x306C1F6178F01AB3', this.handle, rai());
294
+ get IsAttachedToAnyObject(): boolean {
295
+ return !!inv<boolean>('0x306C1F6178F01AB3', this.handle, rai());
374
296
  }
375
297
 
376
298
  /**
@@ -378,7 +300,7 @@ export class Entity implements IHandle {
378
300
  *
379
301
  * @param toggle
380
302
  */
381
- setInvincible(toggle: boolean): void {
303
+ set Invincible(toggle: boolean) {
382
304
  inv<void>('0xA5C38736C426FCB8', this.handle, toggle);
383
305
  }
384
306
 
@@ -410,7 +332,7 @@ export class Entity implements IHandle {
410
332
  /**
411
333
  * @returns
412
334
  */
413
- getIsAnimal(): any {
335
+ get IsAnimal(): any {
414
336
  return inv<number>('0x9A100F1CF4546629', this.handle);
415
337
  }
416
338
 
@@ -434,7 +356,7 @@ export class Entity implements IHandle {
434
356
  *
435
357
  * @returns
436
358
  */
437
- getCanBeDamaged(): any {
359
+ get CanBeDamaged(): any {
438
360
  return inv<number>('0x75DF9E73F2F005FD', this.handle);
439
361
  }
440
362
 
@@ -460,7 +382,7 @@ export class Entity implements IHandle {
460
382
  *
461
383
  * @returns
462
384
  */
463
- getForwardVector(): Vector3 {
385
+ get ForwardVector(): Vector3 {
464
386
  return Vector3.fromArray(inv<number[]>('0x2412D9C05BB09B97', this.handle, rav()));
465
387
  }
466
388
 
@@ -469,7 +391,7 @@ export class Entity implements IHandle {
469
391
  * @returns
470
392
  */
471
393
  isTouchingModel(modelHash: string | number): boolean {
472
- return inv<boolean>('0x2AE3EBC8DEB9768B', this.handle, _h(modelHash), rai());
394
+ return !!inv<boolean>('0x2AE3EBC8DEB9768B', this.handle, _h(modelHash), rai());
473
395
  }
474
396
 
475
397
  /**
@@ -485,22 +407,22 @@ export class Entity implements IHandle {
485
407
  /**
486
408
  * @param toggle
487
409
  */
488
- setRenderScorched(toggle: boolean): void {
410
+ set RenderScorched(toggle: boolean) {
489
411
  inv<void>('0x85B8A7534E44BC23', this.handle, toggle);
490
412
  }
491
413
 
492
414
  /**
493
415
  * @param heading
494
416
  */
495
- setHeading(heading: number): void {
417
+ set Heading(heading: number) {
496
418
  inv<void>('0xCF2B9C0645C4651B', this.handle, f(heading));
497
419
  }
498
420
 
499
421
  /**
500
422
  * @returns
501
423
  */
502
- getCollisionDisabled(): boolean {
503
- return inv<boolean>('0xAA2FADD30F45A9DA', this.handle, rai());
424
+ get CollisionDisabled(): boolean {
425
+ return !!inv<boolean>('0xAA2FADD30F45A9DA', this.handle, rai());
504
426
  }
505
427
 
506
428
  /**
@@ -509,14 +431,14 @@ export class Entity implements IHandle {
509
431
  *
510
432
  * @returns
511
433
  */
512
- getRoll(): number {
434
+ get Roll(): number {
513
435
  return inv<number>('0xBF966536FA8B6879', this.handle, raf());
514
436
  }
515
437
 
516
438
  /**
517
439
  * @returns
518
440
  */
519
- getNearestParticipantToEntity(): Player | null {
441
+ get NearestParticipantToEntity(): Player | null {
520
442
  return createFromHandle<Player>('Player', inv<number>('0x6888A43C35A5F630', this.handle, rai()));
521
443
  }
522
444
 
@@ -525,14 +447,14 @@ export class Entity implements IHandle {
525
447
  *
526
448
  * @returns
527
449
  */
528
- getType(): number {
450
+ get Type(): number {
529
451
  return inv<number>('0x97F696ACA466B4E0', this.handle, rai());
530
452
  }
531
453
 
532
454
  /**
533
455
  * @returns
534
456
  */
535
- isOwnedByPersistenceSystem(): any {
457
+ get IsOwnedByPersistenceSystem(): any {
536
458
  return inv<number>('0xA7E51B53309EAC97', this.handle);
537
459
  }
538
460
 
@@ -543,7 +465,7 @@ export class Entity implements IHandle {
543
465
  * @returns
544
466
  */
545
467
  isPlayingAnim(animDict: string | null, animName: string | null, animType: number): boolean {
546
- return inv<boolean>('0xDEE49D5CA6C49148', this.handle, animDict, animName, animType, rai());
468
+ return !!inv<boolean>('0xDEE49D5CA6C49148', this.handle, animDict, animName, animType, rai());
547
469
  }
548
470
 
549
471
  /**
@@ -557,7 +479,7 @@ export class Entity implements IHandle {
557
479
  * @returns
558
480
  */
559
481
  hasBeenDamagedByAnyVehicle(): boolean {
560
- return inv<boolean>('0x695D7C26DE65C423', this.handle, rai());
482
+ return !!inv<boolean>('0x695D7C26DE65C423', this.handle, rai());
561
483
  }
562
484
 
563
485
  /**
@@ -578,15 +500,15 @@ export class Entity implements IHandle {
578
500
  *
579
501
  * @returns
580
502
  */
581
- getSubmergedLevel(): number {
503
+ get SubmergedLevel(): number {
582
504
  return inv<number>('0x4A77C3F73FD9E831', this.handle, raf());
583
505
  }
584
506
 
585
507
  /**
586
508
  * @returns
587
509
  */
588
- isAttached(): boolean {
589
- return inv<boolean>('0xEE6AD63ABF59C0B7', this.handle, rai());
510
+ get IsAttached(): boolean {
511
+ return !!inv<boolean>('0xEE6AD63ABF59C0B7', this.handle, rai());
590
512
  }
591
513
 
592
514
  /**
@@ -601,198 +523,205 @@ export class Entity implements IHandle {
601
523
  /**
602
524
  * @param looted
603
525
  */
604
- setFullyLooted(looted: boolean): void {
526
+ set FullyLooted(looted: boolean) {
605
527
  inv<void>('0x6BCF5F3D8FFE988D', this.handle, looted);
606
528
  }
607
529
 
608
530
  /**
609
531
  * @returns
610
532
  */
611
- isAttachedToAnyVehicle(): boolean {
612
- return inv<boolean>('0x12DF6E0D2E736749', this.handle, rai());
533
+ get IsAttachedToAnyVehicle(): boolean {
534
+ return !!inv<boolean>('0x12DF6E0D2E736749', this.handle, rai());
613
535
  }
614
536
 
615
537
  /**
616
- * @param p1
617
- */
618
- N_0xA48E4801DEBDF7E4(p1: boolean): void {
619
- inv<void>('0xA48E4801DEBDF7E4', this.handle, p1);
620
- }
621
-
622
- /**
623
- * @param toggle
624
- * @param keepPhysics
625
- */
626
- setCompletelyDisableCollision(toggle: boolean, keepPhysics: boolean): void {
627
- inv<void>('0xE0580EC84813875A', this.handle, toggle, keepPhysics);
628
- }
629
-
630
- /**
631
- * @param p1
632
- */
633
- N_0xCDB682BB47C02F0A(p1: string | number): void {
634
- inv<void>('0xCDB682BB47C02F0A', this.handle, _h(p1));
635
- }
636
-
637
- /**
638
- * @param volume
538
+ * Used in Script Function DUELING_DID_PLAYER_DISARM_OPPONENT
539
+ *
540
+ * @param entity2
639
541
  * @param p2
640
542
  * @param p3
641
543
  * @returns
642
544
  */
643
- isInVolume(volume: number, p2: boolean, p3: number): boolean {
644
- return inv<boolean>('0x5A5526BC09C06623', this.handle, volume, p2, p3, rai());
545
+ N_0x3EC28DA1FFAC9DDD(entity2: Entity, p2: any, p3: any): boolean {
546
+ return !!inv<boolean>('0x3EC28DA1FFAC9DDD', this.handle, entity2.handle, p2, p3, rai());
645
547
  }
646
548
 
647
549
  /**
648
- * @returns rightVector; forwardVector; upVector; position
550
+ * Must be called from a background script, otherwise it will do nothing.
649
551
  */
650
- getMatrix(): [Vector3, Vector3, Vector3, Vector3] {
651
- const result = inv<[number[], number[], number[], number[]]>('0x3A9B1120AF13FBF2', this.handle, pvv(), pvv(), pvv(), pvv());
652
- return [Vector3.fromArray(result[0]), Vector3.fromArray(result[1]), Vector3.fromArray(result[2]), Vector3.fromArray(result[3])];
552
+ delete2(): void {
553
+ inv<void>('0x5E94EA09E7207C16', this.handle);
653
554
  }
654
555
 
655
556
  /**
656
- * Called if entity is in water and submerged level is larger than 1f. If CARRYING_FLAG_FORCE_ALLOW_WARP_TO_SAFE_GROUND_LOCATION is true, it gets disabled as well.
557
+ * @param p1
558
+ * @returns
657
559
  */
658
- N_0x371D179701D9C082(): void {
659
- inv<void>('0x371D179701D9C082', this.handle);
560
+ isInAir(p1: any): boolean {
561
+ return !!inv<boolean>('0x886E37EC497200B6', this.handle, p1, rai());
660
562
  }
661
563
 
662
564
  /**
663
- * @param p1
664
565
  * @returns
665
566
  */
666
- getMaxHealth(p1: boolean): number {
667
- return inv<number>('0x15D757606D170C3C', this.handle, p1, rai());
567
+ get IsAMissionEntity(): boolean {
568
+ return !!inv<boolean>('0x138190F64DB4BBD1', this.handle, rai());
668
569
  }
669
570
 
670
571
  /**
671
- * @param animDict
672
- * @param animName
673
- * @param time
572
+ * @returns
674
573
  */
675
- setAnimCurrentTime(animDict: string | null, animName: string | null, time: number): void {
676
- inv<void>('0x11CDABDC7783B2BC', this.handle, animDict, animName, f(time));
574
+ get IsAttachedToAnyPed(): boolean {
575
+ return !!inv<boolean>('0xC841153DED2CA89A', this.handle, rai());
677
576
  }
678
577
 
679
578
  /**
680
- * Gets the current coordinates for a specified entity.
681
- * `entity` = The entity to get the coordinates from.
682
- * `alive` = Unused by the game, potentially used by debug builds in order to assert whether or not an entity was alive. If entity is a ped and it's in a vehicle or on a mount the coords of that entity are returned. Set 'realCoords' to true when you need the true ped coords.
683
- *
684
- * @param alive
685
- * @param realCoords
579
+ * @param to
686
580
  * @returns
687
581
  */
688
- getCoords(alive: boolean, realCoords: boolean): Vector3 {
689
- return Vector3.fromArray(inv<number[]>('0xA86D5F069399F44D', this.handle, alive, realCoords, rav()));
582
+ isAttachedToEntity(to: Entity): boolean {
583
+ return !!inv<boolean>('0x154A3C529497053E', this.handle, to.handle, rai());
690
584
  }
691
585
 
692
586
  /**
693
587
  * @returns
694
588
  */
695
- isAnObject(): boolean {
696
- return inv<boolean>('0x0A27A546A375FDEF', this.handle, rai());
589
+ hasBeenDamagedByAnyObject(): boolean {
590
+ return !!inv<boolean>('0x73BB763880CD23A6', this.handle, rai());
697
591
  }
698
592
 
699
593
  /**
700
- * LOD distance can be 0 to 0xFFFF (higher values will result in 0xFFFF) as it is actually stored as a 16-bit value (aka uint16_t).
701
- *
702
- * @param value
594
+ * @param rotationOrder
595
+ * @returns
703
596
  */
704
- setLodDist(value: number): void {
705
- inv<void>('0x5FB407F0A7C877BF', this.handle, value);
597
+ getRotation(rotationOrder: number): Vector3 {
598
+ return Vector3.fromArray(inv<number[]>('0xE09CAF86C32CB48F', this.handle, rotationOrder, rav()));
706
599
  }
707
600
 
708
601
  /**
709
602
  * @param toggle
710
603
  */
711
- setDynamic(toggle: boolean): void {
712
- inv<void>('0xFBFC4473F66CE344', this.handle, toggle);
604
+ set MotionBlur(toggle: boolean) {
605
+ inv<void>('0x516C6ABD18322B63', this.handle, toggle);
606
+ }
607
+
608
+ resetAlpha(): void {
609
+ inv<void>('0x744B9EF44779D9AB', this.handle);
713
610
  }
714
611
 
715
612
  /**
716
- * @param radius
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
+ * @returns
717
623
  */
718
- setCustomPickupRadius(radius: number): void {
719
- inv<void>('0x482D17E45665DA44', this.handle, f(radius));
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());
720
626
  }
721
627
 
722
628
  /**
723
- * @returns
629
+ * @param entity2
630
+ * @param p2
631
+ * @param boneIndex
632
+ * @param offset
633
+ * @param p7
634
+ * @param p8
635
+ * @param p9
636
+ * @param p10
637
+ * @param p11
638
+ * @param p12
639
+ * @param p13
640
+ * @param p14
641
+ * @param p15
642
+ * @param p16
643
+ * @param p17
644
+ * @param p18
645
+ * @param p19
646
+ * @param p20
647
+ * @param p21
724
648
  */
725
- getPopulationType(): number {
726
- return inv<number>('0xADE28862B6D7B85B', this.handle, rai());
649
+ attachToEntityPhysically(entity2: Entity, p2: number, boneIndex: number, offset: Vector3, p7: number, p8: number, p9: number, p10: number, p11: number, p12: number, p13: number, p14: boolean, p15: boolean, p16: boolean, p17: boolean, p18: number, p19: boolean, p20: number, p21: number): void {
650
+ inv<void>('0xB629A43CA1643481', this.handle, entity2.handle, p2, boneIndex, f(offset.x), f(offset.y), f(offset.z), f(p7), f(p8), f(p9), f(p10), f(p11), f(p12), f(p13), p14, p15, p16, p17, p18, p19, f(p20), f(p21));
727
651
  }
728
652
 
729
653
  /**
730
654
  * @returns
731
655
  */
732
- isAVehicle(): boolean {
733
- return inv<boolean>('0xC3D96AF45FCCEC4C', this.handle, rai());
656
+ get HeightAboveGround(): number {
657
+ return inv<number>('0x0D3B5BAEA08F63E9', this.handle, raf());
734
658
  }
735
659
 
736
660
  /**
737
661
  * @param pos
738
- * @param atTop
739
- * @param inWorldCoords
740
- * @returns
662
+ * @param heading
663
+ * @param p5
664
+ * @param p6
741
665
  */
742
- getHeight(pos: Vector3, atTop: boolean, inWorldCoords: boolean): number {
743
- return inv<number>('0x296DEBC84474B375', this.handle, f(pos.x), f(pos.y), f(pos.z), atTop, inWorldCoords, raf());
666
+ setCoordsAndHeadingNoOffset(pos: Vector3, heading: number, p5: boolean, p6: boolean): void {
667
+ inv<void>('0x0918E3565C20F03C', this.handle, f(pos.x), f(pos.y), f(pos.z), f(heading), p5, p6);
744
668
  }
745
669
 
746
670
  /**
747
- * @param pos
671
+ * Creates a spherical cone at origin that extends to surface with the angle specified. Then returns true if the entity is inside the spherical cone Angle is measured in degrees.
672
+ *
673
+ * @param originX
674
+ * @param originY
675
+ * @param originZ
676
+ * @param edgeX
677
+ * @param edgeY
678
+ * @param edgeZ
679
+ * @param angle
680
+ * @param p8
681
+ * @param p9
682
+ * @param p10
748
683
  * @returns
749
684
  */
750
- getOffsetFromGivenWorldCoords(pos: Vector3): Vector3 {
751
- return Vector3.fromArray(inv<number[]>('0x497C6B1A2C9AE69C', this.handle, f(pos.x), f(pos.y), f(pos.z), rav()));
685
+ isInAngledArea(originX: number, originY: number, originZ: number, edgeX: number, edgeY: number, edgeZ: number, angle: number, p8: boolean, p9: boolean, p10: any): boolean {
686
+ return !!inv<boolean>('0xD3151E53134595E5', this.handle, f(originX), f(originY), f(originZ), f(edgeX), f(edgeY), f(edgeZ), f(angle), p8, p9, p10, rai());
752
687
  }
753
688
 
754
- addTrackingTrails(): void {
755
- inv<void>('0x1AD922AB5038DEF3', this.handle);
689
+ clearLastDamageEntity(): void {
690
+ inv<void>('0xBB19AC7D4DCEFD0F', this.handle);
756
691
  }
757
692
 
758
693
  /**
759
694
  * @param toggle
760
695
  */
761
- setCanClimbOnEntity(toggle: boolean): void {
762
- inv<void>('0x24AED2A608F93C4C', this.handle, toggle);
696
+ set AlwaysPrerender(toggle: boolean) {
697
+ inv<void>('0xACAD101E1FB66689', this.handle, toggle);
763
698
  }
764
699
 
765
700
  /**
766
- * @returns minimum; maximum
701
+ * Note that the third parameter(denoted as z) is "up and down" with positive numbers encouraging upwards movement.
702
+ *
703
+ * @param pos
767
704
  */
768
- getWorldPositionOfDimensions(): [Vector3, Vector3] {
769
- const result = inv<[number[], number[]]>('0xF3FDA9A617A15145', this.handle, pvv(), pvv());
770
- return [Vector3.fromArray(result[0]), Vector3.fromArray(result[1])];
705
+ set Velocity(pos: Vector3) {
706
+ inv<void>('0x1C99BB7B6E96D16F', this.handle, f(pos.x), f(pos.y), f(pos.z));
771
707
  }
772
708
 
773
709
  /**
710
+ * SET_ENTITY_LO*
711
+ *
774
712
  * @param p1
775
- * @returns
776
- */
777
- isUnderwater(p1: boolean): any {
778
- return inv<number>('0xD4E5C1E93C466127', this.handle, p1);
779
- }
780
-
781
- /**
782
- * @param animation
783
- * @param animGroup
713
+ * @param p2
784
714
  * @param p3
785
- * @returns
786
715
  */
787
- stopAnim(animation: string | null, animGroup: string | null, p3: number): any {
788
- return inv<number>('0x786591D986DE9159', this.handle, animation, animGroup, f(p3));
716
+ N_0xAF7F3099B9FEB535(p1: number, p2: number, p3: number): void {
717
+ inv<void>('0xAF7F3099B9FEB535', this.handle, f(p1), f(p2), f(p3));
789
718
  }
790
719
 
791
720
  /**
792
721
  * @returns
793
722
  */
794
- hasCollidedWithAnything(): boolean {
795
- return inv<boolean>('0xDF18751EC74F90FF', this.handle, rai());
723
+ N_0xAF72EC7E1B54539B(): Entity | null {
724
+ return createFromHandle<Entity>('Entity', inv<number>('0xAF72EC7E1B54539B', this.handle, rai()));
796
725
  }
797
726
 
798
727
  /**
@@ -800,47 +729,34 @@ export class Entity implements IHandle {
800
729
  *
801
730
  * @returns
802
731
  */
803
- getVehicleIndexFromIndex(): Vehicle | null {
804
- return createFromHandle<Vehicle>('Vehicle', inv<number>('0xDF1E5AAC561AFC59', this.handle, rai()));
805
- }
806
-
807
- /**
808
- * @returns
809
- */
810
- isVisible(): boolean {
811
- return inv<boolean>('0xFFC96ECB7FA404CA', this.handle, rai());
732
+ get ObjectIndexFromIndex(): Prop | null {
733
+ return createFromHandle<Prop>('Prop', inv<number>('0x280BBE5601EAA983', this.handle, rai()));
812
734
  }
813
735
 
814
736
  /**
815
- * SET_ENTITY_LO*
737
+ * Has the entity1 got a clear line of sight to the other entity2 from the direction entity1 is facing.
816
738
  *
817
- * @param toggle
739
+ * @param entity2
740
+ * @param traceType
741
+ * @returns
818
742
  */
819
- N_0xFF9965C47FA404DA(toggle: boolean): void {
820
- inv<void>('0xFF9965C47FA404DA', this.handle, toggle);
743
+ hasClearLosToEntityInFront(entity2: Entity, traceType: number): boolean {
744
+ return !!inv<boolean>('0xE88F19660651D566', this.handle, entity2.handle, traceType, rai());
821
745
  }
822
746
 
823
747
  /**
824
- * Valid indices: 0 - 3
825
- * Index 1 always returns a `hogtied` config, doesn't matter the entity.
826
- * It's for humans only and the ped must be resurrected first if it's dead.
827
- *
828
- * @param index
829
748
  * @returns
830
749
  */
831
- getOptimalCarryConfig(index: number): number {
832
- return (inv<number>('0x34F008A7E48C496B', this.handle, index, rai())) & 0xFFFFFFFF;
833
- }
834
-
835
- setFadeIn(): void {
836
- inv<void>('0xA91E6CF94404E8C9', this.handle);
750
+ get IsOnTrainTrack(): any {
751
+ return inv<number>('0x857ACB0AB4BD0D55', this.handle);
837
752
  }
838
753
 
839
754
  /**
755
+ * @param angle
840
756
  * @returns
841
757
  */
842
- hasBeenDamagedByAnyPed(): boolean {
843
- return inv<boolean>('0x9934E9C42D52D87E', this.handle, rai());
758
+ isUpright(angle: number): boolean {
759
+ return !!inv<boolean>('0xF6F6AFD8D4FB2658', this.handle, f(angle), rai());
844
760
  }
845
761
 
846
762
  /**
@@ -848,7 +764,7 @@ export class Entity implements IHandle {
848
764
  * @returns
849
765
  */
850
766
  isTouchingEntity(targetEntity: Entity): boolean {
851
- return inv<boolean>('0x9A2304A64C3C8423', this.handle, targetEntity.handle, rai());
767
+ return !!inv<boolean>('0x9A2304A64C3C8423', this.handle, targetEntity.handle, rai());
852
768
  }
853
769
 
854
770
  deleteCarriable(): void {
@@ -879,21 +795,21 @@ export class Entity implements IHandle {
879
795
  *
880
796
  * @returns
881
797
  */
882
- getSpeed(): number {
798
+ get Speed(): number {
883
799
  return inv<number>('0xFB6BA510A533DF81', this.handle, raf());
884
800
  }
885
801
 
886
802
  /**
887
803
  * @param bOnlyDamagedWhenRunningScript
888
804
  */
889
- setCanOnlyBeDamagedByScriptParticipants(bOnlyDamagedWhenRunningScript: boolean): void {
805
+ set CanOnlyBeDamagedByScriptParticipants(bOnlyDamagedWhenRunningScript: boolean) {
890
806
  inv<void>('0xFF83AF534156B399', this.handle, bOnlyDamagedWhenRunningScript);
891
807
  }
892
808
 
893
809
  /**
894
810
  * @returns
895
811
  */
896
- isTrackedVisible(): any {
812
+ get IsTrackedVisible(): any {
897
813
  return inv<number>('0xC8CCDB712FBCBA92', this.handle);
898
814
  }
899
815
 
@@ -908,8 +824,8 @@ export class Entity implements IHandle {
908
824
  /**
909
825
  * @returns
910
826
  */
911
- isVisibleToScript(): boolean {
912
- return inv<boolean>('0xF213C724E77F321A', this.handle, rai());
827
+ get IsVisibleToScript(): boolean {
828
+ return !!inv<boolean>('0xF213C724E77F321A', this.handle, rai());
913
829
  }
914
830
 
915
831
  /**
@@ -918,7 +834,7 @@ export class Entity implements IHandle {
918
834
  * @returns
919
835
  */
920
836
  hasClearLosToEntity(entity2: Entity, traceType: number): boolean {
921
- return inv<boolean>('0xFCDFF7B72D23A1AC', this.handle, entity2.handle, traceType, rai());
837
+ return !!inv<boolean>('0xFCDFF7B72D23A1AC', this.handle, entity2.handle, traceType, rai());
922
838
  }
923
839
 
924
840
  /**
@@ -934,117 +850,195 @@ export class Entity implements IHandle {
934
850
  }
935
851
 
936
852
  /**
937
- * @param pos1
938
- * @param pos2
939
- * @param p7
940
- * @param p8
941
- * @param p9
853
+ * @param playerPedToIgnore
854
+ * @param flags
942
855
  * @returns
943
856
  */
944
- isInArea(pos1: Vector3, pos2: Vector3, p7: boolean, p8: boolean, p9: any): boolean {
945
- 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());
857
+ getNearestPlayerToEntity(playerPedToIgnore: Ped, flags: number): Player | null {
858
+ return createFromHandle<Player>('Player', inv<number>('0x990E294FC387FB88', this.handle, playerPedToIgnore.handle, flags, rai()));
946
859
  }
947
860
 
948
861
  /**
949
- * Returns the coordinates of an entity-bone.
950
- * https://github.com/femga/rdr3_discoveries/tree/master/boneNames
862
+ * Gets the Y-component of the entity's forward vector.
951
863
  *
952
- * @param boneIndex
953
864
  * @returns
954
865
  */
955
- getWorldPositionOfBone(boneIndex: number): Vector3 {
956
- return Vector3.fromArray(inv<number[]>('0x82CFA50E34681CA5', this.handle, boneIndex, rav()));
866
+ get ForwardY(): number {
867
+ return inv<number>('0x9A5C073ECBDA7EE7', this.handle, raf());
957
868
  }
958
869
 
959
870
  /**
960
- * https://github.com/femga/rdr3_discoveries/tree/master/animations
871
+ * @param pitch
872
+ * @param roll
873
+ * @param yaw
874
+ * @param rotationOrder
875
+ * @param p5
876
+ */
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);
879
+ }
880
+
881
+ /**
882
+ * @param p1
883
+ * @param relationshipGroup
884
+ */
885
+ setOnlyDamagedByRelationshipGroup(p1: boolean, relationshipGroup: string | number): void {
886
+ inv<void>('0x6C1F6AA2F0ADD104', this.handle, p1, _h(relationshipGroup));
887
+ }
888
+
889
+ /**
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
961
892
  *
962
- * @param animName
963
- * @param animDict
964
- * @param p3
965
- * @param loop
966
- * @param stayInAnim
967
- * @param p6
968
- * @param delta
969
- * @param bitset
893
+ * @param proofsBitset
894
+ * @param specialFlag
895
+ */
896
+ setProofs(proofsBitset: number, specialFlag: boolean): void {
897
+ inv<void>('0xFAEE099C6F890BB8', this.handle, proofsBitset, specialFlag);
898
+ }
899
+
900
+ /**
970
901
  * @returns
971
902
  */
972
- playAnim(animName: string | null, animDict: string | null, p3: number, loop: boolean, stayInAnim: boolean, p6: boolean, delta: number, bitset: any): boolean {
973
- return inv<boolean>('0xDC6D22FAB76D4874', this.handle, animName, animDict, f(p3), loop, stayInAnim, p6, f(delta), bitset, rai());
903
+ hasCollisionLoadedAroundEntity(): boolean {
904
+ return !!inv<boolean>('0xBEB1600952B9CF5C', this.handle, rai());
974
905
  }
975
906
 
976
907
  /**
977
- * Returns false if entity is not a ped or object.
908
+ * @returns
909
+ */
910
+ get IsCarriablePelt(): any {
911
+ return inv<number>('0x255B6DB4E3AD3C3E', this.handle);
912
+ }
913
+
914
+ /**
915
+ * @param p1
916
+ * @returns
917
+ */
918
+ getVelocity(p1: number): Vector3 {
919
+ return Vector3.fromArray(inv<number[]>('0x4805D2B1D8CF94A9', this.handle, p1, rav()));
920
+ }
921
+
922
+ /**
923
+ * @param toggle
924
+ */
925
+ set CanAutoVaultOnEntity(toggle: boolean) {
926
+ inv<void>('0x80646744FA88F9D7', this.handle, toggle);
927
+ }
928
+
929
+ /**
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
978
932
  *
979
- * @returns lootTable
933
+ * @param lootTable
934
+ * @returns
935
+ */
936
+ scriptOverrideLootTablePermanent(lootTable: string | number): any {
937
+ return inv<number>('0x8C03CD6B5E0E85E8', this.handle, _h(lootTable));
938
+ }
939
+
940
+ /**
941
+ * @returns argStruct
942
+ */
943
+ get Script(): [number, number] {
944
+ const result = inv<[number, number]>('0x2A08A32B6D49906F', this.handle, pvi(), rai());
945
+ return [result[0] & 0xFFFFFFFF, result[1]];
946
+ }
947
+
948
+ /**
949
+ * @param actionHash
950
+ * @returns
951
+ */
952
+ hasAnimEventFired(actionHash: string | number): boolean {
953
+ return !!inv<boolean>('0x5851CC48405F4A07', this.handle, _h(actionHash), rai());
954
+ }
955
+
956
+ /**
957
+ * @param p1
958
+ */
959
+ N_0xEF259AA1E097E0AD(p1: any): void {
960
+ inv<void>('0xEF259AA1E097E0AD', this.handle, p1);
961
+ }
962
+
963
+ /**
964
+ * Getter for FREEZE_ENTITY_POSITION
965
+ *
966
+ * @returns
967
+ */
968
+ get IsFrozen(): any {
969
+ return inv<number>('0x083D497D57B7400F', this.handle);
970
+ }
971
+
972
+ /**
973
+ * Returns the entity that is looting a ped but only while the looting is active
974
+ *
975
+ * @returns
976
+ */
977
+ get LootingPed(): Ped | null {
978
+ return createFromHandle<Ped>('Ped', inv<number>('0xEF2D9ED7CE684F08', this.handle, rai()));
979
+ }
980
+
981
+ /**
982
+ * @returns
980
983
  */
981
- getScriptOverrideLootTablePermanent(): [any, number] {
982
- const result = inv<[number, number]>('0x1E804EA9B12030A4', this.handle, pvi());
983
- return [result[0], result[1]];
984
+ get IsWaitingForWorldCollision(): boolean {
985
+ return !!inv<boolean>('0x5E1CC2E8DC3111DD', this.handle, rai());
984
986
  }
985
987
 
986
988
  /**
987
- * @param animDict
988
- * @param animName
989
- * @param p3
989
+ * Gets the X-component of the entity's forward vector.
990
+ *
990
991
  * @returns
991
992
  */
992
- hasAnimFinished(animDict: string | null, animName: string | null, p3: number): boolean {
993
- return inv<boolean>('0xAEB40615337EF1E3', this.handle, animDict, animName, p3, rai());
993
+ get ForwardX(): number {
994
+ return inv<number>('0xDB0954E9960F6457', this.handle, raf());
994
995
  }
995
996
 
996
997
  /**
997
- * @param bCanBeDamaged
998
- * @param relGroup
998
+ * @returns
999
999
  */
1000
- setCanBeDamagedByRelationshipGroup(bCanBeDamaged: boolean, relGroup: string | number): void {
1001
- inv<void>('0x0EF1AFB18649E015', this.handle, bCanBeDamaged, _h(relGroup));
1000
+ get IsAPed(): boolean {
1001
+ return !!inv<boolean>('0xCF8176912DDA4EA5', this.handle, rai());
1002
1002
  }
1003
1003
 
1004
1004
  /**
1005
1005
  * @returns
1006
1006
  */
1007
- getUprightValue(): number {
1008
- return inv<number>('0x56398BE65160C3BE', this.handle, raf());
1007
+ get Pitch(): number {
1008
+ return inv<number>('0xEF355ABEFF7F5005', this.handle, raf());
1009
1009
  }
1010
1010
 
1011
1011
  /**
1012
- * @param pos
1013
- * @param heading
1014
- * @param xAxis
1015
- * @param yAxis
1016
- * @param zAxis
1012
+ * @returns
1017
1013
  */
1018
- setCoordsAndHeading(pos: Vector3, heading: number, xAxis: boolean, yAxis: boolean, zAxis: boolean): void {
1019
- inv<void>('0x203BEFFDBE12E96A', this.handle, f(pos.x), f(pos.y), f(pos.z), f(heading), xAxis, yAxis, zAxis);
1014
+ get IsStatic(): boolean {
1015
+ return !!inv<boolean>('0x86468ADFA0F6B861', this.handle, rai());
1020
1016
  }
1021
1017
 
1022
1018
  /**
1023
- * Returns zero if the entity is not a carriable
1019
+ * Returns the model hash from the entity
1024
1020
  *
1025
1021
  * @returns
1026
1022
  */
1027
- getCarryConfig(): number {
1028
- return (inv<number>('0x0FD25587BB306C86', this.handle, rai())) & 0xFFFFFFFF;
1023
+ get Model(): number {
1024
+ return (inv<number>('0xDA76A9F39210D365', this.handle, rai())) & 0xFFFFFFFF;
1029
1025
  }
1030
1026
 
1031
1027
  /**
1032
- * tier: https://github.com/Halen84/RDR3-Native-Flags-And-Enums/tree/main/eEntityThreatTier
1033
- *
1034
- * @param tier
1035
- * @param p2
1028
+ * Deletes the specified entity, then sets the handle pointed to by the pointer to NULL.
1036
1029
  */
1037
- setThreatTier(tier: number, p2: boolean): void {
1038
- inv<void>('0x4B436BAC8CBE9B07', this.handle, tier, p2);
1030
+ deleteEntity(): void {
1031
+ inv<void>('0x4CD38C78BD19A497', this.handle);
1039
1032
  }
1040
1033
 
1041
1034
  /**
1042
- * Returns the heading of the entity in degrees. Also know as the "Yaw" of an entity.
1043
- *
1035
+ * @param team
1036
+ * @param playerPedToIgnore
1037
+ * @param flags
1044
1038
  * @returns
1045
1039
  */
1046
- getHeading(): number {
1047
- return inv<number>('0xC230DD956E2F5507', this.handle, raf());
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()));
1048
1042
  }
1049
1043
 
1050
1044
  /**
@@ -1060,7 +1054,7 @@ export class Entity implements IHandle {
1060
1054
  /**
1061
1055
  * @param toggle
1062
1056
  */
1063
- setRequiresMoreExpensiveRiverCheck(toggle: boolean): void {
1057
+ set RequiresMoreExpensiveRiverCheck(toggle: boolean) {
1064
1058
  inv<void>('0x850C940EE3E7B8B5', this.handle, toggle);
1065
1059
  }
1066
1060
 
@@ -1081,7 +1075,7 @@ export class Entity implements IHandle {
1081
1075
  *
1082
1076
  * @returns
1083
1077
  */
1084
- getPedIndexFromIndex(): Ped | null {
1078
+ get PedIndexFromIndex(): Ped | null {
1085
1079
  return createFromHandle<Ped>('Ped', inv<number>('0x0F16D042BD640EA3', this.handle, rai()));
1086
1080
  }
1087
1081
 
@@ -1090,15 +1084,15 @@ export class Entity implements IHandle {
1090
1084
  *
1091
1085
  * @param toggle
1092
1086
  */
1093
- setCanBeTargetedWithoutLos(toggle: boolean): void {
1087
+ set CanBeTargetedWithoutLos(toggle: boolean) {
1094
1088
  inv<void>('0x6D09F32E284D0FB7', this.handle, toggle);
1095
1089
  }
1096
1090
 
1097
1091
  /**
1098
1092
  * @returns
1099
1093
  */
1100
- isOnScreen(): boolean {
1101
- return inv<boolean>('0x613C15D5D8DB781F', this.handle, rai());
1094
+ get IsOnScreen(): boolean {
1095
+ return !!inv<boolean>('0x613C15D5D8DB781F', this.handle, rai());
1102
1096
  }
1103
1097
 
1104
1098
  /**
@@ -1106,14 +1100,14 @@ export class Entity implements IHandle {
1106
1100
  *
1107
1101
  * @param toggle
1108
1102
  */
1109
- setNoweapondecals(toggle: boolean): void {
1103
+ set Noweapondecals(toggle: boolean) {
1110
1104
  inv<void>('0xC64E597783BE9A1D', this.handle, toggle);
1111
1105
  }
1112
1106
 
1113
1107
  /**
1114
1108
  * @returns
1115
1109
  */
1116
- getHealth(): number {
1110
+ get Health(): number {
1117
1111
  return inv<number>('0x82368787EA73C0F7', this.handle, rai());
1118
1112
  }
1119
1113
 
@@ -1134,7 +1128,7 @@ export class Entity implements IHandle {
1134
1128
  * @returns
1135
1129
  */
1136
1130
  doesHavePhysics(): boolean {
1137
- return inv<boolean>('0xA512B3F1B2A0B51C', this.handle, rai());
1131
+ return !!inv<boolean>('0xA512B3F1B2A0B51C', this.handle, rai());
1138
1132
  }
1139
1133
 
1140
1134
  /**
@@ -1194,14 +1188,14 @@ export class Entity implements IHandle {
1194
1188
  /**
1195
1189
  * @returns
1196
1190
  */
1197
- getAttachedTo(): Entity | null {
1191
+ get AttachedTo(): Entity | null {
1198
1192
  return createFromHandle<Entity>('Entity', inv<number>('0x56D713888A566481', this.handle, rai()));
1199
1193
  }
1200
1194
 
1201
1195
  /**
1202
1196
  * @param toggle
1203
1197
  */
1204
- setOnlyDamagedByPlayer(toggle: boolean): void {
1198
+ set OnlyDamagedByPlayer(toggle: boolean) {
1205
1199
  inv<void>('0x473598683095D430', this.handle, toggle);
1206
1200
  }
1207
1201
 
@@ -1233,7 +1227,7 @@ export class Entity implements IHandle {
1233
1227
  /**
1234
1228
  * @returns
1235
1229
  */
1236
- getIsPredator(): any {
1230
+ get IsPredator(): any {
1237
1231
  return inv<number>('0x5594AFE9DE0C01B7', this.handle);
1238
1232
  }
1239
1233
 
@@ -1257,14 +1251,14 @@ export class Entity implements IHandle {
1257
1251
  *
1258
1252
  * @returns
1259
1253
  */
1260
- getCarriableState(): number {
1254
+ get CarriableState(): number {
1261
1255
  return inv<number>('0x61914209C36EFDDB', this.handle, rai());
1262
1256
  }
1263
1257
 
1264
1258
  /**
1265
1259
  * @param value
1266
1260
  */
1267
- setMaxHealth(value: number): void {
1261
+ set MaxHealth(value: number) {
1268
1262
  inv<void>('0x166E7CF68597D8B5', this.handle, value);
1269
1263
  }
1270
1264
 
@@ -1275,13 +1269,13 @@ export class Entity implements IHandle {
1275
1269
  * @returns
1276
1270
  */
1277
1271
  isPlayingAnyAnim(p1: number): boolean {
1278
- return inv<boolean>('0x0B7CB1300CBFE19C', this.handle, p1, rai());
1272
+ return !!inv<boolean>('0x0B7CB1300CBFE19C', this.handle, p1, rai());
1279
1273
  }
1280
1274
 
1281
1275
  /**
1282
1276
  * @param enabled
1283
1277
  */
1284
- setLightsEnabled(enabled: boolean): void {
1278
+ set LightsEnabled(enabled: boolean) {
1285
1279
  inv<void>('0xEBDC12861D079ABA', this.handle, enabled);
1286
1280
  }
1287
1281
 
@@ -1310,13 +1304,13 @@ export class Entity implements IHandle {
1310
1304
  * @returns
1311
1305
  */
1312
1306
  isAtEntity(entity2: Entity, xSize: number, ySize: number, zSize: number, p5: boolean, p6: boolean, p7: number): boolean {
1313
- return inv<boolean>('0xC057F02B837A27F6', this.handle, entity2.handle, f(xSize), f(ySize), f(zSize), p5, p6, p7, rai());
1307
+ return !!inv<boolean>('0xC057F02B837A27F6', this.handle, entity2.handle, f(xSize), f(ySize), f(zSize), p5, p6, p7, rai());
1314
1308
  }
1315
1309
 
1316
1310
  /**
1317
1311
  * @param toggle
1318
1312
  */
1319
- setVisible(toggle: boolean): void {
1313
+ set Visible(toggle: boolean) {
1320
1314
  inv<void>('0x1794B4FCC84D812F', this.handle, toggle);
1321
1315
  }
1322
1316
 
@@ -1325,7 +1319,7 @@ export class Entity implements IHandle {
1325
1319
  *
1326
1320
  * @param toggle
1327
1321
  */
1328
- setShouldFreezeWaitingOnCollision(toggle: boolean): void {
1322
+ set ShouldFreezeWaitingOnCollision(toggle: boolean) {
1329
1323
  inv<void>('0x740CB4F3F602C9F4', this.handle, toggle);
1330
1324
  }
1331
1325
 
@@ -1335,7 +1329,7 @@ export class Entity implements IHandle {
1335
1329
  *
1336
1330
  * @returns
1337
1331
  */
1338
- getProofs(): number {
1332
+ get Proofs(): number {
1339
1333
  return inv<number>('0x6CF0DAD7FA1088EA', this.handle, rai());
1340
1334
  }
1341
1335
 
@@ -1353,106 +1347,103 @@ export class Entity implements IHandle {
1353
1347
  /**
1354
1348
  * @returns
1355
1349
  */
1356
- getThreatTier(): number {
1350
+ get ThreatTier(): number {
1357
1351
  return inv<number>('0xE12F56CB25D9CE23', this.handle, rai());
1358
1352
  }
1359
1353
 
1360
1354
  /**
1361
- * Used in Script Function DUELING_DID_PLAYER_DISARM_OPPONENT
1362
- *
1363
- * @param entity2
1364
- * @param p2
1365
- * @param p3
1366
- * @returns
1355
+ * @param p1
1367
1356
  */
1368
- N_0x3EC28DA1FFAC9DDD(entity2: Entity, p2: any, p3: any): boolean {
1369
- return inv<boolean>('0x3EC28DA1FFAC9DDD', this.handle, entity2.handle, p2, p3, rai());
1357
+ N_0xA48E4801DEBDF7E4(p1: boolean): void {
1358
+ inv<void>('0xA48E4801DEBDF7E4', this.handle, p1);
1370
1359
  }
1371
1360
 
1372
1361
  /**
1373
- * Must be called from a background script, otherwise it will do nothing.
1362
+ * @param toggle
1363
+ * @param keepPhysics
1374
1364
  */
1375
- delete2(): void {
1376
- inv<void>('0x5E94EA09E7207C16', this.handle);
1365
+ setCompletelyDisableCollision(toggle: boolean, keepPhysics: boolean): void {
1366
+ inv<void>('0xE0580EC84813875A', this.handle, toggle, keepPhysics);
1377
1367
  }
1378
1368
 
1379
1369
  /**
1380
1370
  * @param p1
1381
- * @returns
1382
1371
  */
1383
- isInAir(p1: any): boolean {
1384
- return inv<boolean>('0x886E37EC497200B6', this.handle, p1, rai());
1372
+ N_0xCDB682BB47C02F0A(p1: string | number): void {
1373
+ inv<void>('0xCDB682BB47C02F0A', this.handle, _h(p1));
1385
1374
  }
1386
1375
 
1387
1376
  /**
1377
+ * @param volume
1378
+ * @param p2
1379
+ * @param p3
1388
1380
  * @returns
1389
1381
  */
1390
- isAMissionEntity(): boolean {
1391
- return inv<boolean>('0x138190F64DB4BBD1', this.handle, rai());
1382
+ isInVolume(volume: number, p2: boolean, p3: number): boolean {
1383
+ return !!inv<boolean>('0x5A5526BC09C06623', this.handle, volume, p2, p3, rai());
1392
1384
  }
1393
1385
 
1394
1386
  /**
1395
- * @returns
1387
+ * @returns rightVector; forwardVector; upVector; position
1396
1388
  */
1397
- isAttachedToAnyPed(): boolean {
1398
- return inv<boolean>('0xC841153DED2CA89A', this.handle, rai());
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])];
1399
1392
  }
1400
1393
 
1401
1394
  /**
1402
- * @param to
1403
- * @returns
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.
1404
1396
  */
1405
- isAttachedToEntity(to: Entity): boolean {
1406
- return inv<boolean>('0x154A3C529497053E', this.handle, to.handle, rai());
1397
+ N_0x371D179701D9C082(): void {
1398
+ inv<void>('0x371D179701D9C082', this.handle);
1407
1399
  }
1408
1400
 
1409
1401
  /**
1402
+ * @param p1
1410
1403
  * @returns
1411
1404
  */
1412
- hasBeenDamagedByAnyObject(): boolean {
1413
- return inv<boolean>('0x73BB763880CD23A6', this.handle, rai());
1405
+ getMaxHealth(p1: boolean): number {
1406
+ return inv<number>('0x15D757606D170C3C', this.handle, p1, rai());
1414
1407
  }
1415
1408
 
1416
1409
  /**
1417
- * @param rotationOrder
1418
- * @returns
1410
+ * @param animDict
1411
+ * @param animName
1412
+ * @param time
1419
1413
  */
1420
- getRotation(rotationOrder: number): Vector3 {
1421
- return Vector3.fromArray(inv<number[]>('0xE09CAF86C32CB48F', this.handle, rotationOrder, rav()));
1414
+ setAnimCurrentTime(animDict: string | null, animName: string | null, time: number): void {
1415
+ inv<void>('0x11CDABDC7783B2BC', this.handle, animDict, animName, f(time));
1422
1416
  }
1423
1417
 
1424
1418
  /**
1425
- * @param toggle
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.
1422
+ *
1423
+ * @param alive
1424
+ * @param realCoords
1425
+ * @returns
1426
1426
  */
1427
- setMotionBlur(toggle: boolean): void {
1428
- inv<void>('0x516C6ABD18322B63', this.handle, toggle);
1427
+ getCoords(alive?: boolean, realCoords?: boolean): Vector3 {
1428
+ return Vector3.fromArray(inv<number[]>('0xA86D5F069399F44D', this.handle, alive, realCoords, rav()));
1429
1429
  }
1430
1430
 
1431
- resetAlpha(): void {
1432
- inv<void>('0x744B9EF44779D9AB', this.handle);
1431
+ get Coords(): Vector3 {
1432
+ return this.getCoords();
1433
1433
  }
1434
1434
 
1435
1435
  /**
1436
- * 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
1437
- *
1438
- * @param pos
1439
- * @param xSize
1440
- * @param ySize
1441
- * @param zSize
1442
- * @param p7
1443
- * @param p8
1444
- * @param p9
1445
1436
  * @returns
1446
1437
  */
1447
- isAtCoord(pos: Vector3, xSize: number, ySize: number, zSize: number, p7: boolean, p8: boolean, p9: number): boolean {
1448
- 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());
1438
+ get IsAnObject(): boolean {
1439
+ return !!inv<boolean>('0x0A27A546A375FDEF', this.handle, rai());
1449
1440
  }
1450
1441
 
1451
1442
  /**
1452
1443
  * @returns
1453
1444
  */
1454
- isUpsidedown(): boolean {
1455
- return inv<boolean>('0x109DE3DA41AAD94A', this.handle, rai());
1445
+ get IsUpsidedown(): boolean {
1446
+ return !!inv<boolean>('0x109DE3DA41AAD94A', this.handle, rai());
1456
1447
  }
1457
1448
 
1458
1449
  /**
@@ -1460,7 +1451,7 @@ export class Entity implements IHandle {
1460
1451
  * @returns
1461
1452
  */
1462
1453
  doesBelongToThisScript(p1: boolean): boolean {
1463
- return inv<boolean>('0x622B1980CBE13332', this.handle, p1, rai());
1454
+ return !!inv<boolean>('0x622B1980CBE13332', this.handle, p1, rai());
1464
1455
  }
1465
1456
 
1466
1457
  /**
@@ -1468,7 +1459,7 @@ export class Entity implements IHandle {
1468
1459
  *
1469
1460
  * @returns
1470
1461
  */
1471
- getCarriableFromEntity(): number {
1462
+ get CarriableFromEntity(): number {
1472
1463
  return (inv<number>('0x31FEF6A20F00B963', this.handle, rai())) & 0xFFFFFFFF;
1473
1464
  }
1474
1465
 
@@ -1491,21 +1482,21 @@ export class Entity implements IHandle {
1491
1482
  /**
1492
1483
  * @returns
1493
1484
  */
1494
- isInWater(): boolean {
1495
- return inv<boolean>('0xDDE5C125AC446723', this.handle, rai());
1485
+ get IsInWater(): boolean {
1486
+ return !!inv<boolean>('0xDDE5C125AC446723', this.handle, rai());
1496
1487
  }
1497
1488
 
1498
1489
  /**
1499
1490
  * @returns Returns `true` if the entity exists
1500
1491
  */
1501
1492
  doesExist(): boolean {
1502
- return inv<boolean>('0xD42BD6EB2E0F1677', this.handle, rai());
1493
+ return !!inv<boolean>('0xD42BD6EB2E0F1677', this.handle, rai());
1503
1494
  }
1504
1495
 
1505
1496
  /**
1506
1497
  * @returns
1507
1498
  */
1508
- getAlpha(): number {
1499
+ get Alpha(): number {
1509
1500
  return inv<number>('0x1BB501624FAF2BEA', this.handle, rai());
1510
1501
  }
1511
1502
 
@@ -1543,107 +1534,107 @@ export class Entity implements IHandle {
1543
1534
  *
1544
1535
  * @returns
1545
1536
  */
1546
- getHealthFloat(): number {
1537
+ get HealthFloat(): number {
1547
1538
  return inv<number>('0x96C638784DB4C815', this.handle, raf());
1548
1539
  }
1549
1540
 
1550
1541
  /**
1551
- * @param entity2
1552
- * @param p2
1553
- * @param boneIndex
1554
- * @param offset
1555
- * @param p7
1556
- * @param p8
1557
- * @param p9
1558
- * @param p10
1559
- * @param p11
1560
- * @param p12
1561
- * @param p13
1562
- * @param p14
1563
- * @param p15
1564
- * @param p16
1565
- * @param p17
1566
- * @param p18
1567
- * @param p19
1568
- * @param p20
1569
- * @param p21
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
1570
1545
  */
1571
- attachToEntityPhysically(entity2: Entity, p2: number, boneIndex: number, offset: Vector3, p7: number, p8: number, p9: number, p10: number, p11: number, p12: number, p13: number, p14: boolean, p15: boolean, p16: boolean, p17: boolean, p18: number, p19: boolean, p20: number, p21: number): void {
1572
- inv<void>('0xB629A43CA1643481', this.handle, entity2.handle, p2, boneIndex, f(offset.x), f(offset.y), f(offset.z), f(p7), f(p8), f(p9), f(p10), f(p11), f(p12), f(p13), p14, p15, p16, p17, p18, p19, f(p20), f(p21));
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));
1573
1562
  }
1574
1563
 
1575
1564
  /**
1576
1565
  * @returns
1577
1566
  */
1578
- getHeightAboveGround(): number {
1579
- return inv<number>('0x0D3B5BAEA08F63E9', this.handle, raf());
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());
1580
1576
  }
1581
1577
 
1582
1578
  /**
1583
1579
  * @param pos
1584
- * @param heading
1585
- * @param p5
1586
- * @param p6
1580
+ * @param atTop
1581
+ * @param inWorldCoords
1582
+ * @returns
1587
1583
  */
1588
- setCoordsAndHeadingNoOffset(pos: Vector3, heading: number, p5: boolean, p6: boolean): void {
1589
- inv<void>('0x0918E3565C20F03C', this.handle, f(pos.x), f(pos.y), f(pos.z), f(heading), p5, p6);
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());
1590
1586
  }
1591
1587
 
1592
1588
  /**
1593
- * Creates a spherical cone at origin that extends to surface with the angle specified. Then returns true if the entity is inside the spherical cone Angle is measured in degrees.
1594
- *
1595
- * @param originX
1596
- * @param originY
1597
- * @param originZ
1598
- * @param edgeX
1599
- * @param edgeY
1600
- * @param edgeZ
1601
- * @param angle
1602
- * @param p8
1603
- * @param p9
1604
- * @param p10
1589
+ * @param pos
1605
1590
  * @returns
1606
1591
  */
1607
- isInAngledArea(originX: number, originY: number, originZ: number, edgeX: number, edgeY: number, edgeZ: number, angle: number, p8: boolean, p9: boolean, p10: any): boolean {
1608
- return inv<boolean>('0xD3151E53134595E5', this.handle, f(originX), f(originY), f(originZ), f(edgeX), f(edgeY), f(edgeZ), f(angle), p8, p9, p10, rai());
1592
+ getOffsetFromGivenWorldCoords(pos: Vector3): Vector3 {
1593
+ return Vector3.fromArray(inv<number[]>('0x497C6B1A2C9AE69C', this.handle, f(pos.x), f(pos.y), f(pos.z), rav()));
1609
1594
  }
1610
1595
 
1611
- clearLastDamageEntity(): void {
1612
- inv<void>('0xBB19AC7D4DCEFD0F', this.handle);
1596
+ addTrackingTrails(): void {
1597
+ inv<void>('0x1AD922AB5038DEF3', this.handle);
1613
1598
  }
1614
1599
 
1615
1600
  /**
1616
1601
  * @param toggle
1617
1602
  */
1618
- setAlwaysPrerender(toggle: boolean): void {
1619
- inv<void>('0xACAD101E1FB66689', this.handle, toggle);
1603
+ set CanClimbOnEntity(toggle: boolean) {
1604
+ inv<void>('0x24AED2A608F93C4C', this.handle, toggle);
1620
1605
  }
1621
1606
 
1622
1607
  /**
1623
- * Note that the third parameter(denoted as z) is "up and down" with positive numbers encouraging upwards movement.
1624
- *
1625
- * @param pos
1608
+ * @returns minimum; maximum
1626
1609
  */
1627
- setVelocity(pos: Vector3): void {
1628
- inv<void>('0x1C99BB7B6E96D16F', this.handle, f(pos.x), f(pos.y), f(pos.z));
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])];
1629
1613
  }
1630
1614
 
1631
1615
  /**
1632
- * SET_ENTITY_LO*
1633
- *
1634
1616
  * @param p1
1635
- * @param p2
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
1636
1626
  * @param p3
1627
+ * @returns
1637
1628
  */
1638
- N_0xAF7F3099B9FEB535(p1: number, p2: number, p3: number): void {
1639
- inv<void>('0xAF7F3099B9FEB535', this.handle, f(p1), f(p2), f(p3));
1629
+ stopAnim(animation: string | null, animGroup: string | null, p3: number): any {
1630
+ return inv<number>('0x786591D986DE9159', this.handle, animation, animGroup, f(p3));
1640
1631
  }
1641
1632
 
1642
1633
  /**
1643
1634
  * @returns
1644
1635
  */
1645
- N_0xAF72EC7E1B54539B(): Entity | null {
1646
- return createFromHandle<Entity>('Entity', inv<number>('0xAF72EC7E1B54539B', this.handle, rai()));
1636
+ hasCollidedWithAnything(): boolean {
1637
+ return !!inv<boolean>('0xDF18751EC74F90FF', this.handle, rai());
1647
1638
  }
1648
1639
 
1649
1640
  /**
@@ -1651,36 +1642,56 @@ export class Entity implements IHandle {
1651
1642
  *
1652
1643
  * @returns
1653
1644
  */
1654
- getObjectIndexFromIndex(): Prop | null {
1655
- return createFromHandle<Prop>('Prop', inv<number>('0x280BBE5601EAA983', this.handle, rai()));
1645
+ get VehicleIndexFromIndex(): Vehicle | null {
1646
+ return createFromHandle<Vehicle>('Vehicle', inv<number>('0xDF1E5AAC561AFC59', this.handle, rai()));
1656
1647
  }
1657
1648
 
1658
1649
  /**
1659
- * Has the entity1 got a clear line of sight to the other entity2 from the direction entity1 is facing.
1660
- *
1661
- * @param entity2
1662
- * @param traceType
1663
1650
  * @returns
1664
1651
  */
1665
- hasClearLosToEntityInFront(entity2: Entity, traceType: number): boolean {
1666
- return inv<boolean>('0xE88F19660651D566', this.handle, entity2.handle, traceType, rai());
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);
1667
1663
  }
1668
1664
 
1669
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
1670
1671
  * @returns
1671
1672
  */
1672
- isOnTrainTrack(): any {
1673
- return inv<number>('0x857ACB0AB4BD0D55', this.handle);
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);
1674
1679
  }
1675
1680
 
1676
1681
  /**
1677
- * @param angle
1678
1682
  * @returns
1679
1683
  */
1680
- isUpright(angle: number): boolean {
1681
- return inv<boolean>('0xF6F6AFD8D4FB2658', this.handle, f(angle), rai());
1684
+ hasBeenDamagedByAnyPed(): boolean {
1685
+ return !!inv<boolean>('0x9934E9C42D52D87E', this.handle, rai());
1682
1686
  }
1683
1687
 
1688
+
1689
+ /**
1690
+ * Gets the network ID of this entity for network synchronization.
1691
+ */
1692
+ get NetworkId(): number {
1693
+ return inv<number>('0xF260AF6F43953316', this.handle, rai());
1694
+ }
1684
1695
  }
1685
1696
 
1686
1697
  registerHandle('Entity', Entity);