@nativewrappers/redm-codegen 0.0.4 → 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 (317) hide show
  1. package/dist/classes/AnimScene.d.ts +96 -96
  2. package/dist/classes/AnimScene.d.ts.map +1 -1
  3. package/dist/classes/AnimScene.js +137 -137
  4. package/dist/classes/BaseModel.d.ts +19 -19
  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 +33 -33
  8. package/dist/classes/BaseTask.d.ts.map +1 -1
  9. package/dist/classes/BaseTask.js +40 -40
  10. package/dist/classes/Cam.d.ts +85 -85
  11. package/dist/classes/Cam.d.ts.map +1 -1
  12. package/dist/classes/Cam.js +108 -108
  13. package/dist/classes/Entity.d.ts +288 -283
  14. package/dist/classes/Entity.d.ts.map +1 -1
  15. package/dist/classes/Entity.js +410 -401
  16. package/dist/classes/Interior.d.ts +27 -27
  17. package/dist/classes/Interior.d.ts.map +1 -1
  18. package/dist/classes/Interior.js +42 -42
  19. package/dist/classes/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 +286 -286
  23. package/dist/classes/Ped.d.ts.map +1 -1
  24. package/dist/classes/Ped.js +425 -425
  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 +729 -729
  29. package/dist/classes/PedTask.d.ts.map +1 -1
  30. package/dist/classes/PedTask.js +935 -935
  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 +19 -19
  34. package/dist/classes/Pickup.d.ts +6 -6
  35. package/dist/classes/Pickup.d.ts.map +1 -1
  36. package/dist/classes/Pickup.js +13 -13
  37. package/dist/classes/Player.d.ts +343 -339
  38. package/dist/classes/Player.d.ts.map +1 -1
  39. package/dist/classes/Player.js +495 -489
  40. package/dist/classes/Prop.d.ts +64 -64
  41. package/dist/classes/Prop.d.ts.map +1 -1
  42. package/dist/classes/Prop.js +94 -94
  43. package/dist/classes/PropSet.d.ts +18 -18
  44. package/dist/classes/PropSet.d.ts.map +1 -1
  45. package/dist/classes/PropSet.js +27 -27
  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 +24 -24
  53. package/dist/classes/VehicleTask.d.ts.map +1 -1
  54. package/dist/classes/VehicleTask.js +30 -30
  55. package/dist/classes/Volume.d.ts +44 -44
  56. package/dist/classes/Volume.d.ts.map +1 -1
  57. package/dist/classes/Volume.js +58 -58
  58. package/dist/classes/Weapon.d.ts +351 -351
  59. package/dist/classes/Weapon.d.ts.map +1 -1
  60. package/dist/classes/Weapon.js +486 -486
  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 +48 -48
  68. package/dist/namespaces/Animscene.d.ts.map +1 -1
  69. package/dist/namespaces/Animscene.js +65 -65
  70. package/dist/namespaces/Audio.d.ts +476 -476
  71. package/dist/namespaces/Audio.d.ts.map +1 -1
  72. package/dist/namespaces/Audio.js +692 -692
  73. package/dist/namespaces/Bounty.d.ts +57 -57
  74. package/dist/namespaces/Bounty.d.ts.map +1 -1
  75. package/dist/namespaces/Bounty.js +90 -90
  76. package/dist/namespaces/CamStatics.d.ts +432 -432
  77. package/dist/namespaces/CamStatics.d.ts.map +1 -1
  78. package/dist/namespaces/CamStatics.js +606 -606
  79. package/dist/namespaces/Collection.d.ts +78 -78
  80. package/dist/namespaces/Collection.d.ts.map +1 -1
  81. package/dist/namespaces/Collection.js +111 -111
  82. package/dist/namespaces/Companion.d.ts +22 -22
  83. package/dist/namespaces/Companion.d.ts.map +1 -1
  84. package/dist/namespaces/Companion.js +30 -30
  85. package/dist/namespaces/Compapp.js +1 -1
  86. package/dist/namespaces/Compendium.d.ts +58 -58
  87. package/dist/namespaces/Compendium.d.ts.map +1 -1
  88. package/dist/namespaces/Compendium.js +83 -83
  89. package/dist/namespaces/Crashlog.d.ts +10 -10
  90. package/dist/namespaces/Crashlog.d.ts.map +1 -1
  91. package/dist/namespaces/Crashlog.js +21 -21
  92. package/dist/namespaces/Crew.js +4 -4
  93. package/dist/namespaces/Databinding.d.ts +154 -154
  94. package/dist/namespaces/Databinding.d.ts.map +1 -1
  95. package/dist/namespaces/Databinding.js +222 -222
  96. package/dist/namespaces/Datafile.js +4 -4
  97. package/dist/namespaces/Decorator.d.ts +19 -19
  98. package/dist/namespaces/Decorator.d.ts.map +1 -1
  99. package/dist/namespaces/Decorator.js +34 -34
  100. package/dist/namespaces/Dlc.d.ts +5 -5
  101. package/dist/namespaces/Dlc.d.ts.map +1 -1
  102. package/dist/namespaces/Dlc.js +9 -9
  103. package/dist/namespaces/EntityStatics.d.ts +80 -80
  104. package/dist/namespaces/EntityStatics.d.ts.map +1 -1
  105. package/dist/namespaces/EntityStatics.js +113 -113
  106. package/dist/namespaces/Event.js +4 -4
  107. package/dist/namespaces/Fire.d.ts +89 -89
  108. package/dist/namespaces/Fire.d.ts.map +1 -1
  109. package/dist/namespaces/Fire.js +115 -115
  110. package/dist/namespaces/Flock.js +2 -2
  111. package/dist/namespaces/Gang.js +2 -2
  112. package/dist/namespaces/GoogleAnalytics.js +2 -2
  113. package/dist/namespaces/Graphics.d.ts +781 -781
  114. package/dist/namespaces/Graphics.d.ts.map +1 -1
  115. package/dist/namespaces/Graphics.js +1207 -1207
  116. package/dist/namespaces/Hud.d.ts +483 -483
  117. package/dist/namespaces/Hud.d.ts.map +1 -1
  118. package/dist/namespaces/Hud.js +678 -678
  119. package/dist/namespaces/Ik.js +1 -1
  120. package/dist/namespaces/Interaction.js +3 -3
  121. package/dist/namespaces/InteriorStatics.d.ts +40 -40
  122. package/dist/namespaces/InteriorStatics.d.ts.map +1 -1
  123. package/dist/namespaces/InteriorStatics.js +57 -57
  124. package/dist/namespaces/Inventory.d.ts +211 -211
  125. package/dist/namespaces/Inventory.d.ts.map +1 -1
  126. package/dist/namespaces/Inventory.js +291 -291
  127. package/dist/namespaces/Itemdatabase.js +3 -3
  128. package/dist/namespaces/Itemset.js +2 -2
  129. package/dist/namespaces/Law.d.ts +1 -1
  130. package/dist/namespaces/Law.d.ts.map +1 -1
  131. package/dist/namespaces/Law.js +19 -19
  132. package/dist/namespaces/Localization.js +1 -1
  133. package/dist/namespaces/Map.js +3 -3
  134. package/dist/namespaces/Minigame.d.ts +65 -65
  135. package/dist/namespaces/Minigame.d.ts.map +1 -1
  136. package/dist/namespaces/Minigame.js +105 -105
  137. package/dist/namespaces/Misc.d.ts +3 -3
  138. package/dist/namespaces/Misc.d.ts.map +1 -1
  139. package/dist/namespaces/Misc.js +35 -35
  140. package/dist/namespaces/Missiondata.d.ts +15 -15
  141. package/dist/namespaces/Missiondata.d.ts.map +1 -1
  142. package/dist/namespaces/Missiondata.js +24 -24
  143. package/dist/namespaces/Money.js +3 -3
  144. package/dist/namespaces/Netshopping.d.ts +58 -58
  145. package/dist/namespaces/Netshopping.d.ts.map +1 -1
  146. package/dist/namespaces/Netshopping.js +89 -89
  147. package/dist/namespaces/Network.d.ts +1067 -1067
  148. package/dist/namespaces/Network.d.ts.map +1 -1
  149. package/dist/namespaces/Network.js +1586 -1586
  150. package/dist/namespaces/Object.d.ts +231 -231
  151. package/dist/namespaces/Object.d.ts.map +1 -1
  152. package/dist/namespaces/Object.js +337 -337
  153. package/dist/namespaces/Pad.d.ts +42 -42
  154. package/dist/namespaces/Pad.d.ts.map +1 -1
  155. package/dist/namespaces/Pad.js +68 -68
  156. package/dist/namespaces/Pathfind.js +10 -10
  157. package/dist/namespaces/PedStatics.d.ts +2 -2
  158. package/dist/namespaces/PedStatics.d.ts.map +1 -1
  159. package/dist/namespaces/PedStatics.js +10 -10
  160. package/dist/namespaces/Perschar.d.ts +54 -54
  161. package/dist/namespaces/Perschar.d.ts.map +1 -1
  162. package/dist/namespaces/Perschar.js +84 -84
  163. package/dist/namespaces/Physics.d.ts +121 -121
  164. package/dist/namespaces/Physics.d.ts.map +1 -1
  165. package/dist/namespaces/Physics.js +155 -155
  166. package/dist/namespaces/PlayerStatics.d.ts +97 -97
  167. package/dist/namespaces/PlayerStatics.d.ts.map +1 -1
  168. package/dist/namespaces/PlayerStatics.js +142 -142
  169. package/dist/namespaces/Population.d.ts +11 -11
  170. package/dist/namespaces/Population.d.ts.map +1 -1
  171. package/dist/namespaces/Population.js +15 -15
  172. package/dist/namespaces/Posse.d.ts +33 -33
  173. package/dist/namespaces/Posse.d.ts.map +1 -1
  174. package/dist/namespaces/Posse.js +51 -51
  175. package/dist/namespaces/Propset.d.ts +59 -59
  176. package/dist/namespaces/Propset.d.ts.map +1 -1
  177. package/dist/namespaces/Propset.js +81 -81
  178. package/dist/namespaces/Replay.d.ts +1 -1
  179. package/dist/namespaces/Replay.d.ts.map +1 -1
  180. package/dist/namespaces/Replay.js +2 -2
  181. package/dist/namespaces/Scripts.d.ts +1 -1
  182. package/dist/namespaces/Scripts.d.ts.map +1 -1
  183. package/dist/namespaces/Scripts.js +12 -12
  184. package/dist/namespaces/Shapetest.d.ts +11 -11
  185. package/dist/namespaces/Shapetest.d.ts.map +1 -1
  186. package/dist/namespaces/Shapetest.js +13 -13
  187. package/dist/namespaces/Socialclub.js +8 -8
  188. package/dist/namespaces/Socialclubfeed.js +1 -1
  189. package/dist/namespaces/Spactionproxy.js +4 -4
  190. package/dist/namespaces/Stats.d.ts +191 -191
  191. package/dist/namespaces/Stats.d.ts.map +1 -1
  192. package/dist/namespaces/Stats.js +281 -281
  193. package/dist/namespaces/Streaming.d.ts +84 -84
  194. package/dist/namespaces/Streaming.d.ts.map +1 -1
  195. package/dist/namespaces/Streaming.js +137 -137
  196. package/dist/namespaces/Task.d.ts +347 -347
  197. package/dist/namespaces/Task.d.ts.map +1 -1
  198. package/dist/namespaces/Task.js +488 -488
  199. package/dist/namespaces/Telemetry.d.ts +151 -151
  200. package/dist/namespaces/Telemetry.d.ts.map +1 -1
  201. package/dist/namespaces/Telemetry.js +206 -206
  202. package/dist/namespaces/Txd.js +1 -1
  203. package/dist/namespaces/Uiapps.d.ts +25 -25
  204. package/dist/namespaces/Uiapps.d.ts.map +1 -1
  205. package/dist/namespaces/Uiapps.js +36 -36
  206. package/dist/namespaces/Uievents.js +1 -1
  207. package/dist/namespaces/Uifeed.d.ts +15 -15
  208. package/dist/namespaces/Uifeed.d.ts.map +1 -1
  209. package/dist/namespaces/Uifeed.js +25 -25
  210. package/dist/namespaces/Uistickyfeed.d.ts +16 -16
  211. package/dist/namespaces/Uistickyfeed.d.ts.map +1 -1
  212. package/dist/namespaces/Uistickyfeed.js +21 -21
  213. package/dist/namespaces/Unlock.js +5 -5
  214. package/dist/namespaces/VehicleStatics.js +12 -12
  215. package/dist/namespaces/Voice.d.ts +38 -38
  216. package/dist/namespaces/Voice.d.ts.map +1 -1
  217. package/dist/namespaces/Voice.js +61 -61
  218. package/dist/namespaces/VolumeStatics.d.ts +99 -99
  219. package/dist/namespaces/VolumeStatics.d.ts.map +1 -1
  220. package/dist/namespaces/VolumeStatics.js +137 -137
  221. package/dist/namespaces/WeaponStatics.d.ts +276 -276
  222. package/dist/namespaces/WeaponStatics.d.ts.map +1 -1
  223. package/dist/namespaces/WeaponStatics.js +371 -371
  224. package/dist/types/NativeAliases.d.ts +3 -1
  225. package/dist/types/NativeAliases.d.ts.map +1 -1
  226. package/dist/types/NativeAliases.js +3 -1
  227. package/package.json +1 -1
  228. package/src/classes/AnimScene.ts +159 -159
  229. package/src/classes/BaseModel.ts +37 -37
  230. package/src/classes/BaseTask.ts +41 -41
  231. package/src/classes/Cam.ts +111 -111
  232. package/src/classes/Entity.ts +422 -411
  233. package/src/classes/Interior.ts +43 -43
  234. package/src/classes/ItemSet.ts +3 -3
  235. package/src/classes/Ped.ts +432 -432
  236. package/src/classes/PedModel.ts +2 -2
  237. package/src/classes/PedTask.ts +957 -957
  238. package/src/classes/PersChar.ts +22 -22
  239. package/src/classes/Pickup.ts +14 -14
  240. package/src/classes/Player.ts +994 -987
  241. package/src/classes/Prop.ts +106 -106
  242. package/src/classes/PropSet.ts +29 -29
  243. package/src/classes/Vehicle.ts +147 -147
  244. package/src/classes/VehicleModel.ts +2 -2
  245. package/src/classes/VehicleTask.ts +31 -31
  246. package/src/classes/Volume.ts +62 -62
  247. package/src/classes/Weapon.ts +511 -511
  248. package/src/namespaces/Aicoverpoint.ts +40 -40
  249. package/src/namespaces/Aitransport.ts +104 -104
  250. package/src/namespaces/Animscene.ts +71 -71
  251. package/src/namespaces/Audio.ts +725 -725
  252. package/src/namespaces/Bounty.ts +102 -102
  253. package/src/namespaces/CamStatics.ts +700 -700
  254. package/src/namespaces/Collection.ts +113 -113
  255. package/src/namespaces/Companion.ts +34 -34
  256. package/src/namespaces/Compapp.ts +1 -1
  257. package/src/namespaces/Compendium.ts +94 -94
  258. package/src/namespaces/Crashlog.ts +23 -23
  259. package/src/namespaces/Crew.ts +4 -4
  260. package/src/namespaces/Databinding.ts +237 -237
  261. package/src/namespaces/Datafile.ts +4 -4
  262. package/src/namespaces/Decorator.ts +37 -37
  263. package/src/namespaces/Dlc.ts +9 -9
  264. package/src/namespaces/EntityStatics.ts +117 -117
  265. package/src/namespaces/Event.ts +4 -4
  266. package/src/namespaces/Fire.ts +127 -127
  267. package/src/namespaces/Flock.ts +2 -2
  268. package/src/namespaces/Gang.ts +2 -2
  269. package/src/namespaces/GoogleAnalytics.ts +2 -2
  270. package/src/namespaces/Graphics.ts +1218 -1218
  271. package/src/namespaces/Hud.ts +696 -696
  272. package/src/namespaces/Ik.ts +1 -1
  273. package/src/namespaces/Interaction.ts +3 -3
  274. package/src/namespaces/InteriorStatics.ts +65 -65
  275. package/src/namespaces/Inventory.ts +294 -294
  276. package/src/namespaces/Itemdatabase.ts +3 -3
  277. package/src/namespaces/Itemset.ts +2 -2
  278. package/src/namespaces/Law.ts +20 -20
  279. package/src/namespaces/Localization.ts +1 -1
  280. package/src/namespaces/Map.ts +3 -3
  281. package/src/namespaces/Minigame.ts +109 -109
  282. package/src/namespaces/Misc.ts +38 -38
  283. package/src/namespaces/Missiondata.ts +28 -28
  284. package/src/namespaces/Money.ts +3 -3
  285. package/src/namespaces/Netshopping.ts +99 -99
  286. package/src/namespaces/Network.ts +1616 -1616
  287. package/src/namespaces/Object.ts +344 -344
  288. package/src/namespaces/Pad.ts +76 -76
  289. package/src/namespaces/Pathfind.ts +10 -10
  290. package/src/namespaces/PedStatics.ts +12 -12
  291. package/src/namespaces/Perschar.ts +86 -86
  292. package/src/namespaces/Physics.ts +171 -171
  293. package/src/namespaces/PlayerStatics.ts +162 -162
  294. package/src/namespaces/Population.ts +17 -17
  295. package/src/namespaces/Posse.ts +54 -54
  296. package/src/namespaces/Propset.ts +92 -92
  297. package/src/namespaces/Replay.ts +3 -3
  298. package/src/namespaces/Scripts.ts +13 -13
  299. package/src/namespaces/Shapetest.ts +14 -14
  300. package/src/namespaces/Socialclub.ts +8 -8
  301. package/src/namespaces/Socialclubfeed.ts +1 -1
  302. package/src/namespaces/Spactionproxy.ts +4 -4
  303. package/src/namespaces/Stats.ts +287 -287
  304. package/src/namespaces/Streaming.ts +159 -159
  305. package/src/namespaces/Task.ts +517 -517
  306. package/src/namespaces/Telemetry.ts +224 -224
  307. package/src/namespaces/Txd.ts +1 -1
  308. package/src/namespaces/Uiapps.ts +43 -43
  309. package/src/namespaces/Uievents.ts +1 -1
  310. package/src/namespaces/Uifeed.ts +28 -28
  311. package/src/namespaces/Uistickyfeed.ts +23 -23
  312. package/src/namespaces/Unlock.ts +5 -5
  313. package/src/namespaces/VehicleStatics.ts +12 -12
  314. package/src/namespaces/Voice.ts +70 -70
  315. package/src/namespaces/VolumeStatics.ts +143 -143
  316. package/src/namespaces/WeaponStatics.ts +383 -383
  317. package/src/types/NativeAliases.ts +6 -1
