@nativewrappers/redm-codegen 0.0.2 → 0.0.3

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