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