@@ -19,222 +19,330 @@ export class Weapon {
19
19
  this.ped = ped;
20
20
  }
21
21
 
22
+ /**
23
+ * @param visible
24
+ */
25
+ set PedAllWeaponsVisibility(visible: boolean) {
26
+ inv<void>('0x4F806A6CFED89468', this.ped.handle, visible);
27
+ }
28
+
22
29
  /**
23
30
  * @param weaponHash Refer to [enum: eWeaponHash]
24
- * @param ammoHash Refer to [enum: eAmmoType]
31
+ * @param ammo
32
+ * @returns
25
33
  */
26
- enableAmmoTypeForPedWeapon(weaponHash: eWeaponHash, ammoHash: eAmmoType): void {
27
- inv<void>('0x23FB9FACA28779C1', this.ped.handle, weaponHash, ammoHash);
34
+ setAmmoInClip(weaponHash: eWeaponHash, ammo: number): boolean {
35
+ return !!inv<boolean>('0xDCD2A934D65CB497', this.ped.handle, weaponHash, ammo, rai());
28
36
  }
29
37
 
30
38
  /**
31
- * @param toggle
39
+ * _GET_M* - _GET_PED_A*
40
+ *
41
+ * @param p1
42
+ * @returns
32
43
  */
33
- N_0x431240A58484D5D0(toggle: boolean): void {
34
- inv<void>('0x431240A58484D5D0', this.ped.handle, toggle);
44
+ getPedWeaponObject(p1: boolean): Prop | null {
45
+ return createFromHandle<Prop>('Prop', inv<number>('0x6CA484C9A7377E4F', this.ped.handle, p1, rai()));
35
46
  }
36
47
 
37
48
  /**
38
- * @param p2
39
- * @param p3
40
- * @returns outGUID
49
+ * slotHash is usually just the weaponHash name, but WEAPON_* is replaced with SLOT_*
50
+ *
51
+ * @param slotHash
52
+ * @returns
41
53
  */
42
- getBestPedShortarmGuid(p2: boolean, p3: boolean): number {
43
- const result = inv<number>('0xF52BD94B47CCF736', this.ped.handle, pvi(), p2, p3);
44
- return result;
54
+ getPedWeaponInSlot(slotHash: string | number): number {
55
+ return (inv<number>('0xDBC4B552B2AE9A83', this.ped.handle, _h(slotHash), rai())) & 0xFFFFFFFF;
45
56
  }
46
57
 
47
58
  /**
48
- * @returns coords
59
+ * Outputs cached guids
60
+ *
61
+ * @returns guidPrimary; guidSecondary
49
62
  */
50
- getPedLastWeaponImpactCoord(): [boolean, Vector3] {
51
- const result = inv<[boolean, number[]]>('0x6C4D0409BA1A2BC2', this.ped.handle, pvv(), rai());
52
- return [!!result[0], Vector3.fromArray(result[1])];
63
+ get PlayerPedQuickSwapWeaponByGuid(): [number, number] {
64
+ const result = inv<[number, number]>('0xB7E52A058B07C7E2', this.ped.handle, pvi(), pvi());
65
+ return [result[0], result[1]];
53
66
  }
54
67
 
55
68
  /**
56
- * Returns WeaponAttachPoint
69
+ * Returns true if the ped is currently holstering or unholstering a weapon
57
70
  *
58
- * @param attachPoint Refer to [enum: eWeaponAttachPoint]
59
71
  * @returns
60
72
  */
61
- getWeaponAttachPoint(attachPoint: number): number {
62
- return inv<number>('0xCAD4FE9398820D24', this.ped.handle, attachPoint, rai());
73
+ get IsWeaponHolsterStateChanging(): boolean {
74
+ return !!inv<boolean>('0x2387D6E9C6B478AA', this.ped.handle, rai());
75
+ }
76
+
77
+ /**
78
+ * @param ammoHash Refer to [enum: eAmmoType]
79
+ * @returns
80
+ */
81
+ N_0x44C8F4908F1B2622(ammoHash: eAmmoType): boolean {
82
+ return !!inv<boolean>('0x44C8F4908F1B2622', this.ped.handle, ammoHash, rai());
63
83
  }
64
84
 
65
85
  /**
66
86
  * @param p2
67
- * @param attachPoint Refer to [enum: eWeaponAttachPoint]
68
- * @param p4
69
- * @returns weaponHash: Refer to [enum: eWeaponHash]
87
+ * @returns clipInventoryUid
70
88
  */
71
- getCurrentPedWeapon(p2: boolean, attachPoint: number, p4: boolean): [boolean, number] {
72
- const result = inv<[boolean, number]>('0x3A87E44BB9A01D54', this.ped.handle, pvi(), p2, attachPoint, p4, rai());
73
- return [!!result[0], result[1]];
89
+ refillAmmoInClip(p2: number): [any, number] {
90
+ const result = inv<[number, number]>('0xDF4A3404D022ADDE', this.ped.handle, pvi(), p2);
91
+ return [result[0], result[1]];
74
92
  }
75
93
 
76
94
  /**
77
- * Returns whether the ped has a revolver p1: 0 or 1
95
+ * _SET_A* - _SET_B*
78
96
  *
79
97
  * @param p1
98
+ */
99
+ N_0x2EBF70E1D8C06683(p1: string | number): void {
100
+ inv<void>('0x2EBF70E1D8C06683', this.ped.handle, _h(p1));
101
+ }
102
+
103
+ /**
104
+ * @param ammoType
80
105
  * @returns
81
106
  */
82
- doesPedHaveRevolver(p1: number): any {
83
- return inv<number>('0x5B235F24472F2C3B', this.ped.handle, p1);
107
+ getPedAmmoByType(ammoType: string | number): number {
108
+ return inv<number>('0x39D22031557946C1', this.ped.handle, _h(ammoType), rai());
84
109
  }
85
110
 
86
111
  /**
87
- * Returns emote Hash
88
- *
112
+ * @param p1
113
+ * @param p2
89
114
  * @returns
90
115
  */
91
- getPedGunSpinningEquippedKitEmoteTwirl(): number {
92
- return (inv<number>('0x2C4FEC3D0EFA9FC0', this.ped.handle, rai())) & 0xFFFFFFFF;
116
+ getBestPedWeapon(p1: boolean, p2: boolean): number {
117
+ return (inv<number>('0x8483E98E8B888AE2', this.ped.handle, p1, p2, rai())) & 0xFFFFFFFF;
93
118
  }
94
119
 
95
120
  /**
96
- * Returns ammoHash from weaponObject (Returned by 0x6CA484C9A7377E4F)
121
+ * @param toggle
122
+ * @param weaponHash Refer to [enum: eWeaponHash]
123
+ */
124
+ setPedInfiniteAmmo(toggle: boolean, weaponHash: eWeaponHash): void {
125
+ inv<void>('0x3EDCB0505123623B', this.ped.handle, toggle, weaponHash);
126
+ }
127
+
128
+ /**
129
+ * @param weaponHash Refer to [enum: eWeaponHash]
130
+ * @param ammoHash Refer to [enum: eAmmoType]
131
+ */
132
+ setAmmoTypeForPedWeapon(weaponHash: eWeaponHash, ammoHash: eAmmoType): void {
133
+ inv<void>('0xCC9C4393523833E2', this.ped.handle, weaponHash, ammoHash);
134
+ }
135
+
136
+ /**
137
+ * *GET_BEST** - *GET_CLOSEST**
97
138
  *
98
- * @param weaponObject
139
+ * @returns weaponGuid
140
+ */
141
+ get CorrectKitEmoteTwirlGun(): [boolean, number] {
142
+ const result = inv<[boolean, number]>('0xCD356B42C57BFE01', this.ped.handle, pvi(), rai());
143
+ return [!!result[0], result[1]];
144
+ }
145
+
146
+ /**
147
+ * @param weaponHash Refer to [enum: eWeaponHash]
99
148
  * @returns
100
149
  */
101
- getCurrentPedWeaponAmmoType(weaponObject: Prop): number {
102
- return (inv<number>('0x7E7B19A4355FEE13', this.ped.handle, weaponObject.handle, rai())) & 0xFFFFFFFF;
150
+ setCurrentPedVehicleWeapon(weaponHash: eWeaponHash): boolean {
151
+ return !!inv<boolean>('0x75C55983C2C39DAA', this.ped.handle, weaponHash, rai());
103
152
  }
104
153
 
105
154
  /**
155
+ * Returns whether the ped has a rifle p1: 0 or 1
156
+ *
106
157
  * @param p1
107
- * @param p2
108
- * @param p3
109
158
  * @returns
110
159
  */
111
- getPedWorstWeapon(p1: boolean, p2: boolean, p3: boolean): number {
112
- return (inv<number>('0xDA37A053C1522F5D', this.ped.handle, p1, p2, p3, rai())) & 0xFFFFFFFF;
160
+ doesPedHaveRifle(p1: number): any {
161
+ return inv<number>('0x95CA12E2C68043E5', this.ped.handle, p1);
113
162
  }
114
163
 
115
164
  /**
116
- * @param toggle
165
+ * Puts the gun visibly in your horse's holster without having to be close to the horse. Use `_SEND_WEAPON_TO_INVENTORY` before using this native
166
+ * _A* or _B*
167
+ *
168
+ * @param weaponHash Refer to [enum: eWeaponHash]
169
+ * @param ped
117
170
  */
118
- setPedDropsWeaponsWhenDead(toggle: boolean): void {
119
- inv<void>('0x476AE72C1D19D1A8', this.ped.handle, toggle);
171
+ N_0x14FF0C2545527F9B(weaponHash: eWeaponHash, ped: Ped): void {
172
+ inv<void>('0x14FF0C2545527F9B', this.ped.handle, weaponHash, ped.handle);
120
173
  }
121
174
 
122
175
  /**
123
- * Returns ammoHash
176
+ * Returns iSpinHash / iVariationSpin
124
177
  *
125
- * @returns Returns the [enum: eAmmoType]; weaponGuid
178
+ * @param weaponEmoteVariation
179
+ * @returns
126
180
  */
127
- getCurrentAmmoTypeFromGuid(): [number, number] {
128
- const result = inv<[number, number]>('0xAF9D167A5656D6A6', this.ped.handle, pvi(), rai());
129
- return [result[0] & 0xFFFFFFFF, result[1]];
181
+ getPedGunSpinningHashFromWeaponEmoteVariation(weaponEmoteVariation: number): number {
182
+ return (inv<number>('0xF3B1620B920D1708', this.ped.handle, weaponEmoteVariation, rai())) & 0xFFFFFFFF;
130
183
  }
131
184
 
132
185
  /**
133
- * @param toggle
186
+ * Returns whether the ped has a repeater p1: 0 or 1
187
+ *
188
+ * @param p1
189
+ * @returns
134
190
  */
135
- setPedInfiniteAmmoClip(toggle: boolean): void {
136
- inv<void>('0xFBAA1E06B6BCA741', this.ped.handle, toggle);
191
+ doesPedHaveRepeater(p1: number): any {
192
+ return inv<number>('0x495A04CAEC263AF8', this.ped.handle, p1);
137
193
  }
138
194
 
139
195
  /**
140
- * returns the amount of peds that were restrained with the weapon thrown bolas
196
+ * @param weaponCollection
197
+ */
198
+ giveWeaponCollectionToPed(weaponCollection: string | number): void {
199
+ inv<void>('0x899A04AFCC725D04', this.ped.handle, _h(weaponCollection));
200
+ }
201
+
202
+ /**
203
+ * @returns
204
+ */
205
+ enableWeaponRestore(): any {
206
+ return inv<number>('0xC395355843BE134B', this.ped.handle);
207
+ }
208
+
209
+ /**
210
+ * Returns whether the specified ped is holding a weapon with the given hash.
211
+ * only these weapons below return true
212
+ * WEAPON_BOW, WEAPON_KIT_METAL_DETECTOR, WEAPON_MELEE_CLEAVER, WEAPON_MELEE_DAVY_LANTERN, WEAPON_MELEE_HATCHET, WEAPON_MELEE_HATCHET_HUNTER, WEAPON_MELEE_KNIFE_JAWBONE, WEAPON_MELEE_LANTERN WEAPON_MELEE_TORCH, WEAPON_MOONSHINEJUG_MP, WEAPON_RIFLE_BOLTACTION, WEAPON_SHOTGUN_PUMP, WEAPON_THROWN_BOLAS, WEAPON_THROWN_MOLOTOV
141
213
  *
214
+ * @param weapon
142
215
  * @returns
143
216
  */
144
- getNumPedsRestrainedFromWeaponBolas(): any {
145
- return inv<number>('0x46D42883E873C1D7', this.ped.handle);
217
+ isPedHoldingWeapon(weapon: string | number): boolean {
218
+ return !!inv<boolean>('0x07E1C35F0078C3F9', this.ped.handle, _h(weapon), rai());
146
219
  }
147
220
 
148
221
  /**
149
- * Stores longarms to your horse on dismount
150
- * Params: p2 = 0
151
- * SET_[I - M]*
222
+ * _GET_D* - _GET_L*
152
223
  *
153
- * @param storeLongarms
154
- * @param p2
224
+ * @returns
155
225
  */
156
- setInstantlyStoreLongarmsOnDismount(storeLongarms: boolean, p2: number): void {
157
- inv<void>('0xB832F1A686B9B810', this.ped.handle, storeLongarms, p2);
226
+ N_0x0DE0944ECCB3DF5D(): boolean {
227
+ return !!inv<boolean>('0x0DE0944ECCB3DF5D', this.ped.handle, rai());
158
228
  }
159
229
 
160
230
  /**
161
- * @param removeReason Refer to [enum: eRemoveItemReason]
162
- * @returns weaponGuid
231
+ * @param flags
232
+ * @returns
163
233
  */
164
- removeWeaponFromPedByGuid(removeReason: eRemoveItemReason): number {
165
- const result = inv<number>('0x51C3B71591811485', this.ped.handle, pvi(), removeReason);
166
- return result;
234
+ isPedArmed(flags: number): boolean {
235
+ return !!inv<boolean>('0xCB690F680A3EA971', this.ped.handle, flags, rai());
167
236
  }
168
237
 
169
238
  /**
170
- * attachPoint:
239
+ * Returns whether the ped has a sniper p1: 0 or 1
171
240
  *
172
- * @param weaponHash Refer to [enum: eWeaponHash]
173
- * @param equipNow
174
- * @param attachPoint Refer to [enum: eWeaponAttachPoint]
175
- * @param p4
176
- * @param p5
241
+ * @param p1
242
+ * @returns
177
243
  */
178
- setCurrentPedWeapon(weaponHash: eWeaponHash, equipNow: boolean, attachPoint: number, p4: boolean, p5: boolean): void {
179
- inv<void>('0xADF692B254977C0C', this.ped.handle, weaponHash, equipNow, attachPoint, p4, p5);
244
+ doesPedHaveSniper(p1: number): any {
245
+ return inv<number>('0x80BB243789008A82', this.ped.handle, p1);
180
246
  }
181
247
 
182
248
  /**
183
- * Equips a weapon from a weaponItem, similar to GIVE_WEAPON_TO_PED
249
+ * Returns the ped's default unarmed weapon hash as defined in CPedModelInfo (DefaultUnarmedWeapon).
250
+ * Falls back to WEAPON_UNARMED if the ped doesn't have a valid model info pointer, or 0 if the ped doesn't exist.
184
251
  *
185
- * @param p2
186
- * @param p3
187
- * @param p4
188
- * @param p5
189
- * @returns weaponUid
252
+ * @returns
190
253
  */
191
- setCurrentPedWeaponByGuid(p2: boolean, p3: boolean, p4: boolean, p5: boolean): number {
192
- const result = inv<number>('0x12FB95FE3D579238', this.ped.handle, pvi(), p2, p3, p4, p5);
193
- return result;
254
+ get DefaultUnarmedWeaponHash(): number {
255
+ return (inv<number>('0x08FF1099ED2E6E21', this.ped.handle, rai())) & 0xFFFFFFFF;
194
256
  }
195
257
 
196
258
  /**
197
- * @param componentHash
198
259
  * @param weaponHash Refer to [enum: eWeaponHash]
260
+ * @param p2
199
261
  * @returns
200
262
  */
201
- hasPedGotWeaponComponent(componentHash: string | number, weaponHash: eWeaponHash): any {
202
- return inv<number>('0xBBC67A6F965C688A', this.ped.handle, _h(componentHash), weaponHash);
263
+ getMaxAmmoInClip(weaponHash: eWeaponHash, p2: boolean): number {
264
+ return inv<number>('0xA38DCFFCEA8962FA', this.ped.handle, weaponHash, p2, rai());
265
+ }
266
+
267
+ /**
268
+ * @param attachPoint Refer to [enum: eWeaponAttachPoint]
269
+ * @returns Returns the weapon entity
270
+ */
271
+ getCurrentPedWeaponEntityIndex(attachPoint: number): Entity | null {
272
+ return createFromHandle<Entity>('Entity', inv<number>('0x3B390A939AF0B5FC', this.ped.handle, attachPoint, rai()));
203
273
  }
204
274
 
205
275
  /**
206
276
  * @param weaponHash Refer to [enum: eWeaponHash]
207
- * @param amount The amount of ped to add to the ammo
208
- * @param addReason Refer to [enum: eAddItemReason]
277
+ * @param ammoHash Refer to [enum: eAmmoType]
209
278
  */
210
- addAmmoToPed(weaponHash: eWeaponHash, amount: number, addReason: eAddItemReason): void {
211
- inv<void>('0xB190BCA3F4042F95', this.ped.handle, weaponHash, amount, addReason);
279
+ enableAmmoTypeForPedWeapon(weaponHash: eWeaponHash, ammoHash: eAmmoType): void {
280
+ inv<void>('0x23FB9FACA28779C1', this.ped.handle, weaponHash, ammoHash);
212
281
  }
213
282
 
214
283
  /**
215
- * @param ammoType
216
- * @param amount
217
- * @param addReason Refer to [enum: eAddItemReason]
284
+ * @param toggle
218
285
  */
219
- addAmmoToPedByType(ammoType: string | number, amount: number, addReason: eAddItemReason): void {
220
- inv<void>('0x106A811C6D3035F3', this.ped.handle, _h(ammoType), amount, addReason);
286
+ N_0x431240A58484D5D0(toggle: boolean): void {
287
+ inv<void>('0x431240A58484D5D0', this.ped.handle, toggle);
221
288
  }
222
289
 
223
290
  /**
224
- * @param targetPed
291
+ * @param p2
292
+ * @param p3
293
+ * @returns outGUID
294
+ */
295
+ getBestPedShortarmGuid(p2: boolean, p3: boolean): number {
296
+ const result = inv<number>('0xF52BD94B47CCF736', this.ped.handle, pvi(), p2, p3);
297
+ return result;
298
+ }
299
+
300
+ /**
301
+ * @returns coords
302
+ */
303
+ get PedLastWeaponImpactCoord(): [boolean, Vector3] {
304
+ const result = inv<[boolean, number[]]>('0x6C4D0409BA1A2BC2', this.ped.handle, pvv(), rai());
305
+ return [!!result[0], Vector3.fromArray(result[1])];
306
+ }
307
+
308
+ /**
309
+ * Returns WeaponAttachPoint
310
+ *
311
+ * @param attachPoint Refer to [enum: eWeaponAttachPoint]
225
312
  * @returns
226
313
  */
227
- isTargetPedConstrainedByPedUsingBolas(targetPed: Ped): boolean {
228
- return inv<boolean>('0x8D50F43298AB9545', this.ped.handle, targetPed.handle, rai());
314
+ getWeaponAttachPoint(attachPoint: number): number {
315
+ return inv<number>('0xCAD4FE9398820D24', this.ped.handle, attachPoint, rai());
229
316
  }
230
317
 
231
318
  /**
319
+ * @param p2
320
+ * @param attachPoint Refer to [enum: eWeaponAttachPoint]
321
+ * @param p4
322
+ * @returns weaponHash: Refer to [enum: eWeaponHash]
323
+ */
324
+ getCurrentPedWeapon(p2: boolean, attachPoint: number, p4: boolean): [boolean, number] {
325
+ const result = inv<[boolean, number]>('0x3A87E44BB9A01D54', this.ped.handle, pvi(), p2, attachPoint, p4, rai());
326
+ return [!!result[0], result[1]];
327
+ }
328
+
329
+ /**
330
+ * Returns whether the ped has a revolver p1: 0 or 1
331
+ *
232
332
  * @param p1
233
- * @returns guidPrimary
333
+ * @returns
234
334
  */
235
- getBestPedWeaponInInventory(p1: any): [any, number] {
236
- const result = inv<[number, number]>('0x7B98500614C8E8B8', this.ped.handle, p1, pvi());
237
- return [result[0], result[1]];
335
+ doesPedHaveRevolver(p1: number): any {
336
+ return inv<number>('0x5B235F24472F2C3B', this.ped.handle, p1);
337
+ }
338
+
339
+ /**
340
+ * Returns emote Hash
341
+ *
342
+ * @returns
343
+ */
344
+ get PedGunSpinningEquippedKitEmoteTwirl(): number {
345
+ return (inv<number>('0x2C4FEC3D0EFA9FC0', this.ped.handle, rai())) & 0xFFFFFFFF;
238
346
  }
239
347
 
240
348
  /**
@@ -257,14 +365,14 @@ export class Weapon {
257
365
  /**
258
366
  * @returns
259
367
  */
260
- isPedCurrentWeaponHolstered(): any {
368
+ get IsPedCurrentWeaponHolstered(): any {
261
369
  return inv<number>('0xBDD9C235D8D1052E', this.ped.handle);
262
370
  }
263
371
 
264
372
  /**
265
373
  * @param toggle
266
374
  */
267
- setInstantlyEquipWeaponPickups(toggle: boolean): void {
375
+ set InstantlyEquipWeaponPickups(toggle: boolean) {
268
376
  inv<void>('0x739B9C6D0E7F7F93', this.ped.handle, toggle);
269
377
  }
270
378
 
@@ -288,7 +396,7 @@ export class Weapon {
288
396
  /**
289
397
  * @returns Returns the total ammo in the ped weapon from it's guid, or `0`.; guid
290
398
  */
291
- getAmmoInPedWeaponFromGuid(): [number, number] {
399
+ get AmmoInPedWeaponFromGuid(): [number, number] {
292
400
  const result = inv<[number, number]>('0x4823F13A21F51964', this.ped.handle, pvi(), rai());
293
401
  return [result[0], result[1]];
294
402
  }
@@ -302,161 +410,151 @@ export class Weapon {
302
410
  }
303
411
 
304
412
  /**
305
- * @param ammoHash Refer to [enum: eAmmoType]
306
- */
307
- disableAmmoTypeForPed(ammoHash: eAmmoType): void {
308
- inv<void>('0xAA5A52204E077883', this.ped.handle, ammoHash);
309
- }
310
-
311
- /**
312
- * Returns whether the ped has a shotgun p1: 0 or 1
413
+ * Stores longarms to your horse on dismount
414
+ * Params: p2 = 0
415
+ * SET_[I - M]*
313
416
  *
314
- * @param p1
315
- * @returns
417
+ * @param storeLongarms
418
+ * @param p2
316
419
  */
317
- doesPedHaveShotgun(p1: number): any {
318
- return inv<number>('0xABC18A28BAD4B46F', this.ped.handle, p1);
319
- }
320
-
321
- clearPedLastWeaponDamage(): void {
322
- inv<void>('0x087D8F4BC65F68E4', this.ped.handle);
420
+ setInstantlyStoreLongarmsOnDismount(storeLongarms: boolean, p2: number): void {
421
+ inv<void>('0xB832F1A686B9B810', this.ped.handle, storeLongarms, p2);
323
422
  }
324
423
 
325
424
  /**
326
- * Returns true if ped is on a horse while inside of a town
327
- * Params: p1 = 0
328
- * GET_L* - GET_MA*
329
- *
330
- * @param p1
331
- * @returns
425
+ * @param removeReason Refer to [enum: eRemoveItemReason]
426
+ * @returns weaponGuid
332
427
  */
333
- N_0x5A695BD328586B44(p1: number): any {
334
- return inv<number>('0x5A695BD328586B44', this.ped.handle, p1);
428
+ removeWeaponFromPedByGuid(removeReason: eRemoveItemReason): number {
429
+ const result = inv<number>('0x51C3B71591811485', this.ped.handle, pvi(), removeReason);
430
+ return result;
335
431
  }
336
432
 
337
433
  /**
434
+ * attachPoint:
435
+ *
338
436
  * @param weaponHash Refer to [enum: eWeaponHash]
339
- * @param amount
340
- * @param removeReason Refer to [enum: eRemoveItemReason]
437
+ * @param equipNow
438
+ * @param attachPoint Refer to [enum: eWeaponAttachPoint]
439
+ * @param p4
440
+ * @param p5
341
441
  */
342
- removeAmmoFromPed(weaponHash: eWeaponHash, amount: number, removeReason: eRemoveItemReason): void {
343
- inv<void>('0xF4823C813CB8277D', this.ped.handle, weaponHash, amount, removeReason);
442
+ setCurrentPedWeapon(weaponHash: eWeaponHash, equipNow: boolean, attachPoint: number, p4: boolean, p5: boolean): void {
443
+ inv<void>('0xADF692B254977C0C', this.ped.handle, weaponHash, equipNow, attachPoint, p4, p5);
344
444
  }
345
445
 
346
446
  /**
347
- * @param p1
447
+ * Equips a weapon from a weaponItem, similar to GIVE_WEAPON_TO_PED
448
+ *
348
449
  * @param p2
450
+ * @param p3
451
+ * @param p4
452
+ * @param p5
453
+ * @returns weaponUid
349
454
  */
350
- setPedAmmoToDrop(p1: number, p2: number): void {
351
- inv<void>('0xA4EFEF9440A5B0EF', this.ped.handle, p1, p2);
455
+ setCurrentPedWeaponByGuid(p2: boolean, p3: boolean, p4: boolean, p5: boolean): number {
456
+ const result = inv<number>('0x12FB95FE3D579238', this.ped.handle, pvi(), p2, p3, p4, p5);
457
+ return result;
352
458
  }
353
459
 
354
460
  /**
355
- * Returns the current ammo type of the specified ped's specified weapon.
356
- *
461
+ * @param componentHash
357
462
  * @param weaponHash Refer to [enum: eWeaponHash]
358
463
  * @returns
359
464
  */
360
- getPedAmmoTypeFromWeapon(weaponHash: eWeaponHash): number {
361
- return (inv<number>('0x7FEAD38B326B9F74', this.ped.handle, weaponHash, rai())) & 0xFFFFFFFF;
465
+ hasPedGotWeaponComponent(componentHash: string | number, weaponHash: eWeaponHash): any {
466
+ return inv<number>('0xBBC67A6F965C688A', this.ped.handle, _h(componentHash), weaponHash);
362
467
  }
363
468
 
364
469
  /**
365
470
  * @param weaponHash Refer to [enum: eWeaponHash]
366
- * @returns ammo
471
+ * @param amount The amount of ped to add to the ammo
472
+ * @param addReason Refer to [enum: eAddItemReason]
367
473
  */
368
- getMaxAmmo(weaponHash: eWeaponHash): [boolean, number] {
369
- const result = inv<[boolean, number]>('0xDC16122C7A20C933', this.ped.handle, pvi(), weaponHash, rai());
370
- return [!!result[0], result[1]];
474
+ addAmmoToPed(weaponHash: eWeaponHash, amount: number, addReason: eAddItemReason): void {
475
+ inv<void>('0xB190BCA3F4042F95', this.ped.handle, weaponHash, amount, addReason);
371
476
  }
372
477
 
373
478
  /**
374
- * emote hashes: KIT_EMOTE_TWIRL_GUN, KIT_EMOTE_TWIRL_GUN_LEFT_HOLSTER, KIT_EMOTE_TWIRL_GUN_DUAL, 0 (to unequip)
375
- *
376
- * @param emote
479
+ * @param ammoType
480
+ * @param amount
481
+ * @param addReason Refer to [enum: eAddItemReason]
377
482
  */
378
- setActiveGunSpinningEquipKitEmoteTwirl(emote: string | number): void {
379
- inv<void>('0xCBCFFF805F1B4596', this.ped.handle, _h(emote));
483
+ addAmmoToPedByType(ammoType: string | number, amount: number, addReason: eAddItemReason): void {
484
+ inv<void>('0x106A811C6D3035F3', this.ped.handle, _h(ammoType), amount, addReason);
380
485
  }
381
486
 
382
487
  /**
488
+ * @param targetPed
383
489
  * @returns
384
490
  */
385
- enableWeaponRestore(): any {
386
- return inv<number>('0xC395355843BE134B', this.ped.handle);
491
+ isTargetPedConstrainedByPedUsingBolas(targetPed: Ped): boolean {
492
+ return !!inv<boolean>('0x8D50F43298AB9545', this.ped.handle, targetPed.handle, rai());
387
493
  }
388
494
 
389
495
  /**
390
- * Returns whether the specified ped is holding a weapon with the given hash.
391
- * only these weapons below return true
392
- * WEAPON_BOW, WEAPON_KIT_METAL_DETECTOR, WEAPON_MELEE_CLEAVER, WEAPON_MELEE_DAVY_LANTERN, WEAPON_MELEE_HATCHET, WEAPON_MELEE_HATCHET_HUNTER, WEAPON_MELEE_KNIFE_JAWBONE, WEAPON_MELEE_LANTERN WEAPON_MELEE_TORCH, WEAPON_MOONSHINEJUG_MP, WEAPON_RIFLE_BOLTACTION, WEAPON_SHOTGUN_PUMP, WEAPON_THROWN_BOLAS, WEAPON_THROWN_MOLOTOV
393
- *
394
- * @param weapon
395
- * @returns
496
+ * @param p1
497
+ * @returns guidPrimary
396
498
  */
397
- isPedHoldingWeapon(weapon: string | number): boolean {
398
- return inv<boolean>('0x07E1C35F0078C3F9', this.ped.handle, _h(weapon), rai());
499
+ getBestPedWeaponInInventory(p1: any): [any, number] {
500
+ const result = inv<[number, number]>('0x7B98500614C8E8B8', this.ped.handle, p1, pvi());
501
+ return [result[0], result[1]];
399
502
  }
400
503
 
401
504
  /**
402
- * _GET_D* - _GET_L*
403
- *
404
- * @returns
505
+ * @param toggle
405
506
  */
406
- N_0x0DE0944ECCB3DF5D(): boolean {
407
- return inv<boolean>('0x0DE0944ECCB3DF5D', this.ped.handle, rai());
507
+ set AllowAnyWeaponDrop(toggle: boolean) {
508
+ inv<void>('0x78030C7867D8B9B6', this.ped.handle, toggle);
408
509
  }
409
510
 
410
511
  /**
411
- * @param flags
412
512
  * @returns
413
513
  */
414
- isPedArmed(flags: number): any {
415
- return inv<number>('0xCB690F680A3EA971', this.ped.handle, flags);
514
+ makePedReload(): any {
515
+ return inv<number>('0x79E1E511FF7EFB13', this.ped.handle);
416
516
  }
417
517
 
418
518
  /**
419
- * Returns whether the ped has a sniper p1: 0 or 1
420
- *
421
- * @param p1
422
- * @returns
519
+ * @param weaponHash Refer to [enum: eWeaponHash]
520
+ * @param ammoCount
521
+ * @param p3
522
+ * @param addReason Refer to [enum: eAddItemReason]
423
523
  */
424
- doesPedHaveSniper(p1: number): any {
425
- return inv<number>('0x80BB243789008A82', this.ped.handle, p1);
524
+ giveDelayedWeaponToPed(weaponHash: eWeaponHash, ammoCount: number, p3: boolean, addReason: eAddItemReason): void {
525
+ inv<void>('0xB282DC6EBD803C75', this.ped.handle, weaponHash, ammoCount, p3, addReason);
426
526
  }
427
527
 
428
528
  /**
429
- * Returns the ped's default unarmed weapon hash as defined in CPedModelInfo (DefaultUnarmedWeapon).
430
- * Falls back to WEAPON_UNARMED if the ped doesn't have a valid model info pointer, or 0 if the ped doesn't exist.
431
- *
432
- * @returns
529
+ * @param toggle
433
530
  */
434
- getDefaultUnarmedWeaponHash(): number {
435
- return (inv<number>('0x08FF1099ED2E6E21', this.ped.handle, rai())) & 0xFFFFFFFF;
531
+ N_0x45E57FDD531C9477(toggle: boolean): void {
532
+ inv<void>('0x45E57FDD531C9477', this.ped.handle, toggle);
533
+ }
534
+
535
+ /**
536
+ * @param ammoHash Refer to [enum: eAmmoType]
537
+ * @returns weaponInventoryUid
538
+ */
539
+ setAmmoTypeForPedWeaponInventory(ammoHash: eAmmoType): number {
540
+ const result = inv<number>('0xEBE46B501BC3FBCF', this.ped.handle, pvi(), ammoHash);
541
+ return result;
436
542
  }
437
543
 
438
544
  /**
439
545
  * @param weaponHash Refer to [enum: eWeaponHash]
440
546
  * @param p2
441
- * @returns
442
- */
443
- getMaxAmmoInClip(weaponHash: eWeaponHash, p2: boolean): number {
444
- return inv<number>('0xA38DCFFCEA8962FA', this.ped.handle, weaponHash, p2, rai());
445
- }
446
-
447
- /**
448
- * @param attachPoint Refer to [enum: eWeaponAttachPoint]
449
- * @returns Returns the weapon entity
547
+ * @param removeReason Refer to [enum: eRemoveItemReason]
450
548
  */
451
- getCurrentPedWeaponEntityIndex(attachPoint: number): Entity | null {
452
- return createFromHandle<Entity>('Entity', inv<number>('0x3B390A939AF0B5FC', this.ped.handle, attachPoint, rai()));
549
+ removeWeaponFromPed(weaponHash: eWeaponHash, p2: boolean, removeReason: eRemoveItemReason): void {
550
+ inv<void>('0x4899CB088EDF59B8', this.ped.handle, weaponHash, p2, removeReason);
453
551
  }
454
552
 
455
553
  /**
456
554
  * @returns
457
555
  */
458
- isPedWeaponReadyToShoot(): boolean {
459
- return inv<boolean>('0xB80CA294F2F26749', this.ped.handle, rai());
556
+ get IsPedWeaponReadyToShoot(): boolean {
557
+ return !!inv<boolean>('0xB80CA294F2F26749', this.ped.handle, rai());
460
558
  }
461
559
 
462
560
  /**
@@ -497,7 +595,7 @@ export class Weapon {
497
595
  /**
498
596
  * @param allow
499
597
  */
500
- setAllowDualWield(allow: boolean): void {
598
+ set AllowDualWield(allow: boolean) {
501
599
  inv<void>('0x83B8D50EB9446BBA', this.ped.handle, allow);
502
600
  }
503
601
 
@@ -522,8 +620,8 @@ export class Weapon {
522
620
  * @param weaponHash Refer to [enum: eWeaponHash]
523
621
  * @returns
524
622
  */
525
- isPedCarryingWeapon(weaponHash: eWeaponHash): any {
526
- return inv<number>('0xF29A186ED428B552', this.ped.handle, weaponHash);
623
+ isPedCarryingWeapon(weaponHash: eWeaponHash): boolean {
624
+ return !!inv<boolean>('0xF29A186ED428B552', this.ped.handle, weaponHash, rai());
527
625
  }
528
626
 
529
627
  /**
@@ -545,461 +643,282 @@ export class Weapon {
545
643
  inv<void>('0xFCCC886EDE3C63EC', this.ped.handle, p0, immediately);
546
644
  }
547
645
 
548
- /**
549
- * @param weaponHash Refer to [enum: eWeaponHash]
550
- * @returns ammo
551
- */
552
- getAmmoInClip(weaponHash: eWeaponHash): [boolean, number] {
553
- const result = inv<[boolean, number]>('0x2E1202248937775C', this.ped.handle, pvi(), weaponHash, rai());
554
- return [!!result[0], result[1]];
555
- }
556
-
557
646
  /**
558
647
  * @param toggle
559
648
  */
560
- N_0x16D9841A85FA627E(toggle: boolean): void {
561
- inv<void>('0x16D9841A85FA627E', this.ped.handle, toggle);
562
- }
563
-
564
- /**
565
- * @param weaponHash Refer to [enum: eWeaponHash]
566
- * @param offset
567
- * @param ammoCount
568
- */
569
- setPedDropsInventoryWeapon(weaponHash: eWeaponHash, offset: Vector3, ammoCount: number): void {
570
- inv<void>('0x208A1888007FC0E6', this.ped.handle, weaponHash, f(offset.x), f(offset.y), f(offset.z), ammoCount);
571
- }
572
-
573
- /**
574
- * spinHash can be -1, 0 to disable
575
- *
576
- * @param weaponEmoteTrickType
577
- * @param spin
578
- */
579
- setActiveGunSpinningKitEmoteTwirl(weaponEmoteTrickType: number, spin: string | number): void {
580
- inv<void>('0x01F661BB9C71B465', this.ped.handle, weaponEmoteTrickType, _h(spin));
581
- }
582
-
583
- /**
584
- * Appears to just send specified weapon to your horse holster without having to be close
585
- * However, the weapon is not visible on the horse holster, but you can reach the weapon on the weapon wheel
586
- *
587
- * @param weaponHash Refer to [enum: eWeaponHash]
588
- */
589
- sendWeaponToInventory(weaponHash: eWeaponHash): void {
590
- inv<void>('0xE9BD19F8121ADE3E', this.ped.handle, weaponHash);
649
+ N_0xF08D8FEB455F2C8C(toggle: boolean): void {
650
+ inv<void>('0xF08D8FEB455F2C8C', this.ped.handle, toggle);
591
651
  }
592
652
 
593
653
  /**
594
- * If near your horse when called, weapons stored on your horse will be considered
595
- * Returns weaponHash
596
- *
597
- * @param weaponGroup
598
- * @param p2
599
- * @param p3
600
- * @returns
654
+ * @returns ammo; inventoryUid
601
655
  */
602
- getBestPedWeaponInGroup(weaponGroup: string | number, p2: boolean, p3: boolean): number {
603
- return (inv<number>('0x9F67929D98E7C6E8', this.ped.handle, _h(weaponGroup), p2, p3, rai())) & 0xFFFFFFFF;
656
+ get AmmoInClipByInventoryUid(): [any, number, number] {
657
+ const result = inv<[number, number, number]>('0x678F00858980F516', this.ped.handle, pvi(), pvi());
658
+ return [result[0], result[1], result[2]];
604
659
  }
605
660
 
606
661
  /**
607
- * Only used in R* SP Scripts native_son2, native_son3 and smuggler2
608
- * Params: p2 = -1
662
+ * removeReason must be REMOVE_REASON_USED, REMOVE_REASON_GIVEN, REMOVE_REASON_DROPPED or REMOVE_REASON_DEBUG, unless amount is -1
609
663
  *
610
- * @param p1
611
- * @param p2
612
- */
613
- N_0x8A779706DA5CA3DD(p1: boolean, p2: number): void {
614
- inv<void>('0x8A779706DA5CA3DD', this.ped.handle, p1, p2);
615
- }
616
-
617
- /**
618
- * @param weaponHash Refer to [enum: eWeaponHash]
619
664
  * @param ammoHash Refer to [enum: eAmmoType]
665
+ * @param amount
666
+ * @param removeReason Refer to [enum: eRemoveItemReason]
620
667
  */
621
- disableAmmoTypeForPedWeapon(weaponHash: eWeaponHash, ammoHash: eAmmoType): void {
622
- inv<void>('0xF0D728EEA3C99775', this.ped.handle, weaponHash, ammoHash);
623
- }
624
-
625
- /**
626
- * @returns data; outData
627
- */
628
- giveWeaponToPedWithOptions(): [boolean, number, number] {
629
- const result = inv<[boolean, number, number]>('0xBE7E42B07FD317AC', this.ped.handle, pvi(), pvi(), rai());
630
- return [!!result[0], result[1], result[2]];
631
- }
632
-
633
- /**
634
- * @returns
635
- */
636
- getMaxLockonDistanceOfCurrentPedWeapon(): number {
637
- return inv<number>('0x79B1A6E780266DB0', this.ped.handle, raf());
638
- }
639
-
640
- /**
641
- * @param visible
642
- */
643
- setPedAllWeaponsVisibility(visible: boolean): void {
644
- inv<void>('0x4F806A6CFED89468', this.ped.handle, visible);
645
- }
646
-
647
- /**
648
- * @param weaponHash Refer to [enum: eWeaponHash]
649
- * @param ammo
650
- * @returns
651
- */
652
- setAmmoInClip(weaponHash: eWeaponHash, ammo: number): boolean {
653
- return inv<boolean>('0xDCD2A934D65CB497', this.ped.handle, weaponHash, ammo, rai());
654
- }
655
-
656
- /**
657
- * _GET_M* - _GET_PED_A*
658
- *
659
- * @param p1
660
- * @returns
661
- */
662
- getPedWeaponObject(p1: boolean): Prop | null {
663
- return createFromHandle<Prop>('Prop', inv<number>('0x6CA484C9A7377E4F', this.ped.handle, p1, rai()));
664
- }
665
-
666
- /**
667
- * slotHash is usually just the weaponHash name, but WEAPON_* is replaced with SLOT_*
668
- *
669
- * @param slotHash
670
- * @returns
671
- */
672
- getPedWeaponInSlot(slotHash: string | number): number {
673
- return (inv<number>('0xDBC4B552B2AE9A83', this.ped.handle, _h(slotHash), rai())) & 0xFFFFFFFF;
674
- }
675
-
676
- /**
677
- * Outputs cached guids
678
- *
679
- * @returns guidPrimary; guidSecondary
680
- */
681
- getPlayerPedQuickSwapWeaponByGuid(): [number, number] {
682
- const result = inv<[number, number]>('0xB7E52A058B07C7E2', this.ped.handle, pvi(), pvi());
683
- return [result[0], result[1]];
668
+ removeAmmoFromPedByType(ammoHash: eAmmoType, amount: number, removeReason: eRemoveItemReason): void {
669
+ inv<void>('0xB6CFEC32E3742779', this.ped.handle, ammoHash, amount, removeReason);
684
670
  }
685
671
 
686
672
  /**
687
- * Returns true if the ped is currently holstering or unholstering a weapon
673
+ * Holster the holded shoulder weapon. Precisions: 0 means with anim while 1 means direct holster
688
674
  *
689
- * @returns
690
- */
691
- isWeaponHolsterStateChanging(): boolean {
692
- return inv<boolean>('0x2387D6E9C6B478AA', this.ped.handle, rai());
693
- }
694
-
695
- /**
696
- * @param ammoHash Refer to [enum: eAmmoType]
697
- * @returns
675
+ * @param disableAnim
698
676
  */
699
- N_0x44C8F4908F1B2622(ammoHash: eAmmoType): boolean {
700
- return inv<boolean>('0x44C8F4908F1B2622', this.ped.handle, ammoHash, rai());
677
+ set PedWeaponOnBack(disableAnim: boolean) {
678
+ inv<void>('0x4820A6939D7CEF28', this.ped.handle, disableAnim);
701
679
  }
702
680
 
703
681
  /**
704
- * @param p2
705
- * @returns clipInventoryUid
682
+ * @param ammoType
683
+ * @param ammo
706
684
  */
707
- refillAmmoInClip(p2: number): [any, number] {
708
- const result = inv<[number, number]>('0xDF4A3404D022ADDE', this.ped.handle, pvi(), p2);
709
- return [result[0], result[1]];
685
+ setPedAmmoByType(ammoType: string | number, ammo: number): void {
686
+ inv<void>('0x5FD1E1F011E76D7E', this.ped.handle, _h(ammoType), ammo);
710
687
  }
711
688
 
712
689
  /**
713
- * _SET_A* - _SET_B*
714
- *
715
690
  * @param p1
716
- */
717
- N_0x2EBF70E1D8C06683(p1: string | number): void {
718
- inv<void>('0x2EBF70E1D8C06683', this.ped.handle, _h(p1));
719
- }
720
-
721
- /**
722
- * @returns
723
- */
724
- getAllowDualWield(): any {
725
- return inv<number>('0x918990BD9CE08582', this.ped.handle);
726
- }
727
-
728
- /**
729
- * Returns eCurrentHeldWeapon
730
- * _GET_R* - _GET_T*
731
- *
732
691
  * @returns
733
692
  */
734
- getPedCurrentHeldWeapon(): number {
735
- return (inv<number>('0x8425C5F057012DAB', this.ped.handle, rai())) & 0xFFFFFFFF;
736
- }
737
-
738
- /**
739
- * @param toggle
740
- */
741
- setForceAutoEquip(toggle: boolean): void {
742
- inv<void>('0xBE711B14A159E84F', this.ped.handle, toggle);
743
- }
744
-
745
- /**
746
- * @param weaponHash Refer to [enum: eWeaponHash]
747
- * @param ammo
748
- */
749
- setPedAmmo(weaponHash: eWeaponHash, ammo: number): void {
750
- inv<void>('0x14E56BC5B5DB6A19', this.ped.handle, weaponHash, ammo);
693
+ getPedBackupWeapon(p1: boolean): number {
694
+ return (inv<number>('0xC71FE230A513C30F', this.ped.handle, p1, rai())) & 0xFFFFFFFF;
751
695
  }
752
696
 
753
697
  /**
754
- * Gives the ped the weapon.
755
- * List: https://github.com/femga/rdr3_discoveries/blob/master/weapons/weapons.lua Params: p7 is 0.5f, and p8 is 1.0f. p11 and p12 are both 0 in R* Scripts
756
- * permanentDegradation: default 0.5, any higher than 0 it will automatically make the weapon worn, you can also adjust the value to change the weapons maximum cleanliness
757
- *
758
- * @param weaponHash Refer to [enum: eWeaponHash]
759
- * @param ammoCount
760
- * @param bForceInHand
761
- * @param bForceInHolster
762
698
  * @param attachPoint Refer to [enum: eWeaponAttachPoint]
763
- * @param bAllowMultipleCopies
764
- * @param p7
765
- * @param p8
766
- * @param addReason Refer to [enum: eAddItemReason]
767
- * @param bIgnoreUnlocks
768
- * @param permanentDegradation
769
- * @param p12
770
- * @returns
771
699
  */
772
- giveWeaponToPed(weaponHash: eWeaponHash, ammoCount: number, bForceInHand: boolean, bForceInHolster: boolean, attachPoint: number, bAllowMultipleCopies: boolean, p7: number, p8: number, addReason: eAddItemReason, bIgnoreUnlocks: boolean, permanentDegradation: number, p12: boolean): number {
773
- return (inv<number>('0x5E3BDDBCB83F3D84', this.ped.handle, weaponHash, ammoCount, bForceInHand, bForceInHolster, attachPoint, bAllowMultipleCopies, f(p7), f(p8), addReason, bIgnoreUnlocks, f(permanentDegradation), p12, rai())) & 0xFFFFFFFF;
700
+ set ForceCurrentWeaponIntoCockedState(attachPoint: number) {
701
+ inv<void>('0x5230D3F6EE56CFE6', this.ped.handle, attachPoint);
774
702
  }
775
703
 
776
704
  /**
777
705
  * @param weaponHash Refer to [enum: eWeaponHash]
778
- * @returns
779
- */
780
- getAmmoInPedWeapon(weaponHash: eWeaponHash): number {
781
- return inv<number>('0x015A522136D7F951', this.ped.handle, weaponHash, rai());
782
- }
783
-
784
- /**
785
- * @param attachPoint Refer to [enum: eWeaponAttachPoint]
786
- * @returns weaponGuid
706
+ * @returns ammo
787
707
  */
788
- getPedWeaponGuidAtAttachPoint(attachPoint: number): [any, number] {
789
- const result = inv<[number, number]>('0x6929E22158E52265', this.ped.handle, attachPoint, pvi());
790
- return [result[0], result[1]];
708
+ getAmmoInClip(weaponHash: eWeaponHash): [boolean, number] {
709
+ const result = inv<[boolean, number]>('0x2E1202248937775C', this.ped.handle, pvi(), weaponHash, rai());
710
+ return [!!result[0], result[1]];
791
711
  }
792
712
 
793
713
  /**
794
714
  * @param toggle
795
715
  */
796
- setAllowAnyWeaponDrop(toggle: boolean): void {
797
- inv<void>('0x78030C7867D8B9B6', this.ped.handle, toggle);
798
- }
799
-
800
- /**
801
- * @returns
802
- */
803
- makePedReload(): any {
804
- return inv<number>('0x79E1E511FF7EFB13', this.ped.handle);
716
+ N_0x16D9841A85FA627E(toggle: boolean): void {
717
+ inv<void>('0x16D9841A85FA627E', this.ped.handle, toggle);
805
718
  }
806
719
 
807
720
  /**
808
721
  * @param weaponHash Refer to [enum: eWeaponHash]
809
- * @param ammoCount
810
- * @param p3
811
- * @param addReason Refer to [enum: eAddItemReason]
812
- */
813
- giveDelayedWeaponToPed(weaponHash: eWeaponHash, ammoCount: number, p3: boolean, addReason: eAddItemReason): void {
814
- inv<void>('0xB282DC6EBD803C75', this.ped.handle, weaponHash, ammoCount, p3, addReason);
815
- }
816
-
817
- /**
818
- * @param toggle
722
+ * @param offset
723
+ * @param ammoCount
819
724
  */
820
- N_0x45E57FDD531C9477(toggle: boolean): void {
821
- inv<void>('0x45E57FDD531C9477', this.ped.handle, toggle);
725
+ setPedDropsInventoryWeapon(weaponHash: eWeaponHash, offset: Vector3, ammoCount: number): void {
726
+ inv<void>('0x208A1888007FC0E6', this.ped.handle, weaponHash, f(offset.x), f(offset.y), f(offset.z), ammoCount);
822
727
  }
823
728
 
824
729
  /**
825
- * @param ammoHash Refer to [enum: eAmmoType]
826
- * @returns weaponInventoryUid
730
+ * spinHash can be -1, 0 to disable
731
+ *
732
+ * @param weaponEmoteTrickType
733
+ * @param spin
827
734
  */
828
- setAmmoTypeForPedWeaponInventory(ammoHash: eAmmoType): number {
829
- const result = inv<number>('0xEBE46B501BC3FBCF', this.ped.handle, pvi(), ammoHash);
830
- return result;
735
+ setActiveGunSpinningKitEmoteTwirl(weaponEmoteTrickType: number, spin: string | number): void {
736
+ inv<void>('0x01F661BB9C71B465', this.ped.handle, weaponEmoteTrickType, _h(spin));
831
737
  }
832
738
 
833
739
  /**
740
+ * Appears to just send specified weapon to your horse holster without having to be close
741
+ * However, the weapon is not visible on the horse holster, but you can reach the weapon on the weapon wheel
742
+ *
834
743
  * @param weaponHash Refer to [enum: eWeaponHash]
835
- * @param p2
836
- * @param removeReason Refer to [enum: eRemoveItemReason]
837
744
  */
838
- removeWeaponFromPed(weaponHash: eWeaponHash, p2: boolean, removeReason: eRemoveItemReason): void {
839
- inv<void>('0x4899CB088EDF59B8', this.ped.handle, weaponHash, p2, removeReason);
745
+ sendWeaponToInventory(weaponHash: eWeaponHash): void {
746
+ inv<void>('0xE9BD19F8121ADE3E', this.ped.handle, weaponHash);
840
747
  }
841
748
 
842
749
  /**
843
- * @param ammoType
750
+ * If near your horse when called, weapons stored on your horse will be considered
751
+ * Returns weaponHash
752
+ *
753
+ * @param weaponGroup
754
+ * @param p2
755
+ * @param p3
844
756
  * @returns
845
757
  */
846
- getPedAmmoByType(ammoType: string | number): number {
847
- return inv<number>('0x39D22031557946C1', this.ped.handle, _h(ammoType), rai());
758
+ getBestPedWeaponInGroup(weaponGroup: string | number, p2: boolean, p3: boolean): number {
759
+ return (inv<number>('0x9F67929D98E7C6E8', this.ped.handle, _h(weaponGroup), p2, p3, rai())) & 0xFFFFFFFF;
848
760
  }
849
761
 
850
762
  /**
763
+ * Only used in R* SP Scripts native_son2, native_son3 and smuggler2
764
+ * Params: p2 = -1
765
+ *
851
766
  * @param p1
852
767
  * @param p2
853
- * @returns
854
768
  */
855
- getBestPedWeapon(p1: boolean, p2: boolean): number {
856
- return (inv<number>('0x8483E98E8B888AE2', this.ped.handle, p1, p2, rai())) & 0xFFFFFFFF;
769
+ N_0x8A779706DA5CA3DD(p1: boolean, p2: number): void {
770
+ inv<void>('0x8A779706DA5CA3DD', this.ped.handle, p1, p2);
857
771
  }
858
772
 
859
773
  /**
860
- * @param toggle
861
774
  * @param weaponHash Refer to [enum: eWeaponHash]
775
+ * @param ammoHash Refer to [enum: eAmmoType]
862
776
  */
863
- setPedInfiniteAmmo(toggle: boolean, weaponHash: eWeaponHash): void {
864
- inv<void>('0x3EDCB0505123623B', this.ped.handle, toggle, weaponHash);
777
+ disableAmmoTypeForPedWeapon(weaponHash: eWeaponHash, ammoHash: eAmmoType): void {
778
+ inv<void>('0xF0D728EEA3C99775', this.ped.handle, weaponHash, ammoHash);
865
779
  }
866
780
 
867
781
  /**
868
- * @param weaponHash Refer to [enum: eWeaponHash]
869
- * @param ammoHash Refer to [enum: eAmmoType]
782
+ * @returns data; outData
870
783
  */
871
- setAmmoTypeForPedWeapon(weaponHash: eWeaponHash, ammoHash: eAmmoType): void {
872
- inv<void>('0xCC9C4393523833E2', this.ped.handle, weaponHash, ammoHash);
784
+ giveWeaponToPedWithOptions(): [boolean, number, number] {
785
+ const result = inv<[boolean, number, number]>('0xBE7E42B07FD317AC', this.ped.handle, pvi(), pvi(), rai());
786
+ return [!!result[0], result[1], result[2]];
873
787
  }
874
788
 
875
789
  /**
876
- * *GET_BEST** - *GET_CLOSEST**
877
- *
878
- * @returns weaponGuid
790
+ * @returns
879
791
  */
880
- getCorrectKitEmoteTwirlGun(): [boolean, number] {
881
- const result = inv<[boolean, number]>('0xCD356B42C57BFE01', this.ped.handle, pvi(), rai());
882
- return [!!result[0], result[1]];
792
+ get MaxLockonDistanceOfCurrentPedWeapon(): number {
793
+ return inv<number>('0x79B1A6E780266DB0', this.ped.handle, raf());
883
794
  }
884
795
 
885
796
  /**
886
- * @param weaponHash Refer to [enum: eWeaponHash]
887
- * @returns
797
+ * @param ammoHash Refer to [enum: eAmmoType]
888
798
  */
889
- setCurrentPedVehicleWeapon(weaponHash: eWeaponHash): boolean {
890
- return inv<boolean>('0x75C55983C2C39DAA', this.ped.handle, weaponHash, rai());
799
+ disableAmmoTypeForPed(ammoHash: eAmmoType): void {
800
+ inv<void>('0xAA5A52204E077883', this.ped.handle, ammoHash);
891
801
  }
892
802
 
893
803
  /**
894
- * Returns whether the ped has a rifle p1: 0 or 1
804
+ * Returns whether the ped has a shotgun p1: 0 or 1
895
805
  *
896
806
  * @param p1
897
807
  * @returns
898
808
  */
899
- doesPedHaveRifle(p1: number): any {
900
- return inv<number>('0x95CA12E2C68043E5', this.ped.handle, p1);
809
+ doesPedHaveShotgun(p1: number): any {
810
+ return inv<number>('0xABC18A28BAD4B46F', this.ped.handle, p1);
811
+ }
812
+
813
+ clearPedLastWeaponDamage(): void {
814
+ inv<void>('0x087D8F4BC65F68E4', this.ped.handle);
901
815
  }
902
816
 
903
817
  /**
904
- * Puts the gun visibly in your horse's holster without having to be close to the horse. Use `_SEND_WEAPON_TO_INVENTORY` before using this native
905
- * _A* or _B*
818
+ * Returns true if ped is on a horse while inside of a town
819
+ * Params: p1 = 0
820
+ * GET_L* - GET_MA*
906
821
  *
907
- * @param weaponHash Refer to [enum: eWeaponHash]
908
- * @param ped
822
+ * @param p1
823
+ * @returns
909
824
  */
910
- N_0x14FF0C2545527F9B(weaponHash: eWeaponHash, ped: Ped): void {
911
- inv<void>('0x14FF0C2545527F9B', this.ped.handle, weaponHash, ped.handle);
825
+ N_0x5A695BD328586B44(p1: number): any {
826
+ return inv<number>('0x5A695BD328586B44', this.ped.handle, p1);
912
827
  }
913
828
 
914
829
  /**
915
- * Returns iSpinHash / iVariationSpin
916
- *
917
- * @param weaponEmoteVariation
918
- * @returns
830
+ * @param weaponHash Refer to [enum: eWeaponHash]
831
+ * @param amount
832
+ * @param removeReason Refer to [enum: eRemoveItemReason]
919
833
  */
920
- getPedGunSpinningHashFromWeaponEmoteVariation(weaponEmoteVariation: number): number {
921
- return (inv<number>('0xF3B1620B920D1708', this.ped.handle, weaponEmoteVariation, rai())) & 0xFFFFFFFF;
834
+ removeAmmoFromPed(weaponHash: eWeaponHash, amount: number, removeReason: eRemoveItemReason): void {
835
+ inv<void>('0xF4823C813CB8277D', this.ped.handle, weaponHash, amount, removeReason);
922
836
  }
923
837
 
924
838
  /**
925
- * Returns whether the ped has a repeater p1: 0 or 1
926
- *
927
839
  * @param p1
928
- * @returns
840
+ * @param p2
929
841
  */
930
- doesPedHaveRepeater(p1: number): any {
931
- return inv<number>('0x495A04CAEC263AF8', this.ped.handle, p1);
842
+ setPedAmmoToDrop(p1: number, p2: number): void {
843
+ inv<void>('0xA4EFEF9440A5B0EF', this.ped.handle, p1, p2);
932
844
  }
933
845
 
934
846
  /**
935
- * @param weaponCollection
847
+ * Returns the current ammo type of the specified ped's specified weapon.
848
+ *
849
+ * @param weaponHash Refer to [enum: eWeaponHash]
850
+ * @returns
936
851
  */
937
- giveWeaponCollectionToPed(weaponCollection: string | number): void {
938
- inv<void>('0x899A04AFCC725D04', this.ped.handle, _h(weaponCollection));
852
+ getPedAmmoTypeFromWeapon(weaponHash: eWeaponHash): number {
853
+ return (inv<number>('0x7FEAD38B326B9F74', this.ped.handle, weaponHash, rai())) & 0xFFFFFFFF;
939
854
  }
940
855
 
941
856
  /**
942
- * @param toggle
857
+ * @param weaponHash Refer to [enum: eWeaponHash]
858
+ * @returns ammo
943
859
  */
944
- N_0xF08D8FEB455F2C8C(toggle: boolean): void {
945
- inv<void>('0xF08D8FEB455F2C8C', this.ped.handle, toggle);
860
+ getMaxAmmo(weaponHash: eWeaponHash): [boolean, number] {
861
+ const result = inv<[boolean, number]>('0xDC16122C7A20C933', this.ped.handle, pvi(), weaponHash, rai());
862
+ return [!!result[0], result[1]];
946
863
  }
947
864
 
948
865
  /**
949
- * @returns ammo; inventoryUid
866
+ * Returns ammoHash from weaponObject (Returned by 0x6CA484C9A7377E4F)
867
+ *
868
+ * @param weaponObject
869
+ * @returns
950
870
  */
951
- getAmmoInClipByInventoryUid(): [any, number, number] {
952
- const result = inv<[number, number, number]>('0x678F00858980F516', this.ped.handle, pvi(), pvi());
953
- return [result[0], result[1], result[2]];
871
+ getCurrentPedWeaponAmmoType(weaponObject: Prop): number {
872
+ return (inv<number>('0x7E7B19A4355FEE13', this.ped.handle, weaponObject.handle, rai())) & 0xFFFFFFFF;
954
873
  }
955
874
 
956
875
  /**
957
- * removeReason must be REMOVE_REASON_USED, REMOVE_REASON_GIVEN, REMOVE_REASON_DROPPED or REMOVE_REASON_DEBUG, unless amount is -1
958
- *
959
- * @param ammoHash Refer to [enum: eAmmoType]
960
- * @param amount
961
- * @param removeReason Refer to [enum: eRemoveItemReason]
876
+ * @param p1
877
+ * @param p2
878
+ * @param p3
879
+ * @returns
962
880
  */
963
- removeAmmoFromPedByType(ammoHash: eAmmoType, amount: number, removeReason: eRemoveItemReason): void {
964
- inv<void>('0xB6CFEC32E3742779', this.ped.handle, ammoHash, amount, removeReason);
881
+ getPedWorstWeapon(p1: boolean, p2: boolean, p3: boolean): number {
882
+ return (inv<number>('0xDA37A053C1522F5D', this.ped.handle, p1, p2, p3, rai())) & 0xFFFFFFFF;
965
883
  }
966
884
 
967
885
  /**
968
- * Holster the holded shoulder weapon. Precisions: 0 means with anim while 1 means direct holster
969
- *
970
- * @param disableAnim
886
+ * @param toggle
971
887
  */
972
- setPedWeaponOnBack(disableAnim: boolean): void {
973
- inv<void>('0x4820A6939D7CEF28', this.ped.handle, disableAnim);
888
+ set PedDropsWeaponsWhenDead(toggle: boolean) {
889
+ inv<void>('0x476AE72C1D19D1A8', this.ped.handle, toggle);
974
890
  }
975
891
 
976
892
  /**
977
- * @param ammoType
978
- * @param ammo
893
+ * Returns ammoHash
894
+ *
895
+ * @returns Returns the [enum: eAmmoType]; weaponGuid
979
896
  */
980
- setPedAmmoByType(ammoType: string | number, ammo: number): void {
981
- inv<void>('0x5FD1E1F011E76D7E', this.ped.handle, _h(ammoType), ammo);
897
+ get CurrentAmmoTypeFromGuid(): [number, number] {
898
+ const result = inv<[number, number]>('0xAF9D167A5656D6A6', this.ped.handle, pvi(), rai());
899
+ return [result[0] & 0xFFFFFFFF, result[1]];
982
900
  }
983
901
 
984
902
  /**
985
- * @param p1
986
- * @returns
903
+ * @param toggle
987
904
  */
988
- getPedBackupWeapon(p1: boolean): number {
989
- return (inv<number>('0xC71FE230A513C30F', this.ped.handle, p1, rai())) & 0xFFFFFFFF;
905
+ set PedInfiniteAmmoClip(toggle: boolean) {
906
+ inv<void>('0xFBAA1E06B6BCA741', this.ped.handle, toggle);
990
907
  }
991
908
 
992
909
  /**
993
- * @param attachPoint Refer to [enum: eWeaponAttachPoint]
910
+ * returns the amount of peds that were restrained with the weapon thrown bolas
911
+ *
912
+ * @returns
994
913
  */
995
- setForceCurrentWeaponIntoCockedState(attachPoint: number): void {
996
- inv<void>('0x5230D3F6EE56CFE6', this.ped.handle, attachPoint);
914
+ get NumPedsRestrainedFromWeaponBolas(): any {
915
+ return inv<number>('0x46D42883E873C1D7', this.ped.handle);
997
916
  }
998
917
 
999
918
  /**
1000
919
  * @returns
1001
920
  */
1002
- getPedHogtieWeapon(): number {
921
+ get PedHogtieWeapon(): number {
1003
922
  return (inv<number>('0x90EB1CB189923587', this.ped.handle, rai())) & 0xFFFFFFFF;
1004
923
  }
1005
924
 
@@ -1018,14 +937,14 @@ export class Weapon {
1018
937
  *
1019
938
  * @param emoteType
1020
939
  */
1021
- setGunSpinningInventorySlotIdActivate(emoteType: number): void {
940
+ set GunSpinningInventorySlotIdActivate(emoteType: number) {
1022
941
  inv<void>('0x408CF580C5E96D49', this.ped.handle, emoteType);
1023
942
  }
1024
943
 
1025
944
  /**
1026
945
  * @returns weaponHash: Refer to [enum: eWeaponHash]
1027
946
  */
1028
- getCurrentPedVehicleWeapon(): [boolean, number] {
947
+ get CurrentPedVehicleWeapon(): [boolean, number] {
1029
948
  const result = inv<[boolean, number]>('0x1017582BCD3832DC', this.ped.handle, pvi(), rai());
1030
949
  return [!!result[0], result[1]];
1031
950
  }
@@ -1057,7 +976,88 @@ export class Weapon {
1057
976
  * @returns
1058
977
  */
1059
978
  hasPedGotWeapon(weaponHash: eWeaponHash, p2: number, onlyCheckPlayerInventory: boolean): boolean {
1060
- return inv<boolean>('0x8DECB02F88F428BC', this.ped.handle, weaponHash, p2, onlyCheckPlayerInventory, rai());
979
+ return !!inv<boolean>('0x8DECB02F88F428BC', this.ped.handle, weaponHash, p2, onlyCheckPlayerInventory, rai());
980
+ }
981
+
982
+ /**
983
+ * @returns
984
+ */
985
+ get AllowDualWield(): any {
986
+ return inv<number>('0x918990BD9CE08582', this.ped.handle);
987
+ }
988
+
989
+ /**
990
+ * Returns eCurrentHeldWeapon
991
+ * _GET_R* - _GET_T*
992
+ *
993
+ * @returns
994
+ */
995
+ get PedCurrentHeldWeapon(): number {
996
+ return (inv<number>('0x8425C5F057012DAB', this.ped.handle, rai())) & 0xFFFFFFFF;
997
+ }
998
+
999
+ /**
1000
+ * @param toggle
1001
+ */
1002
+ set ForceAutoEquip(toggle: boolean) {
1003
+ inv<void>('0xBE711B14A159E84F', this.ped.handle, toggle);
1004
+ }
1005
+
1006
+ /**
1007
+ * @param weaponHash Refer to [enum: eWeaponHash]
1008
+ * @param ammo
1009
+ */
1010
+ setPedAmmo(weaponHash: eWeaponHash, ammo: number): void {
1011
+ inv<void>('0x14E56BC5B5DB6A19', this.ped.handle, weaponHash, ammo);
1012
+ }
1013
+
1014
+ /**
1015
+ * Gives the ped the weapon.
1016
+ * List: https://github.com/femga/rdr3_discoveries/blob/master/weapons/weapons.lua Params: p7 is 0.5f, and p8 is 1.0f. p11 and p12 are both 0 in R* Scripts
1017
+ * permanentDegradation: default 0.5, any higher than 0 it will automatically make the weapon worn, you can also adjust the value to change the weapons maximum cleanliness
1018
+ *
1019
+ * @param weaponHash Refer to [enum: eWeaponHash]
1020
+ * @param ammoCount
1021
+ * @param bForceInHand
1022
+ * @param bForceInHolster
1023
+ * @param attachPoint Refer to [enum: eWeaponAttachPoint]
1024
+ * @param bAllowMultipleCopies
1025
+ * @param p7
1026
+ * @param p8
1027
+ * @param addReason Refer to [enum: eAddItemReason]
1028
+ * @param bIgnoreUnlocks
1029
+ * @param permanentDegradation
1030
+ * @param p12
1031
+ * @returns
1032
+ */
1033
+ giveWeaponToPed(weaponHash: eWeaponHash, ammoCount: number, bForceInHand: boolean, bForceInHolster: boolean, attachPoint: number, bAllowMultipleCopies: boolean, p7: number, p8: number, addReason: eAddItemReason, bIgnoreUnlocks: boolean, permanentDegradation: number, p12: boolean): number {
1034
+ return (inv<number>('0x5E3BDDBCB83F3D84', this.ped.handle, weaponHash, ammoCount, bForceInHand, bForceInHolster, attachPoint, bAllowMultipleCopies, f(p7), f(p8), addReason, bIgnoreUnlocks, f(permanentDegradation), p12, rai())) & 0xFFFFFFFF;
1035
+ }
1036
+
1037
+ /**
1038
+ * @param weaponHash Refer to [enum: eWeaponHash]
1039
+ * @returns
1040
+ */
1041
+ getAmmoInPedWeapon(weaponHash: eWeaponHash): number {
1042
+ return inv<number>('0x015A522136D7F951', this.ped.handle, weaponHash, rai());
1043
+ }
1044
+
1045
+ /**
1046
+ * @param attachPoint Refer to [enum: eWeaponAttachPoint]
1047
+ * @returns weaponGuid
1048
+ */
1049
+ getPedWeaponGuidAtAttachPoint(attachPoint: number): [any, number] {
1050
+ const result = inv<[number, number]>('0x6929E22158E52265', this.ped.handle, attachPoint, pvi());
1051
+ return [result[0], result[1]];
1052
+ }
1053
+
1054
+ /**
1055
+ * emote hashes: KIT_EMOTE_TWIRL_GUN, KIT_EMOTE_TWIRL_GUN_LEFT_HOLSTER, KIT_EMOTE_TWIRL_GUN_DUAL, 0 (to unequip)
1056
+ *
1057
+ * @param emote
1058
+ */
1059
+ set ActiveGunSpinningEquipKitEmoteTwirl(emote: string | number) {
1060
+ inv<void>('0xCBCFFF805F1B4596', this.ped.handle, _h(emote));
1061
1061
  }
1062
1062
 
1063
1063
  }