@nativewrappers/redm-codegen 0.0.2 → 0.0.4

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 (248) hide show
  1. package/dist/classes/AnimScene.d.ts +101 -101
  2. package/dist/classes/AnimScene.d.ts.map +1 -1
  3. package/dist/classes/AnimScene.js +147 -147
  4. package/dist/classes/BaseModel.d.ts +12 -12
  5. package/dist/classes/BaseModel.d.ts.map +1 -1
  6. package/dist/classes/BaseModel.js +18 -18
  7. package/dist/classes/BaseTask.d.ts +22 -22
  8. package/dist/classes/BaseTask.d.ts.map +1 -1
  9. package/dist/classes/BaseTask.js +29 -29
  10. package/dist/classes/Cam.d.ts +86 -86
  11. package/dist/classes/Cam.d.ts.map +1 -1
  12. package/dist/classes/Cam.js +116 -116
  13. package/dist/classes/Entity.d.ts +426 -425
  14. package/dist/classes/Entity.d.ts.map +1 -1
  15. package/dist/classes/Entity.js +594 -589
  16. package/dist/classes/Interior.d.ts +1 -1
  17. package/dist/classes/Interior.d.ts.map +1 -1
  18. package/dist/classes/Ped.d.ts +13 -12
  19. package/dist/classes/Ped.d.ts.map +1 -1
  20. package/dist/classes/Ped.js +5 -0
  21. package/dist/classes/PedTask.d.ts +729 -729
  22. package/dist/classes/PedTask.d.ts.map +1 -1
  23. package/dist/classes/PedTask.js +951 -951
  24. package/dist/classes/PersChar.d.ts +11 -11
  25. package/dist/classes/PersChar.d.ts.map +1 -1
  26. package/dist/classes/PersChar.js +17 -17
  27. package/dist/classes/Pickup.d.ts +3 -3
  28. package/dist/classes/Pickup.d.ts.map +1 -1
  29. package/dist/classes/Pickup.js +7 -7
  30. package/dist/classes/Player.d.ts +164 -164
  31. package/dist/classes/Player.d.ts.map +1 -1
  32. package/dist/classes/Player.js +218 -218
  33. package/dist/classes/Prop.d.ts +87 -86
  34. package/dist/classes/Prop.d.ts.map +1 -1
  35. package/dist/classes/Prop.js +131 -126
  36. package/dist/classes/PropSet.d.ts +18 -18
  37. package/dist/classes/PropSet.d.ts.map +1 -1
  38. package/dist/classes/PropSet.js +25 -25
  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 +18 -18
  43. package/dist/classes/VehicleTask.d.ts.map +1 -1
  44. package/dist/classes/VehicleTask.js +26 -26
  45. package/dist/classes/Volume.d.ts +1 -1
  46. package/dist/classes/Volume.d.ts.map +1 -1
  47. package/dist/classes/Weapon.d.ts +277 -277
  48. package/dist/classes/Weapon.d.ts.map +1 -1
  49. package/dist/classes/Weapon.js +398 -398
  50. package/dist/namespaces/Aitransport.d.ts +77 -77
  51. package/dist/namespaces/Aitransport.d.ts.map +1 -1
  52. package/dist/namespaces/Aitransport.js +94 -94
  53. package/dist/namespaces/Animscene.d.ts +51 -51
  54. package/dist/namespaces/Animscene.d.ts.map +1 -1
  55. package/dist/namespaces/Animscene.js +69 -69
  56. package/dist/namespaces/Audio.d.ts +2 -2
  57. package/dist/namespaces/Audio.d.ts.map +1 -1
  58. package/dist/namespaces/Bounty.d.ts +57 -57
  59. package/dist/namespaces/Bounty.d.ts.map +1 -1
  60. package/dist/namespaces/Bounty.js +90 -90
  61. package/dist/namespaces/Brain.d.ts +15 -15
  62. package/dist/namespaces/Brain.d.ts.map +1 -1
  63. package/dist/namespaces/Brain.js +20 -20
  64. package/dist/namespaces/CamStatics.d.ts +317 -317
  65. package/dist/namespaces/CamStatics.d.ts.map +1 -1
  66. package/dist/namespaces/CamStatics.js +449 -449
  67. package/dist/namespaces/Collection.d.ts +13 -13
  68. package/dist/namespaces/Collection.d.ts.map +1 -1
  69. package/dist/namespaces/Collection.js +8 -8
  70. package/dist/namespaces/Companion.d.ts +22 -22
  71. package/dist/namespaces/Companion.d.ts.map +1 -1
  72. package/dist/namespaces/Companion.js +30 -30
  73. package/dist/namespaces/Compendium.d.ts +60 -60
  74. package/dist/namespaces/Compendium.d.ts.map +1 -1
  75. package/dist/namespaces/Compendium.js +80 -80
  76. package/dist/namespaces/Crashlog.d.ts +10 -10
  77. package/dist/namespaces/Crashlog.d.ts.map +1 -1
  78. package/dist/namespaces/Crashlog.js +14 -14
  79. package/dist/namespaces/Databinding.d.ts +173 -173
  80. package/dist/namespaces/Databinding.d.ts.map +1 -1
  81. package/dist/namespaces/Databinding.js +263 -263
  82. package/dist/namespaces/Dlc.d.ts +5 -5
  83. package/dist/namespaces/Dlc.d.ts.map +1 -1
  84. package/dist/namespaces/Dlc.js +9 -9
  85. package/dist/namespaces/EntityStatics.d.ts +178 -178
  86. package/dist/namespaces/EntityStatics.d.ts.map +1 -1
  87. package/dist/namespaces/EntityStatics.js +242 -242
  88. package/dist/namespaces/Event.d.ts +62 -62
  89. package/dist/namespaces/Event.d.ts.map +1 -1
  90. package/dist/namespaces/Event.js +82 -82
  91. package/dist/namespaces/Fire.d.ts +7 -7
  92. package/dist/namespaces/Fire.d.ts.map +1 -1
  93. package/dist/namespaces/Fire.js +9 -9
  94. package/dist/namespaces/Graphics.d.ts +797 -797
  95. package/dist/namespaces/Graphics.d.ts.map +1 -1
  96. package/dist/namespaces/Graphics.js +1095 -1095
  97. package/dist/namespaces/Hud.d.ts +477 -477
  98. package/dist/namespaces/Hud.d.ts.map +1 -1
  99. package/dist/namespaces/Hud.js +721 -721
  100. package/dist/namespaces/InteriorStatics.d.ts +2 -2
  101. package/dist/namespaces/InteriorStatics.d.ts.map +1 -1
  102. package/dist/namespaces/Inventory.d.ts +216 -216
  103. package/dist/namespaces/Inventory.d.ts.map +1 -1
  104. package/dist/namespaces/Inventory.js +301 -301
  105. package/dist/namespaces/Itemdatabase.d.ts +8 -8
  106. package/dist/namespaces/Itemdatabase.d.ts.map +1 -1
  107. package/dist/namespaces/Itemdatabase.js +7 -7
  108. package/dist/namespaces/Law.d.ts +2 -2
  109. package/dist/namespaces/Law.d.ts.map +1 -1
  110. package/dist/namespaces/Map.d.ts +65 -65
  111. package/dist/namespaces/Map.d.ts.map +1 -1
  112. package/dist/namespaces/Map.js +91 -91
  113. package/dist/namespaces/Minigame.d.ts +17 -17
  114. package/dist/namespaces/Minigame.d.ts.map +1 -1
  115. package/dist/namespaces/Minigame.js +25 -25
  116. package/dist/namespaces/Misc.d.ts +5 -5
  117. package/dist/namespaces/Misc.d.ts.map +1 -1
  118. package/dist/namespaces/Missiondata.d.ts +3 -3
  119. package/dist/namespaces/Missiondata.d.ts.map +1 -1
  120. package/dist/namespaces/Netshopping.d.ts +1 -1
  121. package/dist/namespaces/Netshopping.d.ts.map +1 -1
  122. package/dist/namespaces/Network.d.ts +1302 -1310
  123. package/dist/namespaces/Network.d.ts.map +1 -1
  124. package/dist/namespaces/Network.js +1910 -1918
  125. package/dist/namespaces/Object.d.ts +170 -170
  126. package/dist/namespaces/Object.d.ts.map +1 -1
  127. package/dist/namespaces/Object.js +232 -232
  128. package/dist/namespaces/Pad.d.ts +103 -103
  129. package/dist/namespaces/Pad.d.ts.map +1 -1
  130. package/dist/namespaces/Pad.js +134 -134
  131. package/dist/namespaces/PedStatics.d.ts +3 -3
  132. package/dist/namespaces/PedStatics.d.ts.map +1 -1
  133. package/dist/namespaces/Perschar.d.ts +71 -71
  134. package/dist/namespaces/Perschar.d.ts.map +1 -1
  135. package/dist/namespaces/Perschar.js +106 -106
  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/PlayerStatics.d.ts +52 -52
  140. package/dist/namespaces/PlayerStatics.d.ts.map +1 -1
  141. package/dist/namespaces/PlayerStatics.js +71 -71
  142. package/dist/namespaces/Population.d.ts +3 -3
  143. package/dist/namespaces/Population.d.ts.map +1 -1
  144. package/dist/namespaces/Posse.d.ts +28 -28
  145. package/dist/namespaces/Posse.d.ts.map +1 -1
  146. package/dist/namespaces/Posse.js +44 -44
  147. package/dist/namespaces/Propset.d.ts +59 -59
  148. package/dist/namespaces/Propset.d.ts.map +1 -1
  149. package/dist/namespaces/Propset.js +81 -81
  150. package/dist/namespaces/Scripts.d.ts +3 -3
  151. package/dist/namespaces/Scripts.d.ts.map +1 -1
  152. package/dist/namespaces/Socialclub.d.ts +1 -1
  153. package/dist/namespaces/Socialclub.d.ts.map +1 -1
  154. package/dist/namespaces/Stats.d.ts +85 -85
  155. package/dist/namespaces/Stats.d.ts.map +1 -1
  156. package/dist/namespaces/Stats.js +113 -113
  157. package/dist/namespaces/Streaming.d.ts +35 -35
  158. package/dist/namespaces/Streaming.d.ts.map +1 -1
  159. package/dist/namespaces/Streaming.js +53 -53
  160. package/dist/namespaces/Task.d.ts +367 -367
  161. package/dist/namespaces/Task.d.ts.map +1 -1
  162. package/dist/namespaces/Task.js +508 -508
  163. package/dist/namespaces/Telemetry.d.ts +198 -198
  164. package/dist/namespaces/Telemetry.d.ts.map +1 -1
  165. package/dist/namespaces/Telemetry.js +274 -274
  166. package/dist/namespaces/Uiapps.d.ts +24 -24
  167. package/dist/namespaces/Uiapps.d.ts.map +1 -1
  168. package/dist/namespaces/Uiapps.js +33 -33
  169. package/dist/namespaces/Uistickyfeed.d.ts +16 -16
  170. package/dist/namespaces/Uistickyfeed.d.ts.map +1 -1
  171. package/dist/namespaces/Uistickyfeed.js +21 -21
  172. package/dist/namespaces/VehicleStatics.d.ts +2 -2
  173. package/dist/namespaces/VehicleStatics.d.ts.map +1 -1
  174. package/dist/namespaces/Water.d.ts +27 -27
  175. package/dist/namespaces/Water.d.ts.map +1 -1
  176. package/dist/namespaces/Water.js +41 -41
  177. package/dist/namespaces/WeaponStatics.d.ts +250 -250
  178. package/dist/namespaces/WeaponStatics.d.ts.map +1 -1
  179. package/dist/namespaces/WeaponStatics.js +372 -372
  180. package/dist/namespaces/Zone.d.ts +8 -8
  181. package/dist/namespaces/Zone.d.ts.map +1 -1
  182. package/dist/namespaces/Zone.js +9 -9
  183. package/package.json +1 -1
  184. package/src/classes/AnimScene.ts +170 -170
  185. package/src/classes/BaseModel.ts +21 -21
  186. package/src/classes/BaseTask.ts +31 -31
  187. package/src/classes/Cam.ts +124 -124
  188. package/src/classes/Entity.ts +619 -614
  189. package/src/classes/Interior.ts +1 -1
  190. package/src/classes/Ped.ts +17 -12
  191. package/src/classes/PedTask.ts +1011 -1011
  192. package/src/classes/PersChar.ts +19 -19
  193. package/src/classes/Pickup.ts +8 -8
  194. package/src/classes/Player.ts +227 -227
  195. package/src/classes/Prop.ts +146 -141
  196. package/src/classes/PropSet.ts +29 -29
  197. package/src/classes/Vehicle.ts +5 -0
  198. package/src/classes/VehicleTask.ts +30 -30
  199. package/src/classes/Volume.ts +1 -1
  200. package/src/classes/Weapon.ts +414 -414
  201. package/src/namespaces/Aitransport.ts +102 -102
  202. package/src/namespaces/Animscene.ts +78 -78
  203. package/src/namespaces/Audio.ts +2 -2
  204. package/src/namespaces/Bounty.ts +102 -102
  205. package/src/namespaces/Brain.ts +22 -22
  206. package/src/namespaces/CamStatics.ts +501 -501
  207. package/src/namespaces/Collection.ts +16 -16
  208. package/src/namespaces/Companion.ts +34 -34
  209. package/src/namespaces/Compendium.ts +93 -93
  210. package/src/namespaces/Crashlog.ts +16 -16
  211. package/src/namespaces/Databinding.ts +280 -280
  212. package/src/namespaces/Dlc.ts +9 -9
  213. package/src/namespaces/EntityStatics.ts +249 -249
  214. package/src/namespaces/Event.ts +92 -92
  215. package/src/namespaces/Fire.ts +10 -10
  216. package/src/namespaces/Graphics.ts +1155 -1155
  217. package/src/namespaces/Hud.ts +763 -763
  218. package/src/namespaces/InteriorStatics.ts +2 -2
  219. package/src/namespaces/Inventory.ts +321 -321
  220. package/src/namespaces/Itemdatabase.ts +11 -11
  221. package/src/namespaces/Law.ts +2 -2
  222. package/src/namespaces/Map.ts +104 -104
  223. package/src/namespaces/Minigame.ts +29 -29
  224. package/src/namespaces/Misc.ts +5 -5
  225. package/src/namespaces/Missiondata.ts +3 -3
  226. package/src/namespaces/Netshopping.ts +1 -1
  227. package/src/namespaces/Network.ts +1921 -1929
  228. package/src/namespaces/Object.ts +237 -237
  229. package/src/namespaces/Pad.ts +151 -151
  230. package/src/namespaces/PedStatics.ts +3 -3
  231. package/src/namespaces/Perschar.ts +116 -116
  232. package/src/namespaces/Persistence.ts +48 -48
  233. package/src/namespaces/PlayerStatics.ts +75 -75
  234. package/src/namespaces/Population.ts +3 -3
  235. package/src/namespaces/Posse.ts +47 -47
  236. package/src/namespaces/Propset.ts +92 -92
  237. package/src/namespaces/Scripts.ts +3 -3
  238. package/src/namespaces/Socialclub.ts +1 -1
  239. package/src/namespaces/Stats.ts +129 -129
  240. package/src/namespaces/Streaming.ts +62 -62
  241. package/src/namespaces/Task.ts +538 -538
  242. package/src/namespaces/Telemetry.ts +295 -295
  243. package/src/namespaces/Uiapps.ts +39 -39
  244. package/src/namespaces/Uistickyfeed.ts +23 -23
  245. package/src/namespaces/VehicleStatics.ts +2 -2
  246. package/src/namespaces/Water.ts +47 -47
  247. package/src/namespaces/WeaponStatics.ts +394 -394
  248. package/src/namespaces/Zone.ts +11 -11
