@nativewrappers/redm-codegen 0.0.4 → 0.0.5

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