@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
@@ -6,536 +6,702 @@ 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
+ * @param weaponHash Refer to [enum: eWeaponHash]
75
+ * @returns ammo
68
76
  */
69
- setInstantlyEquipWeaponPickups(toggle) {
70
- inv('0x739B9C6D0E7F7F93', this.ped.handle, toggle);
77
+ getAmmoInClip(weaponHash) {
78
+ const result = inv('0x2E1202248937775C', this.ped.handle, pvi(), weaponHash, rai());
79
+ return [!!result[0], result[1]];
71
80
  }
72
81
  /**
73
- * Hides the ped's weapon during a cutscene.
74
- *
75
82
  * @param toggle
76
83
  */
77
- hidePedWeaponForScriptedCutscene(toggle) {
78
- inv('0x6F6981D2253C208F', this.ped.handle, toggle);
84
+ N_0x16D9841A85FA627E(toggle) {
85
+ inv('0x16D9841A85FA627E', this.ped.handle, toggle);
79
86
  }
80
87
  /**
81
- * @returns guidPrimary; guidSecondary
88
+ * @param weaponHash Refer to [enum: eWeaponHash]
89
+ * @param offset
90
+ * @param ammoCount
82
91
  */
83
- setPlayerPedQuickSwapWeaponByGuid() {
84
- const result = inv('0xEC1F85DA51D3D6C4', this.ped.handle, pvi(), pvi());
85
- return [result[0], result[1]];
92
+ setPedDropsInventoryWeapon(weaponHash, offset, ammoCount) {
93
+ inv('0x208A1888007FC0E6', this.ped.handle, weaponHash, f(offset.x), f(offset.y), f(offset.z), ammoCount);
86
94
  }
87
95
  /**
88
- * @returns Returns the total ammo in the ped weapon from it's guid, or `0`.; guid
96
+ * spinHash can be -1, 0 to disable
97
+ *
98
+ * @param weaponEmoteTrickType
99
+ * @param spin
89
100
  */
90
- getAmmoInPedWeaponFromGuid() {
91
- const result = inv('0x4823F13A21F51964', this.ped.handle, pvi(), rai());
92
- return [result[0], result[1]];
101
+ setActiveGunSpinningKitEmoteTwirl(weaponEmoteTrickType, spin) {
102
+ inv('0x01F661BB9C71B465', this.ped.handle, weaponEmoteTrickType, _h(spin));
93
103
  }
94
104
  /**
95
- * @param p1
96
- * @param p2
105
+ * Appears to just send specified weapon to your horse holster without having to be close
106
+ * However, the weapon is not visible on the horse holster, but you can reach the weapon on the weapon wheel
107
+ *
108
+ * @param weaponHash Refer to [enum: eWeaponHash]
97
109
  */
98
- removeAllPedWeapons(p1, p2) {
99
- inv('0xF25DF915FA38C5F3', this.ped.handle, p1, p2);
110
+ sendWeaponToInventory(weaponHash) {
111
+ inv('0xE9BD19F8121ADE3E', this.ped.handle, weaponHash);
100
112
  }
101
113
  /**
102
- * Returns eCurrentHeldWeapon
103
- * _GET_R* - _GET_T*
114
+ * If near your horse when called, weapons stored on your horse will be considered
115
+ * Returns weaponHash
104
116
  *
117
+ * @param weaponGroup
118
+ * @param p2
119
+ * @param p3
105
120
  * @returns
106
121
  */
107
- getPedCurrentHeldWeapon() {
108
- return (inv('0x8425C5F057012DAB', this.ped.handle, rai())) & 0xFFFFFFFF;
122
+ getBestPedWeaponInGroup(weaponGroup, p2, p3) {
123
+ return (inv('0x9F67929D98E7C6E8', this.ped.handle, _h(weaponGroup), p2, p3, rai())) & 0xFFFFFFFF;
109
124
  }
110
125
  /**
111
- * @param toggle
126
+ * Only used in R* SP Scripts native_son2, native_son3 and smuggler2
127
+ * Params: p2 = -1
128
+ *
129
+ * @param p1
130
+ * @param p2
112
131
  */
113
- setForceAutoEquip(toggle) {
114
- inv('0xBE711B14A159E84F', this.ped.handle, toggle);
132
+ N_0x8A779706DA5CA3DD(p1, p2) {
133
+ inv('0x8A779706DA5CA3DD', this.ped.handle, p1, p2);
115
134
  }
116
135
  /**
117
- * @param componentHash
118
136
  * @param weaponHash Refer to [enum: eWeaponHash]
137
+ * @param ammoHash Refer to [enum: eAmmoType]
119
138
  */
120
- removeWeaponComponentFromPed(componentHash, weaponHash) {
121
- inv('0x19F70C4D80494FF8', this.ped.handle, _h(componentHash), weaponHash);
139
+ disableAmmoTypeForPedWeapon(weaponHash, ammoHash) {
140
+ inv('0xF0D728EEA3C99775', this.ped.handle, weaponHash, ammoHash);
122
141
  }
123
142
  /**
124
- * @param visible
125
- * @param deselectWeapon
126
- * @param p3
127
- * @param p4
143
+ * @returns data; outData
128
144
  */
129
- setPedCurrentWeaponVisible(visible, deselectWeapon, p3, p4) {
130
- inv('0x0725A4CCFDED9A70', this.ped.handle, visible, deselectWeapon, p3, p4);
145
+ giveWeaponToPedWithOptions() {
146
+ const result = inv('0xBE7E42B07FD317AC', this.ped.handle, pvi(), pvi(), rai());
147
+ return [!!result[0], result[1], result[2]];
131
148
  }
132
149
  /**
133
- * Old name: _DROP_CURRENT_PED_WEAPON
134
- *
135
- * @param p1
136
- * @param attachPoint Refer to [enum: eWeaponAttachPoint]
137
- * @param p3
138
- * @param p4
139
150
  * @returns
140
151
  */
141
- makePedDropWeapon(p1, attachPoint, p3, p4) {
142
- return createFromHandle('Entity', inv('0xCEF4C65DE502D367', this.ped.handle, p1, attachPoint, p3, p4, rai()));
143
- }
144
- removeAllPedAmmo() {
145
- inv('0x1B83C0DEEBCBB214', this.ped.handle);
152
+ getMaxLockonDistanceOfCurrentPedWeapon() {
153
+ return inv('0x79B1A6E780266DB0', this.ped.handle, raf());
146
154
  }
147
155
  /**
148
- * @param allow
156
+ * @returns
149
157
  */
150
- setAllowDualWield(allow) {
151
- inv('0x83B8D50EB9446BBA', this.ped.handle, allow);
158
+ getAllowDualWield() {
159
+ return inv('0x918990BD9CE08582', this.ped.handle);
152
160
  }
153
161
  /**
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
+ * Returns eCurrentHeldWeapon
163
+ * _GET_R* - _GET_T*
162
164
  *
163
- * @param variation
164
165
  * @returns
165
166
  */
166
- getWeaponEmoteVariation(variation) {
167
- return inv('0x86147D05FA831D3A', this.ped.handle, variation, rai());
167
+ getPedCurrentHeldWeapon() {
168
+ return (inv('0x8425C5F057012DAB', this.ped.handle, rai())) & 0xFFFFFFFF;
169
+ }
170
+ /**
171
+ * @param toggle
172
+ */
173
+ setForceAutoEquip(toggle) {
174
+ inv('0xBE711B14A159E84F', this.ped.handle, toggle);
175
+ }
176
+ /**
177
+ * @param weaponHash Refer to [enum: eWeaponHash]
178
+ * @param ammo
179
+ */
180
+ setPedAmmo(weaponHash, ammo) {
181
+ inv('0x14E56BC5B5DB6A19', this.ped.handle, weaponHash, ammo);
168
182
  }
169
183
  /**
184
+ * Gives the ped the weapon.
185
+ * 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
186
+ * 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
187
+ *
170
188
  * @param weaponHash Refer to [enum: eWeaponHash]
189
+ * @param ammoCount
190
+ * @param bForceInHand
191
+ * @param bForceInHolster
192
+ * @param attachPoint Refer to [enum: eWeaponAttachPoint]
193
+ * @param bAllowMultipleCopies
194
+ * @param p7
195
+ * @param p8
196
+ * @param addReason Refer to [enum: eAddItemReason]
197
+ * @param bIgnoreUnlocks
198
+ * @param permanentDegradation
199
+ * @param p12
171
200
  * @returns
172
201
  */
173
- isPedCarryingWeapon(weaponHash) {
174
- return inv('0xF29A186ED428B552', this.ped.handle, weaponHash);
202
+ giveWeaponToPed(weaponHash, ammoCount, bForceInHand, bForceInHolster, attachPoint, bAllowMultipleCopies, p7, p8, addReason, bIgnoreUnlocks, permanentDegradation, p12) {
203
+ return (inv('0x5E3BDDBCB83F3D84', this.ped.handle, weaponHash, ammoCount, bForceInHand, bForceInHolster, attachPoint, bAllowMultipleCopies, f(p7), f(p8), addReason, bIgnoreUnlocks, f(permanentDegradation), p12, rai())) & 0xFFFFFFFF;
175
204
  }
176
205
  /**
206
+ * @param weaponHash Refer to [enum: eWeaponHash]
177
207
  * @returns
178
208
  */
179
- refillAmmoInCurrentPedWeapon() {
180
- return inv('0x0A2AB7B7ABC055F4', this.ped.handle);
209
+ getAmmoInPedWeapon(weaponHash) {
210
+ return inv('0x015A522136D7F951', this.ped.handle, weaponHash, rai());
181
211
  }
182
212
  /**
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
186
- *
187
- * @param p0
188
- * @param immediately
213
+ * @param attachPoint Refer to [enum: eWeaponAttachPoint]
214
+ * @returns weaponGuid
189
215
  */
190
- hidePedWeapons(p0, immediately) {
191
- inv('0xFCCC886EDE3C63EC', this.ped.handle, p0, immediately);
216
+ getPedWeaponGuidAtAttachPoint(attachPoint) {
217
+ const result = inv('0x6929E22158E52265', this.ped.handle, attachPoint, pvi());
218
+ return [result[0], result[1]];
192
219
  }
193
220
  /**
194
- * @param weaponHash Refer to [enum: eWeaponHash]
221
+ * @param toggle
195
222
  */
196
- enableAmmoTypeForPed(weaponHash) {
197
- inv('0x3B7B7908B7ADFB4B', this.ped.handle, weaponHash);
223
+ setAllowAnyWeaponDrop(toggle) {
224
+ inv('0x78030C7867D8B9B6', this.ped.handle, toggle);
198
225
  }
199
226
  /**
200
- * Returns ammoHash from weaponObject (Returned by 0x6CA484C9A7377E4F)
201
- *
202
- * @param weaponObject
203
227
  * @returns
204
228
  */
205
- getCurrentPedWeaponAmmoType(weaponObject) {
206
- return (inv('0x7E7B19A4355FEE13', this.ped.handle, weaponObject.handle, rai())) & 0xFFFFFFFF;
229
+ makePedReload() {
230
+ return inv('0x79E1E511FF7EFB13', this.ped.handle);
207
231
  }
208
232
  /**
209
- * @param p1
210
- * @param p2
233
+ * @param weaponHash Refer to [enum: eWeaponHash]
234
+ * @param ammoCount
211
235
  * @param p3
212
- * @returns
236
+ * @param addReason Refer to [enum: eAddItemReason]
213
237
  */
214
- getPedWorstWeapon(p1, p2, p3) {
215
- return (inv('0xDA37A053C1522F5D', this.ped.handle, p1, p2, p3, rai())) & 0xFFFFFFFF;
238
+ giveDelayedWeaponToPed(weaponHash, ammoCount, p3, addReason) {
239
+ inv('0xB282DC6EBD803C75', this.ped.handle, weaponHash, ammoCount, p3, addReason);
216
240
  }
217
241
  /**
218
242
  * @param toggle
219
243
  */
220
- setPedDropsWeaponsWhenDead(toggle) {
221
- inv('0x476AE72C1D19D1A8', this.ped.handle, toggle);
244
+ N_0x45E57FDD531C9477(toggle) {
245
+ inv('0x45E57FDD531C9477', this.ped.handle, toggle);
222
246
  }
223
247
  /**
224
- * Returns ammoHash
225
- *
226
- * @returns Returns the [enum: eAmmoType]; weaponGuid
227
- */
228
- getCurrentAmmoTypeFromGuid() {
229
- const result = inv('0xAF9D167A5656D6A6', this.ped.handle, pvi(), rai());
230
- return [result[0] & 0xFFFFFFFF, result[1]];
231
- }
232
- /**
233
- * @param toggle
248
+ * @param ammoHash Refer to [enum: eAmmoType]
249
+ * @returns weaponInventoryUid
234
250
  */
235
- setPedInfiniteAmmoClip(toggle) {
236
- inv('0xFBAA1E06B6BCA741', this.ped.handle, toggle);
251
+ setAmmoTypeForPedWeaponInventory(ammoHash) {
252
+ const result = inv('0xEBE46B501BC3FBCF', this.ped.handle, pvi(), ammoHash);
253
+ return result;
237
254
  }
238
255
  /**
239
- * returns the amount of peds that were restrained with the weapon thrown bolas
240
- *
241
- * @returns
256
+ * @param weaponHash Refer to [enum: eWeaponHash]
257
+ * @param p2
258
+ * @param removeReason Refer to [enum: eRemoveItemReason]
242
259
  */
243
- getNumPedsRestrainedFromWeaponBolas() {
244
- return inv('0x46D42883E873C1D7', this.ped.handle);
260
+ removeWeaponFromPed(weaponHash, p2, removeReason) {
261
+ inv('0x4899CB088EDF59B8', this.ped.handle, weaponHash, p2, removeReason);
245
262
  }
246
263
  /**
247
- * @returns
264
+ * @param visible
248
265
  */
249
- getPedHogtieWeapon() {
250
- return (inv('0x90EB1CB189923587', this.ped.handle, rai())) & 0xFFFFFFFF;
266
+ setPedAllWeaponsVisibility(visible) {
267
+ inv('0x4F806A6CFED89468', this.ped.handle, visible);
251
268
  }
252
269
  /**
270
+ * @param weaponHash Refer to [enum: eWeaponHash]
271
+ * @param ammo
253
272
  * @returns
254
273
  */
255
- enableWeaponRestore() {
256
- return inv('0xC395355843BE134B', this.ped.handle);
274
+ setAmmoInClip(weaponHash, ammo) {
275
+ return inv('0xDCD2A934D65CB497', this.ped.handle, weaponHash, ammo, rai());
257
276
  }
258
277
  /**
259
- * Returns whether the specified ped is holding a weapon with the given hash.
260
- * only these weapons below return true
261
- * 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
278
+ * _GET_M* - _GET_PED_A*
262
279
  *
263
- * @param weapon
280
+ * @param p1
264
281
  * @returns
265
282
  */
266
- isPedHoldingWeapon(weapon) {
267
- return inv('0x07E1C35F0078C3F9', this.ped.handle, _h(weapon), rai());
283
+ getPedWeaponObject(p1) {
284
+ return createFromHandle('Prop', inv('0x6CA484C9A7377E4F', this.ped.handle, p1, rai()));
268
285
  }
269
286
  /**
270
- * _GET_D* - _GET_L*
287
+ * slotHash is usually just the weaponHash name, but WEAPON_* is replaced with SLOT_*
271
288
  *
289
+ * @param slotHash
272
290
  * @returns
273
291
  */
274
- N_0x0DE0944ECCB3DF5D() {
275
- return inv('0x0DE0944ECCB3DF5D', this.ped.handle, rai());
292
+ getPedWeaponInSlot(slotHash) {
293
+ return (inv('0xDBC4B552B2AE9A83', this.ped.handle, _h(slotHash), rai())) & 0xFFFFFFFF;
276
294
  }
277
295
  /**
278
- * @param flags
279
- * @returns
296
+ * Outputs cached guids
297
+ *
298
+ * @returns guidPrimary; guidSecondary
280
299
  */
281
- isPedArmed(flags) {
282
- return inv('0xCB690F680A3EA971', this.ped.handle, flags);
300
+ getPlayerPedQuickSwapWeaponByGuid() {
301
+ const result = inv('0xB7E52A058B07C7E2', this.ped.handle, pvi(), pvi());
302
+ return [result[0], result[1]];
283
303
  }
284
304
  /**
285
- * Returns whether the ped has a sniper p1: 0 or 1
305
+ * Returns true if the ped is currently holstering or unholstering a weapon
286
306
  *
287
- * @param p1
288
307
  * @returns
289
308
  */
290
- doesPedHaveSniper(p1) {
291
- return inv('0x80BB243789008A82', this.ped.handle, p1);
309
+ isWeaponHolsterStateChanging() {
310
+ return inv('0x2387D6E9C6B478AA', this.ped.handle, rai());
292
311
  }
293
312
  /**
294
- * Returns the ped's default unarmed weapon hash as defined in CPedModelInfo (DefaultUnarmedWeapon).
295
- * Falls back to WEAPON_UNARMED if the ped doesn't have a valid model info pointer, or 0 if the ped doesn't exist.
296
- *
313
+ * @param ammoHash Refer to [enum: eAmmoType]
297
314
  * @returns
298
315
  */
299
- getDefaultUnarmedWeaponHash() {
300
- return (inv('0x08FF1099ED2E6E21', this.ped.handle, rai())) & 0xFFFFFFFF;
316
+ N_0x44C8F4908F1B2622(ammoHash) {
317
+ return inv('0x44C8F4908F1B2622', this.ped.handle, ammoHash, rai());
301
318
  }
302
319
  /**
303
- * @param weaponHash Refer to [enum: eWeaponHash]
304
320
  * @param p2
305
- * @returns
321
+ * @returns clipInventoryUid
306
322
  */
307
- getMaxAmmoInClip(weaponHash, p2) {
308
- return inv('0xA38DCFFCEA8962FA', this.ped.handle, weaponHash, p2, rai());
323
+ refillAmmoInClip(p2) {
324
+ const result = inv('0xDF4A3404D022ADDE', this.ped.handle, pvi(), p2);
325
+ return [result[0], result[1]];
309
326
  }
310
327
  /**
311
- * @param attachPoint Refer to [enum: eWeaponAttachPoint]
312
- * @returns Returns the weapon entity
328
+ * _SET_A* - _SET_B*
329
+ *
330
+ * @param p1
313
331
  */
314
- getCurrentPedWeaponEntityIndex(attachPoint) {
315
- return createFromHandle('Entity', inv('0x3B390A939AF0B5FC', this.ped.handle, attachPoint, rai()));
332
+ N_0x2EBF70E1D8C06683(p1) {
333
+ inv('0x2EBF70E1D8C06683', this.ped.handle, _h(p1));
316
334
  }
317
335
  /**
318
- * @param weaponHash Refer to [enum: eWeaponHash]
319
336
  * @param ammoHash Refer to [enum: eAmmoType]
320
337
  */
321
- enableAmmoTypeForPedWeapon(weaponHash, ammoHash) {
322
- inv('0x23FB9FACA28779C1', this.ped.handle, weaponHash, ammoHash);
338
+ disableAmmoTypeForPed(ammoHash) {
339
+ inv('0xAA5A52204E077883', this.ped.handle, ammoHash);
323
340
  }
324
341
  /**
325
- * @param toggle
342
+ * Returns whether the ped has a shotgun p1: 0 or 1
343
+ *
344
+ * @param p1
345
+ * @returns
326
346
  */
327
- N_0x431240A58484D5D0(toggle) {
328
- inv('0x431240A58484D5D0', this.ped.handle, toggle);
347
+ doesPedHaveShotgun(p1) {
348
+ return inv('0xABC18A28BAD4B46F', this.ped.handle, p1);
349
+ }
350
+ clearPedLastWeaponDamage() {
351
+ inv('0x087D8F4BC65F68E4', this.ped.handle);
329
352
  }
330
353
  /**
331
- * @param p2
332
- * @param p3
333
- * @returns outGUID
354
+ * Returns true if ped is on a horse while inside of a town
355
+ * Params: p1 = 0
356
+ * GET_L* - GET_MA*
357
+ *
358
+ * @param p1
359
+ * @returns
334
360
  */
335
- getBestPedShortarmGuid(p2, p3) {
336
- const result = inv('0xF52BD94B47CCF736', this.ped.handle, pvi(), p2, p3);
337
- return result;
361
+ N_0x5A695BD328586B44(p1) {
362
+ return inv('0x5A695BD328586B44', this.ped.handle, p1);
338
363
  }
339
364
  /**
340
- * @returns coords
365
+ * @param weaponHash Refer to [enum: eWeaponHash]
366
+ * @param amount
367
+ * @param removeReason Refer to [enum: eRemoveItemReason]
341
368
  */
342
- getPedLastWeaponImpactCoord() {
343
- const result = inv('0x6C4D0409BA1A2BC2', this.ped.handle, pvv(), rai());
344
- return [!!result[0], Vector3.fromArray(result[1])];
369
+ removeAmmoFromPed(weaponHash, amount, removeReason) {
370
+ inv('0xF4823C813CB8277D', this.ped.handle, weaponHash, amount, removeReason);
345
371
  }
346
372
  /**
347
- * Returns WeaponAttachPoint
373
+ * @param p1
374
+ * @param p2
375
+ */
376
+ setPedAmmoToDrop(p1, p2) {
377
+ inv('0xA4EFEF9440A5B0EF', this.ped.handle, p1, p2);
378
+ }
379
+ /**
380
+ * Returns the current ammo type of the specified ped's specified weapon.
348
381
  *
349
- * @param attachPoint Refer to [enum: eWeaponAttachPoint]
382
+ * @param weaponHash Refer to [enum: eWeaponHash]
350
383
  * @returns
351
384
  */
352
- getWeaponAttachPoint(attachPoint) {
353
- return inv('0xCAD4FE9398820D24', this.ped.handle, attachPoint, rai());
385
+ getPedAmmoTypeFromWeapon(weaponHash) {
386
+ return (inv('0x7FEAD38B326B9F74', this.ped.handle, weaponHash, rai())) & 0xFFFFFFFF;
354
387
  }
355
388
  /**
356
- * @param p2
357
- * @param attachPoint Refer to [enum: eWeaponAttachPoint]
358
- * @param p4
359
- * @returns weaponHash: Refer to [enum: eWeaponHash]
389
+ * @param weaponHash Refer to [enum: eWeaponHash]
390
+ * @returns ammo
360
391
  */
361
- getCurrentPedWeapon(p2, attachPoint, p4) {
362
- const result = inv('0x3A87E44BB9A01D54', this.ped.handle, pvi(), p2, attachPoint, p4, rai());
392
+ getMaxAmmo(weaponHash) {
393
+ const result = inv('0xDC16122C7A20C933', this.ped.handle, pvi(), weaponHash, rai());
363
394
  return [!!result[0], result[1]];
364
395
  }
365
396
  /**
366
- * Returns whether the ped has a revolver p1: 0 or 1
367
- *
368
- * @param p1
369
- * @returns
397
+ * @param weaponHash Refer to [enum: eWeaponHash]
370
398
  */
371
- doesPedHaveRevolver(p1) {
372
- return inv('0x5B235F24472F2C3B', this.ped.handle, p1);
399
+ enableAmmoTypeForPed(weaponHash) {
400
+ inv('0x3B7B7908B7ADFB4B', this.ped.handle, weaponHash);
373
401
  }
374
402
  /**
375
- * Returns emote Hash
403
+ * Detaches the weapon from the ped and actually removes the ped's weapon
376
404
  *
405
+ * @param p1
377
406
  * @returns
378
407
  */
379
- getPedGunSpinningEquippedKitEmoteTwirl() {
380
- return (inv('0x2C4FEC3D0EFA9FC0', this.ped.handle, rai())) & 0xFFFFFFFF;
408
+ getWeaponObjectFromPed(p1) {
409
+ return createFromHandle('Prop', inv('0xC6A6789BB405D11C', this.ped.handle, p1, rai()));
381
410
  }
382
411
  /**
383
- * @param toggle
412
+ * @returns
384
413
  */
385
- N_0x16D9841A85FA627E(toggle) {
386
- inv('0x16D9841A85FA627E', this.ped.handle, toggle);
414
+ isPedCurrentWeaponHolstered() {
415
+ return inv('0xBDD9C235D8D1052E', this.ped.handle);
387
416
  }
388
417
  /**
389
- * @param weaponHash Refer to [enum: eWeaponHash]
390
- * @param offset
391
- * @param ammoCount
418
+ * @param toggle
392
419
  */
393
- setPedDropsInventoryWeapon(weaponHash, offset, ammoCount) {
394
- inv('0x208A1888007FC0E6', this.ped.handle, weaponHash, f(offset.x), f(offset.y), f(offset.z), ammoCount);
420
+ setInstantlyEquipWeaponPickups(toggle) {
421
+ inv('0x739B9C6D0E7F7F93', this.ped.handle, toggle);
395
422
  }
396
423
  /**
397
- * spinHash can be -1, 0 to disable
424
+ * Hides the ped's weapon during a cutscene.
398
425
  *
399
- * @param weaponEmoteTrickType
400
- * @param spin
426
+ * @param toggle
401
427
  */
402
- setActiveGunSpinningKitEmoteTwirl(weaponEmoteTrickType, spin) {
403
- inv('0x01F661BB9C71B465', this.ped.handle, weaponEmoteTrickType, _h(spin));
428
+ hidePedWeaponForScriptedCutscene(toggle) {
429
+ inv('0x6F6981D2253C208F', this.ped.handle, toggle);
404
430
  }
405
431
  /**
406
- * Appears to just send specified weapon to your horse holster without having to be close
407
- * However, the weapon is not visible on the horse holster, but you can reach the weapon on the weapon wheel
408
- *
409
- * @param weaponHash Refer to [enum: eWeaponHash]
432
+ * @returns guidPrimary; guidSecondary
410
433
  */
411
- sendWeaponToInventory(weaponHash) {
412
- inv('0xE9BD19F8121ADE3E', this.ped.handle, weaponHash);
434
+ setPlayerPedQuickSwapWeaponByGuid() {
435
+ const result = inv('0xEC1F85DA51D3D6C4', this.ped.handle, pvi(), pvi());
436
+ return [result[0], result[1]];
413
437
  }
414
438
  /**
415
- * If near your horse when called, weapons stored on your horse will be considered
416
- * Returns weaponHash
417
- *
418
- * @param weaponGroup
419
- * @param p2
420
- * @param p3
421
- * @returns
439
+ * @returns Returns the total ammo in the ped weapon from it's guid, or `0`.; guid
422
440
  */
423
- getBestPedWeaponInGroup(weaponGroup, p2, p3) {
424
- return (inv('0x9F67929D98E7C6E8', this.ped.handle, _h(weaponGroup), p2, p3, rai())) & 0xFFFFFFFF;
441
+ getAmmoInPedWeaponFromGuid() {
442
+ const result = inv('0x4823F13A21F51964', this.ped.handle, pvi(), rai());
443
+ return [result[0], result[1]];
425
444
  }
426
445
  /**
427
- * Only used in R* SP Scripts native_son2, native_son3 and smuggler2
428
- * Params: p2 = -1
429
- *
430
446
  * @param p1
431
447
  * @param p2
432
448
  */
433
- N_0x8A779706DA5CA3DD(p1, p2) {
434
- inv('0x8A779706DA5CA3DD', this.ped.handle, p1, p2);
449
+ removeAllPedWeapons(p1, p2) {
450
+ inv('0xF25DF915FA38C5F3', this.ped.handle, p1, p2);
435
451
  }
436
452
  /**
437
- * @param weaponHash Refer to [enum: eWeaponHash]
438
- * @param ammoHash Refer to [enum: eAmmoType]
453
+ * Returns ammoHash from weaponObject (Returned by 0x6CA484C9A7377E4F)
454
+ *
455
+ * @param weaponObject
456
+ * @returns
439
457
  */
440
- disableAmmoTypeForPedWeapon(weaponHash, ammoHash) {
441
- inv('0xF0D728EEA3C99775', this.ped.handle, weaponHash, ammoHash);
458
+ getCurrentPedWeaponAmmoType(weaponObject) {
459
+ return (inv('0x7E7B19A4355FEE13', this.ped.handle, weaponObject.handle, rai())) & 0xFFFFFFFF;
442
460
  }
443
461
  /**
444
- * @returns data; outData
462
+ * @param p1
463
+ * @param p2
464
+ * @param p3
465
+ * @returns
445
466
  */
446
- giveWeaponToPedWithOptions() {
447
- const result = inv('0xBE7E42B07FD317AC', this.ped.handle, pvi(), pvi(), rai());
448
- return [!!result[0], result[1], result[2]];
467
+ getPedWorstWeapon(p1, p2, p3) {
468
+ return (inv('0xDA37A053C1522F5D', this.ped.handle, p1, p2, p3, rai())) & 0xFFFFFFFF;
449
469
  }
450
470
  /**
451
- * @returns
471
+ * @param toggle
452
472
  */
453
- getMaxLockonDistanceOfCurrentPedWeapon() {
454
- return inv('0x79B1A6E780266DB0', this.ped.handle, raf());
473
+ setPedDropsWeaponsWhenDead(toggle) {
474
+ inv('0x476AE72C1D19D1A8', this.ped.handle, toggle);
455
475
  }
456
476
  /**
457
- * @param ammoHash Refer to [enum: eAmmoType]
477
+ * Returns ammoHash
478
+ *
479
+ * @returns Returns the [enum: eAmmoType]; weaponGuid
458
480
  */
459
- disableAmmoTypeForPed(ammoHash) {
460
- inv('0xAA5A52204E077883', this.ped.handle, ammoHash);
481
+ getCurrentAmmoTypeFromGuid() {
482
+ const result = inv('0xAF9D167A5656D6A6', this.ped.handle, pvi(), rai());
483
+ return [result[0] & 0xFFFFFFFF, result[1]];
461
484
  }
462
485
  /**
463
- * @param visible
486
+ * @param toggle
464
487
  */
465
- setPedAllWeaponsVisibility(visible) {
466
- inv('0x4F806A6CFED89468', this.ped.handle, visible);
488
+ setPedInfiniteAmmoClip(toggle) {
489
+ inv('0xFBAA1E06B6BCA741', this.ped.handle, toggle);
490
+ }
491
+ /**
492
+ * returns the amount of peds that were restrained with the weapon thrown bolas
493
+ *
494
+ * @returns
495
+ */
496
+ getNumPedsRestrainedFromWeaponBolas() {
497
+ return inv('0x46D42883E873C1D7', this.ped.handle);
498
+ }
499
+ /**
500
+ * emote hashes: KIT_EMOTE_TWIRL_GUN, KIT_EMOTE_TWIRL_GUN_LEFT_HOLSTER, KIT_EMOTE_TWIRL_GUN_DUAL, 0 (to unequip)
501
+ *
502
+ * @param emote
503
+ */
504
+ setActiveGunSpinningEquipKitEmoteTwirl(emote) {
505
+ inv('0xCBCFFF805F1B4596', this.ped.handle, _h(emote));
506
+ }
507
+ /**
508
+ * Stores longarms to your horse on dismount
509
+ * Params: p2 = 0
510
+ * SET_[I - M]*
511
+ *
512
+ * @param storeLongarms
513
+ * @param p2
514
+ */
515
+ setInstantlyStoreLongarmsOnDismount(storeLongarms, p2) {
516
+ inv('0xB832F1A686B9B810', this.ped.handle, storeLongarms, p2);
517
+ }
518
+ /**
519
+ * @param removeReason Refer to [enum: eRemoveItemReason]
520
+ * @returns weaponGuid
521
+ */
522
+ removeWeaponFromPedByGuid(removeReason) {
523
+ const result = inv('0x51C3B71591811485', this.ped.handle, pvi(), removeReason);
524
+ return result;
467
525
  }
468
526
  /**
527
+ * attachPoint:
528
+ *
529
+ * @param weaponHash Refer to [enum: eWeaponHash]
530
+ * @param equipNow
531
+ * @param attachPoint Refer to [enum: eWeaponAttachPoint]
532
+ * @param p4
533
+ * @param p5
534
+ */
535
+ setCurrentPedWeapon(weaponHash, equipNow, attachPoint, p4, p5) {
536
+ inv('0xADF692B254977C0C', this.ped.handle, weaponHash, equipNow, attachPoint, p4, p5);
537
+ }
538
+ /**
539
+ * Equips a weapon from a weaponItem, similar to GIVE_WEAPON_TO_PED
540
+ *
541
+ * @param p2
542
+ * @param p3
543
+ * @param p4
544
+ * @param p5
545
+ * @returns weaponUid
546
+ */
547
+ setCurrentPedWeaponByGuid(p2, p3, p4, p5) {
548
+ const result = inv('0x12FB95FE3D579238', this.ped.handle, pvi(), p2, p3, p4, p5);
549
+ return result;
550
+ }
551
+ /**
552
+ * @param componentHash
469
553
  * @param weaponHash Refer to [enum: eWeaponHash]
470
- * @param ammo
471
554
  * @returns
472
555
  */
473
- setAmmoInClip(weaponHash, ammo) {
474
- return inv('0xDCD2A934D65CB497', this.ped.handle, weaponHash, ammo, rai());
556
+ hasPedGotWeaponComponent(componentHash, weaponHash) {
557
+ return inv('0xBBC67A6F965C688A', this.ped.handle, _h(componentHash), weaponHash);
475
558
  }
476
559
  /**
477
- * _GET_M* - _GET_PED_A*
560
+ * @param weaponHash Refer to [enum: eWeaponHash]
561
+ * @param amount The amount of ped to add to the ammo
562
+ * @param addReason Refer to [enum: eAddItemReason]
563
+ */
564
+ addAmmoToPed(weaponHash, amount, addReason) {
565
+ inv('0xB190BCA3F4042F95', this.ped.handle, weaponHash, amount, addReason);
566
+ }
567
+ /**
568
+ * @param ammoType
569
+ * @param amount
570
+ * @param addReason Refer to [enum: eAddItemReason]
571
+ */
572
+ addAmmoToPedByType(ammoType, amount, addReason) {
573
+ inv('0x106A811C6D3035F3', this.ped.handle, _h(ammoType), amount, addReason);
574
+ }
575
+ /**
576
+ * @param targetPed
577
+ * @returns
578
+ */
579
+ isTargetPedConstrainedByPedUsingBolas(targetPed) {
580
+ return inv('0x8D50F43298AB9545', this.ped.handle, targetPed.handle, rai());
581
+ }
582
+ /**
583
+ * @param p1
584
+ * @returns guidPrimary
585
+ */
586
+ getBestPedWeaponInInventory(p1) {
587
+ const result = inv('0x7B98500614C8E8B8', this.ped.handle, p1, pvi());
588
+ return [result[0], result[1]];
589
+ }
590
+ /**
591
+ * @param toggle
592
+ */
593
+ N_0xF08D8FEB455F2C8C(toggle) {
594
+ inv('0xF08D8FEB455F2C8C', this.ped.handle, toggle);
595
+ }
596
+ /**
597
+ * @returns ammo; inventoryUid
598
+ */
599
+ getAmmoInClipByInventoryUid() {
600
+ const result = inv('0x678F00858980F516', this.ped.handle, pvi(), pvi());
601
+ return [result[0], result[1], result[2]];
602
+ }
603
+ /**
604
+ * removeReason must be REMOVE_REASON_USED, REMOVE_REASON_GIVEN, REMOVE_REASON_DROPPED or REMOVE_REASON_DEBUG, unless amount is -1
605
+ *
606
+ * @param ammoHash Refer to [enum: eAmmoType]
607
+ * @param amount
608
+ * @param removeReason Refer to [enum: eRemoveItemReason]
609
+ */
610
+ removeAmmoFromPedByType(ammoHash, amount, removeReason) {
611
+ inv('0xB6CFEC32E3742779', this.ped.handle, ammoHash, amount, removeReason);
612
+ }
613
+ /**
614
+ * Holster the holded shoulder weapon. Precisions: 0 means with anim while 1 means direct holster
478
615
  *
616
+ * @param disableAnim
617
+ */
618
+ setPedWeaponOnBack(disableAnim) {
619
+ inv('0x4820A6939D7CEF28', this.ped.handle, disableAnim);
620
+ }
621
+ /**
622
+ * @param ammoType
623
+ * @param ammo
624
+ */
625
+ setPedAmmoByType(ammoType, ammo) {
626
+ inv('0x5FD1E1F011E76D7E', this.ped.handle, _h(ammoType), ammo);
627
+ }
628
+ /**
479
629
  * @param p1
480
630
  * @returns
481
631
  */
482
- getPedWeaponObject(p1) {
483
- return createFromHandle('Prop', inv('0x6CA484C9A7377E4F', this.ped.handle, p1, rai()));
632
+ getPedBackupWeapon(p1) {
633
+ return (inv('0xC71FE230A513C30F', this.ped.handle, p1, rai())) & 0xFFFFFFFF;
634
+ }
635
+ /**
636
+ * @param attachPoint Refer to [enum: eWeaponAttachPoint]
637
+ */
638
+ setForceCurrentWeaponIntoCockedState(attachPoint) {
639
+ inv('0x5230D3F6EE56CFE6', this.ped.handle, attachPoint);
484
640
  }
485
641
  /**
486
- * slotHash is usually just the weaponHash name, but WEAPON_* is replaced with SLOT_*
487
- *
488
- * @param slotHash
489
642
  * @returns
490
643
  */
491
- getPedWeaponInSlot(slotHash) {
492
- return (inv('0xDBC4B552B2AE9A83', this.ped.handle, _h(slotHash), rai())) & 0xFFFFFFFF;
644
+ enableWeaponRestore() {
645
+ return inv('0xC395355843BE134B', this.ped.handle);
493
646
  }
494
647
  /**
495
- * Outputs cached guids
648
+ * Returns whether the specified ped is holding a weapon with the given hash.
649
+ * only these weapons below return true
650
+ * 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
496
651
  *
497
- * @returns guidPrimary; guidSecondary
652
+ * @param weapon
653
+ * @returns
498
654
  */
499
- getPlayerPedQuickSwapWeaponByGuid() {
500
- const result = inv('0xB7E52A058B07C7E2', this.ped.handle, pvi(), pvi());
501
- return [result[0], result[1]];
655
+ isPedHoldingWeapon(weapon) {
656
+ return inv('0x07E1C35F0078C3F9', this.ped.handle, _h(weapon), rai());
502
657
  }
503
658
  /**
504
- * Returns true if the ped is currently holstering or unholstering a weapon
659
+ * _GET_D* - _GET_L*
505
660
  *
506
661
  * @returns
507
662
  */
508
- isWeaponHolsterStateChanging() {
509
- return inv('0x2387D6E9C6B478AA', this.ped.handle, rai());
663
+ N_0x0DE0944ECCB3DF5D() {
664
+ return inv('0x0DE0944ECCB3DF5D', this.ped.handle, rai());
510
665
  }
511
666
  /**
512
- * @param ammoHash Refer to [enum: eAmmoType]
667
+ * @param flags
513
668
  * @returns
514
669
  */
515
- N_0x44C8F4908F1B2622(ammoHash) {
516
- return inv('0x44C8F4908F1B2622', this.ped.handle, ammoHash, rai());
670
+ isPedArmed(flags) {
671
+ return inv('0xCB690F680A3EA971', this.ped.handle, flags);
517
672
  }
518
673
  /**
519
- * @param p2
520
- * @returns clipInventoryUid
674
+ * Returns whether the ped has a sniper p1: 0 or 1
675
+ *
676
+ * @param p1
677
+ * @returns
521
678
  */
522
- refillAmmoInClip(p2) {
523
- const result = inv('0xDF4A3404D022ADDE', this.ped.handle, pvi(), p2);
524
- return [result[0], result[1]];
679
+ doesPedHaveSniper(p1) {
680
+ return inv('0x80BB243789008A82', this.ped.handle, p1);
525
681
  }
526
682
  /**
527
- * _SET_A* - _SET_B*
683
+ * Returns the ped's default unarmed weapon hash as defined in CPedModelInfo (DefaultUnarmedWeapon).
684
+ * Falls back to WEAPON_UNARMED if the ped doesn't have a valid model info pointer, or 0 if the ped doesn't exist.
528
685
  *
529
- * @param p1
686
+ * @returns
530
687
  */
531
- N_0x2EBF70E1D8C06683(p1) {
532
- inv('0x2EBF70E1D8C06683', this.ped.handle, _h(p1));
688
+ getDefaultUnarmedWeaponHash() {
689
+ return (inv('0x08FF1099ED2E6E21', this.ped.handle, rai())) & 0xFFFFFFFF;
533
690
  }
534
691
  /**
692
+ * @param weaponHash Refer to [enum: eWeaponHash]
693
+ * @param p2
535
694
  * @returns
536
695
  */
537
- isPedWeaponReadyToShoot() {
538
- return inv('0xB80CA294F2F26749', this.ped.handle, rai());
696
+ getMaxAmmoInClip(weaponHash, p2) {
697
+ return inv('0xA38DCFFCEA8962FA', this.ped.handle, weaponHash, p2, rai());
698
+ }
699
+ /**
700
+ * @param attachPoint Refer to [enum: eWeaponAttachPoint]
701
+ * @returns Returns the weapon entity
702
+ */
703
+ getCurrentPedWeaponEntityIndex(attachPoint) {
704
+ return createFromHandle('Entity', inv('0x3B390A939AF0B5FC', this.ped.handle, attachPoint, rai()));
539
705
  }
540
706
  /**
541
707
  * @param ammoType
@@ -626,63 +792,93 @@ export class Weapon {
626
792
  inv('0x899A04AFCC725D04', this.ped.handle, _h(weaponCollection));
627
793
  }
628
794
  /**
629
- * @param toggle
795
+ * @returns
630
796
  */
631
- N_0xF08D8FEB455F2C8C(toggle) {
632
- inv('0xF08D8FEB455F2C8C', this.ped.handle, toggle);
797
+ isPedWeaponReadyToShoot() {
798
+ return inv('0xB80CA294F2F26749', this.ped.handle, rai());
633
799
  }
634
800
  /**
635
- * @returns ammo; inventoryUid
801
+ * @param componentHash
802
+ * @param weaponHash Refer to [enum: eWeaponHash]
636
803
  */
637
- getAmmoInClipByInventoryUid() {
638
- const result = inv('0x678F00858980F516', this.ped.handle, pvi(), pvi());
639
- return [result[0], result[1], result[2]];
804
+ removeWeaponComponentFromPed(componentHash, weaponHash) {
805
+ inv('0x19F70C4D80494FF8', this.ped.handle, _h(componentHash), weaponHash);
640
806
  }
641
807
  /**
642
- * removeReason must be REMOVE_REASON_USED, REMOVE_REASON_GIVEN, REMOVE_REASON_DROPPED or REMOVE_REASON_DEBUG, unless amount is -1
643
- *
644
- * @param ammoHash Refer to [enum: eAmmoType]
645
- * @param amount
646
- * @param removeReason Refer to [enum: eRemoveItemReason]
808
+ * @param visible
809
+ * @param deselectWeapon
810
+ * @param p3
811
+ * @param p4
647
812
  */
648
- removeAmmoFromPedByType(ammoHash, amount, removeReason) {
649
- inv('0xB6CFEC32E3742779', this.ped.handle, ammoHash, amount, removeReason);
813
+ setPedCurrentWeaponVisible(visible, deselectWeapon, p3, p4) {
814
+ inv('0x0725A4CCFDED9A70', this.ped.handle, visible, deselectWeapon, p3, p4);
650
815
  }
651
816
  /**
652
- * Holster the holded shoulder weapon. Precisions: 0 means with anim while 1 means direct holster
817
+ * Old name: _DROP_CURRENT_PED_WEAPON
653
818
  *
654
- * @param disableAnim
655
- */
656
- setPedWeaponOnBack(disableAnim) {
657
- inv('0x4820A6939D7CEF28', this.ped.handle, disableAnim);
819
+ * @param p1
820
+ * @param attachPoint Refer to [enum: eWeaponAttachPoint]
821
+ * @param p3
822
+ * @param p4
823
+ * @returns
824
+ */
825
+ makePedDropWeapon(p1, attachPoint, p3, p4) {
826
+ return createFromHandle('Entity', inv('0xCEF4C65DE502D367', this.ped.handle, p1, attachPoint, p3, p4, rai()));
827
+ }
828
+ removeAllPedAmmo() {
829
+ inv('0x1B83C0DEEBCBB214', this.ped.handle);
658
830
  }
659
831
  /**
660
- * @param ammoType
661
- * @param ammo
832
+ * @param allow
662
833
  */
663
- setPedAmmoByType(ammoType, ammo) {
664
- inv('0x5FD1E1F011E76D7E', this.ped.handle, _h(ammoType), ammo);
834
+ setAllowDualWield(allow) {
835
+ inv('0x83B8D50EB9446BBA', this.ped.handle, allow);
665
836
  }
666
837
  /**
667
- * @param p1
838
+ * Returns weaponEmoteVariation WEAPON_EMOTE_VARIATION_INVALID = -2,
839
+ * WEAPON_EMOTE_VARIATION_BASE,
840
+ * WEAPON_EMOTE_VARIATION_A,
841
+ * WEAPON_EMOTE_VARIATION_B,
842
+ * WEAPON_EMOTE_VARIATION_C,
843
+ * WEAPON_EMOTE_VARIATION_D,
844
+ * WEAPON_EMOTE_VARIATION_PREVIEW,
845
+ * WEAPON_EMOTE_NUM_VARIATIONS
846
+ *
847
+ * @param variation
668
848
  * @returns
669
849
  */
670
- getPedBackupWeapon(p1) {
671
- return (inv('0xC71FE230A513C30F', this.ped.handle, p1, rai())) & 0xFFFFFFFF;
850
+ getWeaponEmoteVariation(variation) {
851
+ return inv('0x86147D05FA831D3A', this.ped.handle, variation, rai());
672
852
  }
673
853
  /**
674
- * @param attachPoint Refer to [enum: eWeaponAttachPoint]
854
+ * @param weaponHash Refer to [enum: eWeaponHash]
855
+ * @returns
675
856
  */
676
- setForceCurrentWeaponIntoCockedState(attachPoint) {
677
- inv('0x5230D3F6EE56CFE6', this.ped.handle, attachPoint);
857
+ isPedCarryingWeapon(weaponHash) {
858
+ return inv('0xF29A186ED428B552', this.ped.handle, weaponHash);
678
859
  }
679
860
  /**
680
- * @param weaponHash Refer to [enum: eWeaponHash]
681
- * @returns ammo
861
+ * @returns
682
862
  */
683
- getAmmoInClip(weaponHash) {
684
- const result = inv('0x2E1202248937775C', this.ped.handle, pvi(), weaponHash, rai());
685
- return [!!result[0], result[1]];
863
+ refillAmmoInCurrentPedWeapon() {
864
+ return inv('0x0A2AB7B7ABC055F4', this.ped.handle);
865
+ }
866
+ /**
867
+ * Unequip current weapon and set current weapon to WEAPON_UNARMED.
868
+ * p0 usually 2 in R* scripts. Doesn't seem to have any effect if changed....
869
+ * immediately: if true it will instantly switch to unarmed
870
+ *
871
+ * @param p0
872
+ * @param immediately
873
+ */
874
+ hidePedWeapons(p0, immediately) {
875
+ inv('0xFCCC886EDE3C63EC', this.ped.handle, p0, immediately);
876
+ }
877
+ /**
878
+ * @returns
879
+ */
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
  }