@@ -6,248 +6,324 @@ export class Weapon {
6
6
  this.ped = ped;
7
7
  }
8
8
  /**
9
- * @param toggle
9
+ * @param weaponHash Refer to [enum: eWeaponHash]
10
+ * @param ammoHash Refer to [enum: eAmmoType]
10
11
  */
11
- setAllowAnyWeaponDrop(toggle) {
12
- inv('0x78030C7867D8B9B6', this.ped.handle, toggle);
12
+ enableAmmoTypeForPedWeapon(weaponHash, ammoHash) {
13
+ inv('0x23FB9FACA28779C1', this.ped.handle, weaponHash, ammoHash);
13
14
  }
14
15
  /**
15
- * @returns
16
+ * @param toggle
16
17
  */
17
- makePedReload() {
18
- return inv('0x79E1E511FF7EFB13', this.ped.handle);
18
+ N_0x431240A58484D5D0(toggle) {
19
+ inv('0x431240A58484D5D0', this.ped.handle, toggle);
19
20
  }
20
21
  /**
21
- * @param weaponHash Refer to [enum: eWeaponHash]
22
- * @param ammoCount
22
+ * @param p2
23
23
  * @param p3
24
- * @param addReason Refer to [enum: eAddItemReason]
24
+ * @returns outGUID
25
25
  */
26
- giveDelayedWeaponToPed(weaponHash, ammoCount, p3, addReason) {
27
- inv('0xB282DC6EBD803C75', this.ped.handle, weaponHash, ammoCount, p3, addReason);
26
+ getBestPedShortarmGuid(p2, p3) {
27
+ const result = inv('0xF52BD94B47CCF736', this.ped.handle, pvi(), p2, p3);
28
+ return result;
28
29
  }
29
30
  /**
30
- * @param toggle
31
+ * @returns coords
31
32
  */
32
- N_0x45E57FDD531C9477(toggle) {
33
- inv('0x45E57FDD531C9477', this.ped.handle, toggle);
33
+ getPedLastWeaponImpactCoord() {
34
+ const result = inv('0x6C4D0409BA1A2BC2', this.ped.handle, pvv(), rai());
35
+ return [!!result[0], Vector3.fromArray(result[1])];
34
36
  }
35
37
  /**
36
- * @param ammoHash Refer to [enum: eAmmoType]
37
- * @returns weaponInventoryUid
38
+ * Returns WeaponAttachPoint
39
+ *
40
+ * @param attachPoint Refer to [enum: eWeaponAttachPoint]
41
+ * @returns
38
42
  */
39
- setAmmoTypeForPedWeaponInventory(ammoHash) {
40
- const result = inv('0xEBE46B501BC3FBCF', this.ped.handle, pvi(), ammoHash);
41
- return result;
43
+ getWeaponAttachPoint(attachPoint) {
44
+ return inv('0xCAD4FE9398820D24', this.ped.handle, attachPoint, rai());
42
45
  }
43
46
  /**
44
- * @param weaponHash Refer to [enum: eWeaponHash]
45
47
  * @param p2
46
- * @param removeReason Refer to [enum: eRemoveItemReason]
48
+ * @param attachPoint Refer to [enum: eWeaponAttachPoint]
49
+ * @param p4
50
+ * @returns weaponHash: Refer to [enum: eWeaponHash]
47
51
  */
48
- removeWeaponFromPed(weaponHash, p2, removeReason) {
49
- inv('0x4899CB088EDF59B8', this.ped.handle, weaponHash, p2, removeReason);
52
+ getCurrentPedWeapon(p2, attachPoint, p4) {
53
+ const result = inv('0x3A87E44BB9A01D54', this.ped.handle, pvi(), p2, attachPoint, p4, rai());
54
+ return [!!result[0], result[1]];
50
55
  }
51
56
  /**
52
- * Detaches the weapon from the ped and actually removes the ped's weapon
57
+ * Returns whether the ped has a revolver p1: 0 or 1
53
58
  *
54
59
  * @param p1
55
60
  * @returns
56
61
  */
57
- getWeaponObjectFromPed(p1) {
58
- return createFromHandle('Prop', inv('0xC6A6789BB405D11C', this.ped.handle, p1, rai()));
62
+ doesPedHaveRevolver(p1) {
63
+ return inv('0x5B235F24472F2C3B', this.ped.handle, p1);
59
64
  }
60
65
  /**
66
+ * Returns emote Hash
67
+ *
61
68
  * @returns
62
69
  */
63
- isPedCurrentWeaponHolstered() {
64
- return inv('0xBDD9C235D8D1052E', this.ped.handle);
70
+ getPedGunSpinningEquippedKitEmoteTwirl() {
71
+ return (inv('0x2C4FEC3D0EFA9FC0', this.ped.handle, rai())) & 0xFFFFFFFF;
65
72
  }
66
73
  /**
67
- * @param toggle
74
+ * Returns ammoHash from weaponObject (Returned by 0x6CA484C9A7377E4F)
75
+ *
76
+ * @param weaponObject
77
+ * @returns
68
78
  */
69
- setInstantlyEquipWeaponPickups(toggle) {
70
- inv('0x739B9C6D0E7F7F93', this.ped.handle, toggle);
79
+ getCurrentPedWeaponAmmoType(weaponObject) {
80
+ return (inv('0x7E7B19A4355FEE13', this.ped.handle, weaponObject.handle, rai())) & 0xFFFFFFFF;
71
81
  }
72
82
  /**
73
- * Hides the ped's weapon during a cutscene.
74
- *
75
- * @param toggle
83
+ * @param p1
84
+ * @param p2
85
+ * @param p3
86
+ * @returns
76
87
  */
77
- hidePedWeaponForScriptedCutscene(toggle) {
78
- inv('0x6F6981D2253C208F', this.ped.handle, toggle);
88
+ getPedWorstWeapon(p1, p2, p3) {
89
+ return (inv('0xDA37A053C1522F5D', this.ped.handle, p1, p2, p3, rai())) & 0xFFFFFFFF;
79
90
  }
80
91
  /**
81
- * @returns guidPrimary; guidSecondary
92
+ * @param toggle
82
93
  */
83
- setPlayerPedQuickSwapWeaponByGuid() {
84
- const result = inv('0xEC1F85DA51D3D6C4', this.ped.handle, pvi(), pvi());
85
- return [result[0], result[1]];
94
+ setPedDropsWeaponsWhenDead(toggle) {
95
+ inv('0x476AE72C1D19D1A8', this.ped.handle, toggle);
86
96
  }
87
97
  /**
88
- * @returns Returns the total ammo in the ped weapon from it's guid, or `0`.; guid
98
+ * Returns ammoHash
99
+ *
100
+ * @returns Returns the [enum: eAmmoType]; weaponGuid
89
101
  */
90
- getAmmoInPedWeaponFromGuid() {
91
- const result = inv('0x4823F13A21F51964', this.ped.handle, pvi(), rai());
92
- return [result[0], result[1]];
102
+ getCurrentAmmoTypeFromGuid() {
103
+ const result = inv('0xAF9D167A5656D6A6', this.ped.handle, pvi(), rai());
104
+ return [result[0] & 0xFFFFFFFF, result[1]];
93
105
  }
94
106
  /**
95
- * @param p1
96
- * @param p2
107
+ * @param toggle
97
108
  */
98
- removeAllPedWeapons(p1, p2) {
99
- inv('0xF25DF915FA38C5F3', this.ped.handle, p1, p2);
109
+ setPedInfiniteAmmoClip(toggle) {
110
+ inv('0xFBAA1E06B6BCA741', this.ped.handle, toggle);
100
111
  }
101
112
  /**
102
- * Returns eCurrentHeldWeapon
103
- * _GET_R* - _GET_T*
113
+ * returns the amount of peds that were restrained with the weapon thrown bolas
104
114
  *
105
115
  * @returns
106
116
  */
107
- getPedCurrentHeldWeapon() {
108
- return (inv('0x8425C5F057012DAB', this.ped.handle, rai())) & 0xFFFFFFFF;
117
+ getNumPedsRestrainedFromWeaponBolas() {
118
+ return inv('0x46D42883E873C1D7', this.ped.handle);
109
119
  }
110
120
  /**
111
- * @param toggle
121
+ * Stores longarms to your horse on dismount
122
+ * Params: p2 = 0
123
+ * SET_[I - M]*
124
+ *
125
+ * @param storeLongarms
126
+ * @param p2
112
127
  */
113
- setForceAutoEquip(toggle) {
114
- inv('0xBE711B14A159E84F', this.ped.handle, toggle);
128
+ setInstantlyStoreLongarmsOnDismount(storeLongarms, p2) {
129
+ inv('0xB832F1A686B9B810', this.ped.handle, storeLongarms, p2);
115
130
  }
116
131
  /**
117
- * @param componentHash
118
- * @param weaponHash Refer to [enum: eWeaponHash]
132
+ * @param removeReason Refer to [enum: eRemoveItemReason]
133
+ * @returns weaponGuid
119
134
  */
120
- removeWeaponComponentFromPed(componentHash, weaponHash) {
121
- inv('0x19F70C4D80494FF8', this.ped.handle, _h(componentHash), weaponHash);
135
+ removeWeaponFromPedByGuid(removeReason) {
136
+ const result = inv('0x51C3B71591811485', this.ped.handle, pvi(), removeReason);
137
+ return result;
122
138
  }
123
139
  /**
124
- * @param visible
125
- * @param deselectWeapon
126
- * @param p3
140
+ * attachPoint:
141
+ *
142
+ * @param weaponHash Refer to [enum: eWeaponHash]
143
+ * @param equipNow
144
+ * @param attachPoint Refer to [enum: eWeaponAttachPoint]
127
145
  * @param p4
146
+ * @param p5
128
147
  */
129
- setPedCurrentWeaponVisible(visible, deselectWeapon, p3, p4) {
130
- inv('0x0725A4CCFDED9A70', this.ped.handle, visible, deselectWeapon, p3, p4);
148
+ setCurrentPedWeapon(weaponHash, equipNow, attachPoint, p4, p5) {
149
+ inv('0xADF692B254977C0C', this.ped.handle, weaponHash, equipNow, attachPoint, p4, p5);
131
150
  }
132
151
  /**
133
- * Old name: _DROP_CURRENT_PED_WEAPON
152
+ * Equips a weapon from a weaponItem, similar to GIVE_WEAPON_TO_PED
134
153
  *
135
- * @param p1
136
- * @param attachPoint Refer to [enum: eWeaponAttachPoint]
154
+ * @param p2
137
155
  * @param p3
138
156
  * @param p4
157
+ * @param p5
158
+ * @returns weaponUid
159
+ */
160
+ setCurrentPedWeaponByGuid(p2, p3, p4, p5) {
161
+ const result = inv('0x12FB95FE3D579238', this.ped.handle, pvi(), p2, p3, p4, p5);
162
+ return result;
163
+ }
164
+ /**
165
+ * @param componentHash
166
+ * @param weaponHash Refer to [enum: eWeaponHash]
139
167
  * @returns
140
168
  */
141
- makePedDropWeapon(p1, attachPoint, p3, p4) {
142
- return createFromHandle('Entity', inv('0xCEF4C65DE502D367', this.ped.handle, p1, attachPoint, p3, p4, rai()));
169
+ hasPedGotWeaponComponent(componentHash, weaponHash) {
170
+ return inv('0xBBC67A6F965C688A', this.ped.handle, _h(componentHash), weaponHash);
143
171
  }
144
- removeAllPedAmmo() {
145
- inv('0x1B83C0DEEBCBB214', this.ped.handle);
172
+ /**
173
+ * @param weaponHash Refer to [enum: eWeaponHash]
174
+ * @param amount The amount of ped to add to the ammo
175
+ * @param addReason Refer to [enum: eAddItemReason]
176
+ */
177
+ addAmmoToPed(weaponHash, amount, addReason) {
178
+ inv('0xB190BCA3F4042F95', this.ped.handle, weaponHash, amount, addReason);
146
179
  }
147
180
  /**
148
- * @param allow
181
+ * @param ammoType
182
+ * @param amount
183
+ * @param addReason Refer to [enum: eAddItemReason]
149
184
  */
150
- setAllowDualWield(allow) {
151
- inv('0x83B8D50EB9446BBA', this.ped.handle, allow);
185
+ addAmmoToPedByType(ammoType, amount, addReason) {
186
+ inv('0x106A811C6D3035F3', this.ped.handle, _h(ammoType), amount, addReason);
152
187
  }
153
188
  /**
154
- * Returns weaponEmoteVariation WEAPON_EMOTE_VARIATION_INVALID = -2,
155
- * WEAPON_EMOTE_VARIATION_BASE,
156
- * WEAPON_EMOTE_VARIATION_A,
157
- * WEAPON_EMOTE_VARIATION_B,
158
- * WEAPON_EMOTE_VARIATION_C,
159
- * WEAPON_EMOTE_VARIATION_D,
160
- * WEAPON_EMOTE_VARIATION_PREVIEW,
161
- * WEAPON_EMOTE_NUM_VARIATIONS
162
- *
163
- * @param variation
189
+ * @param targetPed
164
190
  * @returns
165
191
  */
166
- getWeaponEmoteVariation(variation) {
167
- return inv('0x86147D05FA831D3A', this.ped.handle, variation, rai());
192
+ isTargetPedConstrainedByPedUsingBolas(targetPed) {
193
+ return inv('0x8D50F43298AB9545', this.ped.handle, targetPed.handle, rai());
194
+ }
195
+ /**
196
+ * @param p1
197
+ * @returns guidPrimary
198
+ */
199
+ getBestPedWeaponInInventory(p1) {
200
+ const result = inv('0x7B98500614C8E8B8', this.ped.handle, p1, pvi());
201
+ return [result[0], result[1]];
168
202
  }
169
203
  /**
170
204
  * @param weaponHash Refer to [enum: eWeaponHash]
205
+ */
206
+ enableAmmoTypeForPed(weaponHash) {
207
+ inv('0x3B7B7908B7ADFB4B', this.ped.handle, weaponHash);
208
+ }
209
+ /**
210
+ * Detaches the weapon from the ped and actually removes the ped's weapon
211
+ *
212
+ * @param p1
171
213
  * @returns
172
214
  */
173
- isPedCarryingWeapon(weaponHash) {
174
- return inv('0xF29A186ED428B552', this.ped.handle, weaponHash);
215
+ getWeaponObjectFromPed(p1) {
216
+ return createFromHandle('Prop', inv('0xC6A6789BB405D11C', this.ped.handle, p1, rai()));
175
217
  }
176
218
  /**
177
219
  * @returns
178
220
  */
179
- refillAmmoInCurrentPedWeapon() {
180
- return inv('0x0A2AB7B7ABC055F4', this.ped.handle);
221
+ isPedCurrentWeaponHolstered() {
222
+ return inv('0xBDD9C235D8D1052E', this.ped.handle);
181
223
  }
182
224
  /**
183
- * Unequip current weapon and set current weapon to WEAPON_UNARMED.
184
- * p0 usually 2 in R* scripts. Doesn't seem to have any effect if changed....
185
- * immediately: if true it will instantly switch to unarmed
225
+ * @param toggle
226
+ */
227
+ setInstantlyEquipWeaponPickups(toggle) {
228
+ inv('0x739B9C6D0E7F7F93', this.ped.handle, toggle);
229
+ }
230
+ /**
231
+ * Hides the ped's weapon during a cutscene.
186
232
  *
187
- * @param p0
188
- * @param immediately
233
+ * @param toggle
189
234
  */
190
- hidePedWeapons(p0, immediately) {
191
- inv('0xFCCC886EDE3C63EC', this.ped.handle, p0, immediately);
235
+ hidePedWeaponForScriptedCutscene(toggle) {
236
+ inv('0x6F6981D2253C208F', this.ped.handle, toggle);
192
237
  }
193
238
  /**
194
- * @param weaponHash Refer to [enum: eWeaponHash]
239
+ * @returns guidPrimary; guidSecondary
195
240
  */
196
- enableAmmoTypeForPed(weaponHash) {
197
- inv('0x3B7B7908B7ADFB4B', this.ped.handle, weaponHash);
241
+ setPlayerPedQuickSwapWeaponByGuid() {
242
+ const result = inv('0xEC1F85DA51D3D6C4', this.ped.handle, pvi(), pvi());
243
+ return [result[0], result[1]];
198
244
  }
199
245
  /**
200
- * Returns ammoHash from weaponObject (Returned by 0x6CA484C9A7377E4F)
201
- *
202
- * @param weaponObject
203
- * @returns
246
+ * @returns Returns the total ammo in the ped weapon from it's guid, or `0`.; guid
204
247
  */
205
- getCurrentPedWeaponAmmoType(weaponObject) {
206
- return (inv('0x7E7B19A4355FEE13', this.ped.handle, weaponObject.handle, rai())) & 0xFFFFFFFF;
248
+ getAmmoInPedWeaponFromGuid() {
249
+ const result = inv('0x4823F13A21F51964', this.ped.handle, pvi(), rai());
250
+ return [result[0], result[1]];
207
251
  }
208
252
  /**
209
253
  * @param p1
210
254
  * @param p2
211
- * @param p3
255
+ */
256
+ removeAllPedWeapons(p1, p2) {
257
+ inv('0xF25DF915FA38C5F3', this.ped.handle, p1, p2);
258
+ }
259
+ /**
260
+ * @param ammoHash Refer to [enum: eAmmoType]
261
+ */
262
+ disableAmmoTypeForPed(ammoHash) {
263
+ inv('0xAA5A52204E077883', this.ped.handle, ammoHash);
264
+ }
265
+ /**
266
+ * Returns whether the ped has a shotgun p1: 0 or 1
267
+ *
268
+ * @param p1
269
+ * @returns
270
+ */
271
+ doesPedHaveShotgun(p1) {
272
+ return inv('0xABC18A28BAD4B46F', this.ped.handle, p1);
273
+ }
274
+ clearPedLastWeaponDamage() {
275
+ inv('0x087D8F4BC65F68E4', this.ped.handle);
276
+ }
277
+ /**
278
+ * Returns true if ped is on a horse while inside of a town
279
+ * Params: p1 = 0
280
+ * GET_L* - GET_MA*
281
+ *
282
+ * @param p1
212
283
  * @returns
213
284
  */
214
- getPedWorstWeapon(p1, p2, p3) {
215
- return (inv('0xDA37A053C1522F5D', this.ped.handle, p1, p2, p3, rai())) & 0xFFFFFFFF;
285
+ N_0x5A695BD328586B44(p1) {
286
+ return inv('0x5A695BD328586B44', this.ped.handle, p1);
216
287
  }
217
288
  /**
218
- * @param toggle
289
+ * @param weaponHash Refer to [enum: eWeaponHash]
290
+ * @param amount
291
+ * @param removeReason Refer to [enum: eRemoveItemReason]
219
292
  */
220
- setPedDropsWeaponsWhenDead(toggle) {
221
- inv('0x476AE72C1D19D1A8', this.ped.handle, toggle);
293
+ removeAmmoFromPed(weaponHash, amount, removeReason) {
294
+ inv('0xF4823C813CB8277D', this.ped.handle, weaponHash, amount, removeReason);
222
295
  }
223
296
  /**
224
- * Returns ammoHash
225
- *
226
- * @returns Returns the [enum: eAmmoType]; weaponGuid
297
+ * @param p1
298
+ * @param p2
227
299
  */
228
- getCurrentAmmoTypeFromGuid() {
229
- const result = inv('0xAF9D167A5656D6A6', this.ped.handle, pvi(), rai());
230
- return [result[0] & 0xFFFFFFFF, result[1]];
300
+ setPedAmmoToDrop(p1, p2) {
301
+ inv('0xA4EFEF9440A5B0EF', this.ped.handle, p1, p2);
231
302
  }
232
303
  /**
233
- * @param toggle
304
+ * Returns the current ammo type of the specified ped's specified weapon.
305
+ *
306
+ * @param weaponHash Refer to [enum: eWeaponHash]
307
+ * @returns
234
308
  */
235
- setPedInfiniteAmmoClip(toggle) {
236
- inv('0xFBAA1E06B6BCA741', this.ped.handle, toggle);
309
+ getPedAmmoTypeFromWeapon(weaponHash) {
310
+ return (inv('0x7FEAD38B326B9F74', this.ped.handle, weaponHash, rai())) & 0xFFFFFFFF;
237
311
  }
238
312
  /**
239
- * returns the amount of peds that were restrained with the weapon thrown bolas
240
- *
241
- * @returns
313
+ * @param weaponHash Refer to [enum: eWeaponHash]
314
+ * @returns ammo
242
315
  */
243
- getNumPedsRestrainedFromWeaponBolas() {
244
- return inv('0x46D42883E873C1D7', this.ped.handle);
316
+ getMaxAmmo(weaponHash) {
317
+ const result = inv('0xDC16122C7A20C933', this.ped.handle, pvi(), weaponHash, rai());
318
+ return [!!result[0], result[1]];
245
319
  }
246
320
  /**
247
- * @returns
321
+ * emote hashes: KIT_EMOTE_TWIRL_GUN, KIT_EMOTE_TWIRL_GUN_LEFT_HOLSTER, KIT_EMOTE_TWIRL_GUN_DUAL, 0 (to unequip)
322
+ *
323
+ * @param emote
248
324
  */
249
- getPedHogtieWeapon() {
250
- return (inv('0x90EB1CB189923587', this.ped.handle, rai())) & 0xFFFFFFFF;
325
+ setActiveGunSpinningEquipKitEmoteTwirl(emote) {
326
+ inv('0xCBCFFF805F1B4596', this.ped.handle, _h(emote));
251
327
  }
252
328
  /**
253
329
  * @returns
@@ -315,69 +391,95 @@ export class Weapon {
315
391
  return createFromHandle('Entity', inv('0x3B390A939AF0B5FC', this.ped.handle, attachPoint, rai()));
316
392
  }
317
393
  /**
394
+ * @returns
395
+ */
396
+ isPedWeaponReadyToShoot() {
397
+ return inv('0xB80CA294F2F26749', this.ped.handle, rai());
398
+ }
399
+ /**
400
+ * @param componentHash
318
401
  * @param weaponHash Refer to [enum: eWeaponHash]
319
- * @param ammoHash Refer to [enum: eAmmoType]
320
402
  */
321
- enableAmmoTypeForPedWeapon(weaponHash, ammoHash) {
322
- inv('0x23FB9FACA28779C1', this.ped.handle, weaponHash, ammoHash);
403
+ removeWeaponComponentFromPed(componentHash, weaponHash) {
404
+ inv('0x19F70C4D80494FF8', this.ped.handle, _h(componentHash), weaponHash);
323
405
  }
324
406
  /**
325
- * @param toggle
407
+ * @param visible
408
+ * @param deselectWeapon
409
+ * @param p3
410
+ * @param p4
326
411
  */
327
- N_0x431240A58484D5D0(toggle) {
328
- inv('0x431240A58484D5D0', this.ped.handle, toggle);
412
+ setPedCurrentWeaponVisible(visible, deselectWeapon, p3, p4) {
413
+ inv('0x0725A4CCFDED9A70', this.ped.handle, visible, deselectWeapon, p3, p4);
329
414
  }
330
415
  /**
331
- * @param p2
416
+ * Old name: _DROP_CURRENT_PED_WEAPON
417
+ *
418
+ * @param p1
419
+ * @param attachPoint Refer to [enum: eWeaponAttachPoint]
332
420
  * @param p3
333
- * @returns outGUID
421
+ * @param p4
422
+ * @returns
334
423
  */
335
- getBestPedShortarmGuid(p2, p3) {
336
- const result = inv('0xF52BD94B47CCF736', this.ped.handle, pvi(), p2, p3);
337
- return result;
424
+ makePedDropWeapon(p1, attachPoint, p3, p4) {
425
+ return createFromHandle('Entity', inv('0xCEF4C65DE502D367', this.ped.handle, p1, attachPoint, p3, p4, rai()));
426
+ }
427
+ removeAllPedAmmo() {
428
+ inv('0x1B83C0DEEBCBB214', this.ped.handle);
338
429
  }
339
430
  /**
340
- * @returns coords
431
+ * @param allow
341
432
  */
342
- getPedLastWeaponImpactCoord() {
343
- const result = inv('0x6C4D0409BA1A2BC2', this.ped.handle, pvv(), rai());
344
- return [!!result[0], Vector3.fromArray(result[1])];
433
+ setAllowDualWield(allow) {
434
+ inv('0x83B8D50EB9446BBA', this.ped.handle, allow);
345
435
  }
346
436
  /**
347
- * Returns WeaponAttachPoint
437
+ * Returns weaponEmoteVariation WEAPON_EMOTE_VARIATION_INVALID = -2,
438
+ * WEAPON_EMOTE_VARIATION_BASE,
439
+ * WEAPON_EMOTE_VARIATION_A,
440
+ * WEAPON_EMOTE_VARIATION_B,
441
+ * WEAPON_EMOTE_VARIATION_C,
442
+ * WEAPON_EMOTE_VARIATION_D,
443
+ * WEAPON_EMOTE_VARIATION_PREVIEW,
444
+ * WEAPON_EMOTE_NUM_VARIATIONS
348
445
  *
349
- * @param attachPoint Refer to [enum: eWeaponAttachPoint]
446
+ * @param variation
350
447
  * @returns
351
448
  */
352
- getWeaponAttachPoint(attachPoint) {
353
- return inv('0xCAD4FE9398820D24', this.ped.handle, attachPoint, rai());
449
+ getWeaponEmoteVariation(variation) {
450
+ return inv('0x86147D05FA831D3A', this.ped.handle, variation, rai());
354
451
  }
355
452
  /**
356
- * @param p2
357
- * @param attachPoint Refer to [enum: eWeaponAttachPoint]
358
- * @param p4
359
- * @returns weaponHash: Refer to [enum: eWeaponHash]
453
+ * @param weaponHash Refer to [enum: eWeaponHash]
454
+ * @returns
360
455
  */
361
- getCurrentPedWeapon(p2, attachPoint, p4) {
362
- const result = inv('0x3A87E44BB9A01D54', this.ped.handle, pvi(), p2, attachPoint, p4, rai());
363
- return [!!result[0], result[1]];
456
+ isPedCarryingWeapon(weaponHash) {
457
+ return inv('0xF29A186ED428B552', this.ped.handle, weaponHash);
364
458
  }
365
459
  /**
366
- * Returns whether the ped has a revolver p1: 0 or 1
367
- *
368
- * @param p1
369
460
  * @returns
370
461
  */
371
- doesPedHaveRevolver(p1) {
372
- return inv('0x5B235F24472F2C3B', this.ped.handle, p1);
462
+ refillAmmoInCurrentPedWeapon() {
463
+ return inv('0x0A2AB7B7ABC055F4', this.ped.handle);
373
464
  }
374
465
  /**
375
- * Returns emote Hash
466
+ * Unequip current weapon and set current weapon to WEAPON_UNARMED.
467
+ * p0 usually 2 in R* scripts. Doesn't seem to have any effect if changed....
468
+ * immediately: if true it will instantly switch to unarmed
376
469
  *
377
- * @returns
470
+ * @param p0
471
+ * @param immediately
378
472
  */
379
- getPedGunSpinningEquippedKitEmoteTwirl() {
380
- return (inv('0x2C4FEC3D0EFA9FC0', this.ped.handle, rai())) & 0xFFFFFFFF;
473
+ hidePedWeapons(p0, immediately) {
474
+ inv('0xFCCC886EDE3C63EC', this.ped.handle, p0, immediately);
475
+ }
476
+ /**
477
+ * @param weaponHash Refer to [enum: eWeaponHash]
478
+ * @returns ammo
479
+ */
480
+ getAmmoInClip(weaponHash) {
481
+ const result = inv('0x2E1202248937775C', this.ped.handle, pvi(), weaponHash, rai());
482
+ return [!!result[0], result[1]];
381
483
  }
382
484
  /**
383
485
  * @param toggle
@@ -453,12 +555,6 @@ export class Weapon {
453
555
  getMaxLockonDistanceOfCurrentPedWeapon() {
454
556
  return inv('0x79B1A6E780266DB0', this.ped.handle, raf());
455
557
  }
456
- /**
457
- * @param ammoHash Refer to [enum: eAmmoType]
458
- */
459
- disableAmmoTypeForPed(ammoHash) {
460
- inv('0xAA5A52204E077883', this.ped.handle, ammoHash);
461
- }
462
558
  /**
463
559
  * @param visible
464
560
  */
@@ -492,50 +588,152 @@ export class Weapon {
492
588
  return (inv('0xDBC4B552B2AE9A83', this.ped.handle, _h(slotHash), rai())) & 0xFFFFFFFF;
493
589
  }
494
590
  /**
495
- * Outputs cached guids
496
- *
497
- * @returns guidPrimary; guidSecondary
591
+ * Outputs cached guids
592
+ *
593
+ * @returns guidPrimary; guidSecondary
594
+ */
595
+ getPlayerPedQuickSwapWeaponByGuid() {
596
+ const result = inv('0xB7E52A058B07C7E2', this.ped.handle, pvi(), pvi());
597
+ return [result[0], result[1]];
598
+ }
599
+ /**
600
+ * Returns true if the ped is currently holstering or unholstering a weapon
601
+ *
602
+ * @returns
603
+ */
604
+ isWeaponHolsterStateChanging() {
605
+ return inv('0x2387D6E9C6B478AA', this.ped.handle, rai());
606
+ }
607
+ /**
608
+ * @param ammoHash Refer to [enum: eAmmoType]
609
+ * @returns
610
+ */
611
+ N_0x44C8F4908F1B2622(ammoHash) {
612
+ return inv('0x44C8F4908F1B2622', this.ped.handle, ammoHash, rai());
613
+ }
614
+ /**
615
+ * @param p2
616
+ * @returns clipInventoryUid
617
+ */
618
+ refillAmmoInClip(p2) {
619
+ const result = inv('0xDF4A3404D022ADDE', this.ped.handle, pvi(), p2);
620
+ return [result[0], result[1]];
621
+ }
622
+ /**
623
+ * _SET_A* - _SET_B*
624
+ *
625
+ * @param p1
626
+ */
627
+ N_0x2EBF70E1D8C06683(p1) {
628
+ inv('0x2EBF70E1D8C06683', this.ped.handle, _h(p1));
629
+ }
630
+ /**
631
+ * @returns
632
+ */
633
+ getAllowDualWield() {
634
+ return inv('0x918990BD9CE08582', this.ped.handle);
635
+ }
636
+ /**
637
+ * Returns eCurrentHeldWeapon
638
+ * _GET_R* - _GET_T*
639
+ *
640
+ * @returns
641
+ */
642
+ getPedCurrentHeldWeapon() {
643
+ return (inv('0x8425C5F057012DAB', this.ped.handle, rai())) & 0xFFFFFFFF;
644
+ }
645
+ /**
646
+ * @param toggle
647
+ */
648
+ setForceAutoEquip(toggle) {
649
+ inv('0xBE711B14A159E84F', this.ped.handle, toggle);
650
+ }
651
+ /**
652
+ * @param weaponHash Refer to [enum: eWeaponHash]
653
+ * @param ammo
654
+ */
655
+ setPedAmmo(weaponHash, ammo) {
656
+ inv('0x14E56BC5B5DB6A19', this.ped.handle, weaponHash, ammo);
657
+ }
658
+ /**
659
+ * Gives the ped the weapon.
660
+ * 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
661
+ * 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
662
+ *
663
+ * @param weaponHash Refer to [enum: eWeaponHash]
664
+ * @param ammoCount
665
+ * @param bForceInHand
666
+ * @param bForceInHolster
667
+ * @param attachPoint Refer to [enum: eWeaponAttachPoint]
668
+ * @param bAllowMultipleCopies
669
+ * @param p7
670
+ * @param p8
671
+ * @param addReason Refer to [enum: eAddItemReason]
672
+ * @param bIgnoreUnlocks
673
+ * @param permanentDegradation
674
+ * @param p12
675
+ * @returns
676
+ */
677
+ giveWeaponToPed(weaponHash, ammoCount, bForceInHand, bForceInHolster, attachPoint, bAllowMultipleCopies, p7, p8, addReason, bIgnoreUnlocks, permanentDegradation, p12) {
678
+ return (inv('0x5E3BDDBCB83F3D84', this.ped.handle, weaponHash, ammoCount, bForceInHand, bForceInHolster, attachPoint, bAllowMultipleCopies, f(p7), f(p8), addReason, bIgnoreUnlocks, f(permanentDegradation), p12, rai())) & 0xFFFFFFFF;
679
+ }
680
+ /**
681
+ * @param weaponHash Refer to [enum: eWeaponHash]
682
+ * @returns
683
+ */
684
+ getAmmoInPedWeapon(weaponHash) {
685
+ return inv('0x015A522136D7F951', this.ped.handle, weaponHash, rai());
686
+ }
687
+ /**
688
+ * @param attachPoint Refer to [enum: eWeaponAttachPoint]
689
+ * @returns weaponGuid
690
+ */
691
+ getPedWeaponGuidAtAttachPoint(attachPoint) {
692
+ const result = inv('0x6929E22158E52265', this.ped.handle, attachPoint, pvi());
693
+ return [result[0], result[1]];
694
+ }
695
+ /**
696
+ * @param toggle
498
697
  */
499
- getPlayerPedQuickSwapWeaponByGuid() {
500
- const result = inv('0xB7E52A058B07C7E2', this.ped.handle, pvi(), pvi());
501
- return [result[0], result[1]];
698
+ setAllowAnyWeaponDrop(toggle) {
699
+ inv('0x78030C7867D8B9B6', this.ped.handle, toggle);
502
700
  }
503
701
  /**
504
- * Returns true if the ped is currently holstering or unholstering a weapon
505
- *
506
702
  * @returns
507
703
  */
508
- isWeaponHolsterStateChanging() {
509
- return inv('0x2387D6E9C6B478AA', this.ped.handle, rai());
704
+ makePedReload() {
705
+ return inv('0x79E1E511FF7EFB13', this.ped.handle);
510
706
  }
511
707
  /**
512
- * @param ammoHash Refer to [enum: eAmmoType]
513
- * @returns
708
+ * @param weaponHash Refer to [enum: eWeaponHash]
709
+ * @param ammoCount
710
+ * @param p3
711
+ * @param addReason Refer to [enum: eAddItemReason]
514
712
  */
515
- N_0x44C8F4908F1B2622(ammoHash) {
516
- return inv('0x44C8F4908F1B2622', this.ped.handle, ammoHash, rai());
713
+ giveDelayedWeaponToPed(weaponHash, ammoCount, p3, addReason) {
714
+ inv('0xB282DC6EBD803C75', this.ped.handle, weaponHash, ammoCount, p3, addReason);
517
715
  }
518
716
  /**
519
- * @param p2
520
- * @returns clipInventoryUid
717
+ * @param toggle
521
718
  */
522
- refillAmmoInClip(p2) {
523
- const result = inv('0xDF4A3404D022ADDE', this.ped.handle, pvi(), p2);
524
- return [result[0], result[1]];
719
+ N_0x45E57FDD531C9477(toggle) {
720
+ inv('0x45E57FDD531C9477', this.ped.handle, toggle);
525
721
  }
526
722
  /**
527
- * _SET_A* - _SET_B*
528
- *
529
- * @param p1
723
+ * @param ammoHash Refer to [enum: eAmmoType]
724
+ * @returns weaponInventoryUid
530
725
  */
531
- N_0x2EBF70E1D8C06683(p1) {
532
- inv('0x2EBF70E1D8C06683', this.ped.handle, _h(p1));
726
+ setAmmoTypeForPedWeaponInventory(ammoHash) {
727
+ const result = inv('0xEBE46B501BC3FBCF', this.ped.handle, pvi(), ammoHash);
728
+ return result;
533
729
  }
534
730
  /**
535
- * @returns
731
+ * @param weaponHash Refer to [enum: eWeaponHash]
732
+ * @param p2
733
+ * @param removeReason Refer to [enum: eRemoveItemReason]
536
734
  */
537
- isPedWeaponReadyToShoot() {
538
- return inv('0xB80CA294F2F26749', this.ped.handle, rai());
735
+ removeWeaponFromPed(weaponHash, p2, removeReason) {
736
+ inv('0x4899CB088EDF59B8', this.ped.handle, weaponHash, p2, removeReason);
539
737
  }
540
738
  /**
541
739
  * @param ammoType
@@ -677,12 +875,10 @@ export class Weapon {
677
875
  inv('0x5230D3F6EE56CFE6', this.ped.handle, attachPoint);
678
876
  }
679
877
  /**
680
- * @param weaponHash Refer to [enum: eWeaponHash]
681
- * @returns ammo
878
+ * @returns
682
879
  */
683
- getAmmoInClip(weaponHash) {
684
- const result = inv('0x2E1202248937775C', this.ped.handle, pvi(), weaponHash, rai());
685
- return [!!result[0], result[1]];
880
+ getPedHogtieWeapon() {
881
+ return (inv('0x90EB1CB189923587', this.ped.handle, rai())) & 0xFFFFFFFF;
686
882
  }
687
883
  /**
688
884
  * Returns whether the ped has a pistol p1: 0 or 1
@@ -735,200 +931,4 @@ export class Weapon {
735
931
  hasPedGotWeapon(weaponHash, p2, onlyCheckPlayerInventory) {
736
932
  return inv('0x8DECB02F88F428BC', this.ped.handle, weaponHash, p2, onlyCheckPlayerInventory, rai());
737
933
  }
738
- /**
739
- * @returns
740
- */
741
- getAllowDualWield() {
742
- return inv('0x918990BD9CE08582', this.ped.handle);
743
- }
744
- /**
745
- * Stores longarms to your horse on dismount
746
- * Params: p2 = 0
747
- * SET_[I - M]*
748
- *
749
- * @param storeLongarms
750
- * @param p2
751
- */
752
- setInstantlyStoreLongarmsOnDismount(storeLongarms, p2) {
753
- inv('0xB832F1A686B9B810', this.ped.handle, storeLongarms, p2);
754
- }
755
- /**
756
- * @param removeReason Refer to [enum: eRemoveItemReason]
757
- * @returns weaponGuid
758
- */
759
- removeWeaponFromPedByGuid(removeReason) {
760
- const result = inv('0x51C3B71591811485', this.ped.handle, pvi(), removeReason);
761
- return result;
762
- }
763
- /**
764
- * attachPoint:
765
- *
766
- * @param weaponHash Refer to [enum: eWeaponHash]
767
- * @param equipNow
768
- * @param attachPoint Refer to [enum: eWeaponAttachPoint]
769
- * @param p4
770
- * @param p5
771
- */
772
- setCurrentPedWeapon(weaponHash, equipNow, attachPoint, p4, p5) {
773
- inv('0xADF692B254977C0C', this.ped.handle, weaponHash, equipNow, attachPoint, p4, p5);
774
- }
775
- /**
776
- * Equips a weapon from a weaponItem, similar to GIVE_WEAPON_TO_PED
777
- *
778
- * @param p2
779
- * @param p3
780
- * @param p4
781
- * @param p5
782
- * @returns weaponUid
783
- */
784
- setCurrentPedWeaponByGuid(p2, p3, p4, p5) {
785
- const result = inv('0x12FB95FE3D579238', this.ped.handle, pvi(), p2, p3, p4, p5);
786
- return result;
787
- }
788
- /**
789
- * @param componentHash
790
- * @param weaponHash Refer to [enum: eWeaponHash]
791
- * @returns
792
- */
793
- hasPedGotWeaponComponent(componentHash, weaponHash) {
794
- return inv('0xBBC67A6F965C688A', this.ped.handle, _h(componentHash), weaponHash);
795
- }
796
- /**
797
- * @param weaponHash Refer to [enum: eWeaponHash]
798
- * @param amount The amount of ped to add to the ammo
799
- * @param addReason Refer to [enum: eAddItemReason]
800
- */
801
- addAmmoToPed(weaponHash, amount, addReason) {
802
- inv('0xB190BCA3F4042F95', this.ped.handle, weaponHash, amount, addReason);
803
- }
804
- /**
805
- * @param ammoType
806
- * @param amount
807
- * @param addReason Refer to [enum: eAddItemReason]
808
- */
809
- addAmmoToPedByType(ammoType, amount, addReason) {
810
- inv('0x106A811C6D3035F3', this.ped.handle, _h(ammoType), amount, addReason);
811
- }
812
- /**
813
- * @param targetPed
814
- * @returns
815
- */
816
- isTargetPedConstrainedByPedUsingBolas(targetPed) {
817
- return inv('0x8D50F43298AB9545', this.ped.handle, targetPed.handle, rai());
818
- }
819
- /**
820
- * @param p1
821
- * @returns guidPrimary
822
- */
823
- getBestPedWeaponInInventory(p1) {
824
- const result = inv('0x7B98500614C8E8B8', this.ped.handle, p1, pvi());
825
- return [result[0], result[1]];
826
- }
827
- /**
828
- * Returns whether the ped has a shotgun p1: 0 or 1
829
- *
830
- * @param p1
831
- * @returns
832
- */
833
- doesPedHaveShotgun(p1) {
834
- return inv('0xABC18A28BAD4B46F', this.ped.handle, p1);
835
- }
836
- clearPedLastWeaponDamage() {
837
- inv('0x087D8F4BC65F68E4', this.ped.handle);
838
- }
839
- /**
840
- * Returns true if ped is on a horse while inside of a town
841
- * Params: p1 = 0
842
- * GET_L* - GET_MA*
843
- *
844
- * @param p1
845
- * @returns
846
- */
847
- N_0x5A695BD328586B44(p1) {
848
- return inv('0x5A695BD328586B44', this.ped.handle, p1);
849
- }
850
- /**
851
- * @param weaponHash Refer to [enum: eWeaponHash]
852
- * @param amount
853
- * @param removeReason Refer to [enum: eRemoveItemReason]
854
- */
855
- removeAmmoFromPed(weaponHash, amount, removeReason) {
856
- inv('0xF4823C813CB8277D', this.ped.handle, weaponHash, amount, removeReason);
857
- }
858
- /**
859
- * @param p1
860
- * @param p2
861
- */
862
- setPedAmmoToDrop(p1, p2) {
863
- inv('0xA4EFEF9440A5B0EF', this.ped.handle, p1, p2);
864
- }
865
- /**
866
- * Returns the current ammo type of the specified ped's specified weapon.
867
- *
868
- * @param weaponHash Refer to [enum: eWeaponHash]
869
- * @returns
870
- */
871
- getPedAmmoTypeFromWeapon(weaponHash) {
872
- return (inv('0x7FEAD38B326B9F74', this.ped.handle, weaponHash, rai())) & 0xFFFFFFFF;
873
- }
874
- /**
875
- * @param weaponHash Refer to [enum: eWeaponHash]
876
- * @returns ammo
877
- */
878
- getMaxAmmo(weaponHash) {
879
- const result = inv('0xDC16122C7A20C933', this.ped.handle, pvi(), weaponHash, rai());
880
- return [!!result[0], result[1]];
881
- }
882
- /**
883
- * @param weaponHash Refer to [enum: eWeaponHash]
884
- * @param ammo
885
- */
886
- setPedAmmo(weaponHash, ammo) {
887
- inv('0x14E56BC5B5DB6A19', this.ped.handle, weaponHash, ammo);
888
- }
889
- /**
890
- * Gives the ped the weapon.
891
- * 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
892
- * 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
893
- *
894
- * @param weaponHash Refer to [enum: eWeaponHash]
895
- * @param ammoCount
896
- * @param bForceInHand
897
- * @param bForceInHolster
898
- * @param attachPoint Refer to [enum: eWeaponAttachPoint]
899
- * @param bAllowMultipleCopies
900
- * @param p7
901
- * @param p8
902
- * @param addReason Refer to [enum: eAddItemReason]
903
- * @param bIgnoreUnlocks
904
- * @param permanentDegradation
905
- * @param p12
906
- * @returns
907
- */
908
- giveWeaponToPed(weaponHash, ammoCount, bForceInHand, bForceInHolster, attachPoint, bAllowMultipleCopies, p7, p8, addReason, bIgnoreUnlocks, permanentDegradation, p12) {
909
- return (inv('0x5E3BDDBCB83F3D84', this.ped.handle, weaponHash, ammoCount, bForceInHand, bForceInHolster, attachPoint, bAllowMultipleCopies, f(p7), f(p8), addReason, bIgnoreUnlocks, f(permanentDegradation), p12, rai())) & 0xFFFFFFFF;
910
- }
911
- /**
912
- * @param weaponHash Refer to [enum: eWeaponHash]
913
- * @returns
914
- */
915
- getAmmoInPedWeapon(weaponHash) {
916
- return inv('0x015A522136D7F951', this.ped.handle, weaponHash, rai());
917
- }
918
- /**
919
- * @param attachPoint Refer to [enum: eWeaponAttachPoint]
920
- * @returns weaponGuid
921
- */
922
- getPedWeaponGuidAtAttachPoint(attachPoint) {
923
- const result = inv('0x6929E22158E52265', this.ped.handle, attachPoint, pvi());
924
- return [result[0], result[1]];
925
- }
926
- /**
927
- * emote hashes: KIT_EMOTE_TWIRL_GUN, KIT_EMOTE_TWIRL_GUN_LEFT_HOLSTER, KIT_EMOTE_TWIRL_GUN_DUAL, 0 (to unequip)
928
- *
929
- * @param emote
930
- */
931
- setActiveGunSpinningEquipKitEmoteTwirl(emote) {
932
- inv('0xCBCFFF805F1B4596', this.ped.handle, _h(emote));
933
- }
934
934
  }