@nativewrappers/redm-codegen 0.0.4 → 0.0.6

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 +109 -109
  2. package/dist/classes/AnimScene.d.ts.map +1 -1
  3. package/dist/classes/AnimScene.js +158 -158
  4. package/dist/classes/BaseModel.d.ts +34 -34
  5. package/dist/classes/BaseModel.d.ts.map +1 -1
  6. package/dist/classes/BaseModel.js +53 -53
  7. package/dist/classes/BaseTask.d.ts +36 -36
  8. package/dist/classes/BaseTask.d.ts.map +1 -1
  9. package/dist/classes/BaseTask.js +44 -44
  10. package/dist/classes/Cam.d.ts +91 -91
  11. package/dist/classes/Cam.d.ts.map +1 -1
  12. package/dist/classes/Cam.js +124 -124
  13. package/dist/classes/Entity.d.ts +507 -502
  14. package/dist/classes/Entity.d.ts.map +1 -1
  15. package/dist/classes/Entity.js +723 -714
  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 +770 -770
  29. package/dist/classes/PedTask.d.ts.map +1 -1
  30. package/dist/classes/PedTask.js +985 -985
  31. package/dist/classes/PersChar.d.ts +11 -11
  32. package/dist/classes/PersChar.d.ts.map +1 -1
  33. package/dist/classes/PersChar.js +23 -23
  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 +12 -12
  37. package/dist/classes/Player.d.ts +237 -233
  38. package/dist/classes/Player.d.ts.map +1 -1
  39. package/dist/classes/Player.js +309 -303
  40. package/dist/classes/Prop.d.ts +126 -126
  41. package/dist/classes/Prop.d.ts.map +1 -1
  42. package/dist/classes/Prop.js +180 -180
  43. package/dist/classes/PropSet.d.ts +16 -16
  44. package/dist/classes/PropSet.d.ts.map +1 -1
  45. package/dist/classes/PropSet.js +22 -22
  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 +17 -17
  53. package/dist/classes/VehicleTask.d.ts.map +1 -1
  54. package/dist/classes/VehicleTask.js +24 -24
  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 +243 -243
  59. package/dist/classes/Weapon.d.ts.map +1 -1
  60. package/dist/classes/Weapon.js +339 -339
  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 +37 -37
  68. package/dist/namespaces/Animscene.d.ts.map +1 -1
  69. package/dist/namespaces/Animscene.js +51 -51
  70. package/dist/namespaces/Audio.d.ts +395 -395
  71. package/dist/namespaces/Audio.d.ts.map +1 -1
  72. package/dist/namespaces/Audio.js +530 -530
  73. package/dist/namespaces/Bounty.d.ts +23 -23
  74. package/dist/namespaces/Bounty.d.ts.map +1 -1
  75. package/dist/namespaces/Bounty.js +40 -40
  76. package/dist/namespaces/Brain.d.ts +15 -15
  77. package/dist/namespaces/Brain.d.ts.map +1 -1
  78. package/dist/namespaces/Brain.js +20 -20
  79. package/dist/namespaces/CamStatics.d.ts +483 -483
  80. package/dist/namespaces/CamStatics.d.ts.map +1 -1
  81. package/dist/namespaces/CamStatics.js +693 -693
  82. package/dist/namespaces/Clock.d.ts +51 -51
  83. package/dist/namespaces/Clock.d.ts.map +1 -1
  84. package/dist/namespaces/Clock.js +73 -73
  85. package/dist/namespaces/Collection.d.ts +6 -6
  86. package/dist/namespaces/Collection.d.ts.map +1 -1
  87. package/dist/namespaces/Collection.js +11 -11
  88. package/dist/namespaces/Compapp.js +1 -1
  89. package/dist/namespaces/Compendium.d.ts +58 -58
  90. package/dist/namespaces/Compendium.d.ts.map +1 -1
  91. package/dist/namespaces/Compendium.js +83 -83
  92. package/dist/namespaces/Crashlog.js +9 -9
  93. package/dist/namespaces/Crew.d.ts +9 -9
  94. package/dist/namespaces/Crew.d.ts.map +1 -1
  95. package/dist/namespaces/Crew.js +18 -18
  96. package/dist/namespaces/Databinding.d.ts +146 -146
  97. package/dist/namespaces/Databinding.d.ts.map +1 -1
  98. package/dist/namespaces/Databinding.js +218 -218
  99. package/dist/namespaces/Datafile.js +4 -4
  100. package/dist/namespaces/Decorator.d.ts +19 -19
  101. package/dist/namespaces/Decorator.d.ts.map +1 -1
  102. package/dist/namespaces/Decorator.js +34 -34
  103. package/dist/namespaces/Dlc.js +2 -2
  104. package/dist/namespaces/EntityStatics.d.ts +186 -186
  105. package/dist/namespaces/EntityStatics.d.ts.map +1 -1
  106. package/dist/namespaces/EntityStatics.js +249 -249
  107. package/dist/namespaces/Event.js +4 -4
  108. package/dist/namespaces/Fire.d.ts +89 -89
  109. package/dist/namespaces/Fire.d.ts.map +1 -1
  110. package/dist/namespaces/Fire.js +115 -115
  111. package/dist/namespaces/Flock.js +2 -2
  112. package/dist/namespaces/Gang.js +2 -2
  113. package/dist/namespaces/GoogleAnalytics.js +2 -2
  114. package/dist/namespaces/Graphics.d.ts +776 -776
  115. package/dist/namespaces/Graphics.d.ts.map +1 -1
  116. package/dist/namespaces/Graphics.js +1120 -1120
  117. package/dist/namespaces/Hud.d.ts +497 -497
  118. package/dist/namespaces/Hud.d.ts.map +1 -1
  119. package/dist/namespaces/Hud.js +748 -748
  120. package/dist/namespaces/Ik.js +1 -1
  121. package/dist/namespaces/Interaction.js +3 -3
  122. package/dist/namespaces/InteriorStatics.d.ts +40 -40
  123. package/dist/namespaces/InteriorStatics.d.ts.map +1 -1
  124. package/dist/namespaces/InteriorStatics.js +57 -57
  125. package/dist/namespaces/Inventory.d.ts +205 -205
  126. package/dist/namespaces/Inventory.d.ts.map +1 -1
  127. package/dist/namespaces/Inventory.js +340 -340
  128. package/dist/namespaces/Itemdatabase.d.ts +78 -78
  129. package/dist/namespaces/Itemdatabase.d.ts.map +1 -1
  130. package/dist/namespaces/Itemdatabase.js +109 -109
  131. package/dist/namespaces/Itemset.js +2 -2
  132. package/dist/namespaces/Law.d.ts +1 -1
  133. package/dist/namespaces/Law.d.ts.map +1 -1
  134. package/dist/namespaces/Law.js +19 -19
  135. package/dist/namespaces/Localization.js +1 -1
  136. package/dist/namespaces/Map.d.ts +156 -156
  137. package/dist/namespaces/Map.d.ts.map +1 -1
  138. package/dist/namespaces/Map.js +209 -209
  139. package/dist/namespaces/Minigame.d.ts +66 -66
  140. package/dist/namespaces/Minigame.d.ts.map +1 -1
  141. package/dist/namespaces/Minigame.js +111 -111
  142. package/dist/namespaces/Misc.d.ts +3 -3
  143. package/dist/namespaces/Misc.d.ts.map +1 -1
  144. package/dist/namespaces/Misc.js +35 -35
  145. package/dist/namespaces/Missiondata.js +1 -1
  146. package/dist/namespaces/Money.js +3 -3
  147. package/dist/namespaces/Netshopping.d.ts +58 -58
  148. package/dist/namespaces/Netshopping.d.ts.map +1 -1
  149. package/dist/namespaces/Netshopping.js +89 -89
  150. package/dist/namespaces/Network.d.ts +1199 -1199
  151. package/dist/namespaces/Network.d.ts.map +1 -1
  152. package/dist/namespaces/Network.js +1650 -1650
  153. package/dist/namespaces/Object.d.ts +262 -262
  154. package/dist/namespaces/Object.d.ts.map +1 -1
  155. package/dist/namespaces/Object.js +367 -367
  156. package/dist/namespaces/Pad.d.ts +102 -102
  157. package/dist/namespaces/Pad.d.ts.map +1 -1
  158. package/dist/namespaces/Pad.js +141 -141
  159. package/dist/namespaces/Pathfind.js +10 -10
  160. package/dist/namespaces/PedStatics.d.ts +2 -2
  161. package/dist/namespaces/PedStatics.d.ts.map +1 -1
  162. package/dist/namespaces/PedStatics.js +10 -10
  163. package/dist/namespaces/Perschar.d.ts +42 -42
  164. package/dist/namespaces/Perschar.d.ts.map +1 -1
  165. package/dist/namespaces/Perschar.js +59 -59
  166. package/dist/namespaces/Physics.d.ts +37 -37
  167. package/dist/namespaces/Physics.d.ts.map +1 -1
  168. package/dist/namespaces/Physics.js +54 -54
  169. package/dist/namespaces/PlayerStatics.d.ts +68 -68
  170. package/dist/namespaces/PlayerStatics.d.ts.map +1 -1
  171. package/dist/namespaces/PlayerStatics.js +104 -104
  172. package/dist/namespaces/Population.d.ts +86 -86
  173. package/dist/namespaces/Population.d.ts.map +1 -1
  174. package/dist/namespaces/Population.js +116 -116
  175. package/dist/namespaces/Posse.d.ts +48 -48
  176. package/dist/namespaces/Posse.d.ts.map +1 -1
  177. package/dist/namespaces/Posse.js +78 -78
  178. package/dist/namespaces/Propset.d.ts +59 -59
  179. package/dist/namespaces/Propset.d.ts.map +1 -1
  180. package/dist/namespaces/Propset.js +81 -81
  181. package/dist/namespaces/Replay.d.ts +1 -1
  182. package/dist/namespaces/Replay.d.ts.map +1 -1
  183. package/dist/namespaces/Replay.js +2 -2
  184. package/dist/namespaces/Scripts.d.ts +1 -1
  185. package/dist/namespaces/Scripts.d.ts.map +1 -1
  186. package/dist/namespaces/Scripts.js +12 -12
  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 +203 -203
  191. package/dist/namespaces/Stats.d.ts.map +1 -1
  192. package/dist/namespaces/Stats.js +294 -294
  193. package/dist/namespaces/Streaming.d.ts +128 -128
  194. package/dist/namespaces/Streaming.d.ts.map +1 -1
  195. package/dist/namespaces/Streaming.js +202 -202
  196. package/dist/namespaces/Task.d.ts +366 -366
  197. package/dist/namespaces/Task.d.ts.map +1 -1
  198. package/dist/namespaces/Task.js +517 -517
  199. package/dist/namespaces/Telemetry.d.ts +83 -83
  200. package/dist/namespaces/Telemetry.d.ts.map +1 -1
  201. package/dist/namespaces/Telemetry.js +111 -111
  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.js +1 -1
  208. package/dist/namespaces/Uistickyfeed.d.ts +16 -16
  209. package/dist/namespaces/Uistickyfeed.d.ts.map +1 -1
  210. package/dist/namespaces/Uistickyfeed.js +21 -21
  211. package/dist/namespaces/Unlock.js +5 -5
  212. package/dist/namespaces/VehicleStatics.js +12 -12
  213. package/dist/namespaces/Voice.js +7 -7
  214. package/dist/namespaces/VolumeStatics.d.ts +99 -99
  215. package/dist/namespaces/VolumeStatics.d.ts.map +1 -1
  216. package/dist/namespaces/VolumeStatics.js +137 -137
  217. package/dist/namespaces/Water.d.ts +27 -27
  218. package/dist/namespaces/Water.d.ts.map +1 -1
  219. package/dist/namespaces/Water.js +41 -41
  220. package/dist/namespaces/WeaponStatics.d.ts +206 -206
  221. package/dist/namespaces/WeaponStatics.d.ts.map +1 -1
  222. package/dist/namespaces/WeaponStatics.js +303 -303
  223. package/dist/types/NativeAliases.d.ts +3 -1
  224. package/dist/types/NativeAliases.d.ts.map +1 -1
  225. package/dist/types/NativeAliases.js +3 -1
  226. package/package.json +1 -1
  227. package/src/classes/AnimScene.ts +164 -164
  228. package/src/classes/BaseModel.ts +60 -60
  229. package/src/classes/BaseTask.ts +46 -46
  230. package/src/classes/Cam.ts +136 -136
  231. package/src/classes/Entity.ts +738 -727
  232. package/src/classes/Interior.ts +43 -43
  233. package/src/classes/ItemSet.ts +3 -3
  234. package/src/classes/Ped.ts +432 -432
  235. package/src/classes/PedModel.ts +2 -2
  236. package/src/classes/PedTask.ts +1023 -1023
  237. package/src/classes/PersChar.ts +28 -28
  238. package/src/classes/Pickup.ts +13 -13
  239. package/src/classes/Player.ts +326 -319
  240. package/src/classes/Prop.ts +185 -185
  241. package/src/classes/PropSet.ts +25 -25
  242. package/src/classes/Vehicle.ts +147 -147
  243. package/src/classes/VehicleModel.ts +2 -2
  244. package/src/classes/VehicleTask.ts +27 -27
  245. package/src/classes/Volume.ts +62 -62
  246. package/src/classes/Weapon.ts +358 -358
  247. package/src/namespaces/Aicoverpoint.ts +40 -40
  248. package/src/namespaces/Aitransport.ts +104 -104
  249. package/src/namespaces/Animscene.ts +55 -55
  250. package/src/namespaces/Audio.ts +565 -565
  251. package/src/namespaces/Bounty.ts +46 -46
  252. package/src/namespaces/Brain.ts +22 -22
  253. package/src/namespaces/CamStatics.ts +706 -706
  254. package/src/namespaces/Clock.ts +82 -82
  255. package/src/namespaces/Collection.ts +12 -12
  256. package/src/namespaces/Compapp.ts +1 -1
  257. package/src/namespaces/Compendium.ts +94 -94
  258. package/src/namespaces/Crashlog.ts +9 -9
  259. package/src/namespaces/Crew.ts +20 -20
  260. package/src/namespaces/Databinding.ts +222 -222
  261. package/src/namespaces/Datafile.ts +4 -4
  262. package/src/namespaces/Decorator.ts +37 -37
  263. package/src/namespaces/Dlc.ts +2 -2
  264. package/src/namespaces/EntityStatics.ts +259 -259
  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 +1081 -1081
  271. package/src/namespaces/Hud.ts +767 -767
  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 +352 -352
  276. package/src/namespaces/Itemdatabase.ts +121 -121
  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 +217 -217
  281. package/src/namespaces/Minigame.ts +119 -119
  282. package/src/namespaces/Misc.ts +38 -38
  283. package/src/namespaces/Missiondata.ts +1 -1
  284. package/src/namespaces/Money.ts +3 -3
  285. package/src/namespaces/Netshopping.ts +99 -99
  286. package/src/namespaces/Network.ts +1738 -1738
  287. package/src/namespaces/Object.ts +370 -370
  288. package/src/namespaces/Pad.ts +155 -155
  289. package/src/namespaces/Pathfind.ts +10 -10
  290. package/src/namespaces/PedStatics.ts +12 -12
  291. package/src/namespaces/Perschar.ts +67 -67
  292. package/src/namespaces/Physics.ts +62 -62
  293. package/src/namespaces/PlayerStatics.ts +112 -112
  294. package/src/namespaces/Population.ts +131 -131
  295. package/src/namespaces/Posse.ts +81 -81
  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/Socialclub.ts +8 -8
  300. package/src/namespaces/Socialclubfeed.ts +1 -1
  301. package/src/namespaces/Spactionproxy.ts +4 -4
  302. package/src/namespaces/Stats.ts +296 -296
  303. package/src/namespaces/Streaming.ts +236 -236
  304. package/src/namespaces/Task.ts +583 -583
  305. package/src/namespaces/Telemetry.ts +125 -125
  306. package/src/namespaces/Txd.ts +1 -1
  307. package/src/namespaces/Uiapps.ts +43 -43
  308. package/src/namespaces/Uievents.ts +1 -1
  309. package/src/namespaces/Uifeed.ts +1 -1
  310. package/src/namespaces/Uistickyfeed.ts +23 -23
  311. package/src/namespaces/Unlock.ts +5 -5
  312. package/src/namespaces/VehicleStatics.ts +12 -12
  313. package/src/namespaces/Voice.ts +7 -7
  314. package/src/namespaces/VolumeStatics.ts +143 -143
  315. package/src/namespaces/Water.ts +47 -47
  316. package/src/namespaces/WeaponStatics.ts +311 -311
  317. package/src/types/NativeAliases.ts +6 -1
@@ -19,132 +19,6 @@ export class Weapon {
19
19
  this.ped = ped;
20
20
  }
21
21
 
22
- /**
23
- * @param weaponHash Refer to [enum: eWeaponHash]
24
- * @param ammoHash Refer to [enum: eAmmoType]
25
- */
26
- enableAmmoTypeForPedWeapon(weaponHash: eWeaponHash, ammoHash: eAmmoType): void {
27
- inv<void>('0x23FB9FACA28779C1', this.ped.handle, weaponHash, ammoHash);
28
- }
29
-
30
- /**
31
- * @param toggle
32
- */
33
- N_0x431240A58484D5D0(toggle: boolean): void {
34
- inv<void>('0x431240A58484D5D0', this.ped.handle, toggle);
35
- }
36
-
37
- /**
38
- * @param p2
39
- * @param p3
40
- * @returns outGUID
41
- */
42
- getBestPedShortarmGuid(p2: boolean, p3: boolean): number {
43
- const result = inv<number>('0xF52BD94B47CCF736', this.ped.handle, pvi(), p2, p3);
44
- return result;
45
- }
46
-
47
- /**
48
- * @returns coords
49
- */
50
- getPedLastWeaponImpactCoord(): [boolean, Vector3] {
51
- const result = inv<[boolean, number[]]>('0x6C4D0409BA1A2BC2', this.ped.handle, pvv(), rai());
52
- return [!!result[0], Vector3.fromArray(result[1])];
53
- }
54
-
55
- /**
56
- * Returns WeaponAttachPoint
57
- *
58
- * @param attachPoint Refer to [enum: eWeaponAttachPoint]
59
- * @returns
60
- */
61
- getWeaponAttachPoint(attachPoint: number): number {
62
- return inv<number>('0xCAD4FE9398820D24', this.ped.handle, attachPoint, rai());
63
- }
64
-
65
- /**
66
- * @param p2
67
- * @param attachPoint Refer to [enum: eWeaponAttachPoint]
68
- * @param p4
69
- * @returns weaponHash: Refer to [enum: eWeaponHash]
70
- */
71
- getCurrentPedWeapon(p2: boolean, attachPoint: number, p4: boolean): [boolean, number] {
72
- const result = inv<[boolean, number]>('0x3A87E44BB9A01D54', this.ped.handle, pvi(), p2, attachPoint, p4, rai());
73
- return [!!result[0], result[1]];
74
- }
75
-
76
- /**
77
- * Returns whether the ped has a revolver p1: 0 or 1
78
- *
79
- * @param p1
80
- * @returns
81
- */
82
- doesPedHaveRevolver(p1: number): any {
83
- return inv<number>('0x5B235F24472F2C3B', this.ped.handle, p1);
84
- }
85
-
86
- /**
87
- * Returns emote Hash
88
- *
89
- * @returns
90
- */
91
- getPedGunSpinningEquippedKitEmoteTwirl(): number {
92
- return (inv<number>('0x2C4FEC3D0EFA9FC0', this.ped.handle, rai())) & 0xFFFFFFFF;
93
- }
94
-
95
- /**
96
- * Returns ammoHash from weaponObject (Returned by 0x6CA484C9A7377E4F)
97
- *
98
- * @param weaponObject
99
- * @returns
100
- */
101
- getCurrentPedWeaponAmmoType(weaponObject: Prop): number {
102
- return (inv<number>('0x7E7B19A4355FEE13', this.ped.handle, weaponObject.handle, rai())) & 0xFFFFFFFF;
103
- }
104
-
105
- /**
106
- * @param p1
107
- * @param p2
108
- * @param p3
109
- * @returns
110
- */
111
- getPedWorstWeapon(p1: boolean, p2: boolean, p3: boolean): number {
112
- return (inv<number>('0xDA37A053C1522F5D', this.ped.handle, p1, p2, p3, rai())) & 0xFFFFFFFF;
113
- }
114
-
115
- /**
116
- * @param toggle
117
- */
118
- setPedDropsWeaponsWhenDead(toggle: boolean): void {
119
- inv<void>('0x476AE72C1D19D1A8', this.ped.handle, toggle);
120
- }
121
-
122
- /**
123
- * Returns ammoHash
124
- *
125
- * @returns Returns the [enum: eAmmoType]; weaponGuid
126
- */
127
- getCurrentAmmoTypeFromGuid(): [number, number] {
128
- const result = inv<[number, number]>('0xAF9D167A5656D6A6', this.ped.handle, pvi(), rai());
129
- return [result[0] & 0xFFFFFFFF, result[1]];
130
- }
131
-
132
- /**
133
- * @param toggle
134
- */
135
- setPedInfiniteAmmoClip(toggle: boolean): void {
136
- inv<void>('0xFBAA1E06B6BCA741', this.ped.handle, toggle);
137
- }
138
-
139
- /**
140
- * returns the amount of peds that were restrained with the weapon thrown bolas
141
- *
142
- * @returns
143
- */
144
- getNumPedsRestrainedFromWeaponBolas(): any {
145
- return inv<number>('0x46D42883E873C1D7', this.ped.handle);
146
- }
147
-
148
22
  /**
149
23
  * Stores longarms to your horse on dismount
150
24
  * Params: p2 = 0
@@ -225,7 +99,7 @@ export class Weapon {
225
99
  * @returns
226
100
  */
227
101
  isTargetPedConstrainedByPedUsingBolas(targetPed: Ped): boolean {
228
- return inv<boolean>('0x8D50F43298AB9545', this.ped.handle, targetPed.handle, rai());
102
+ return !!inv<boolean>('0x8D50F43298AB9545', this.ped.handle, targetPed.handle, rai());
229
103
  }
230
104
 
231
105
  /**
@@ -237,68 +111,85 @@ export class Weapon {
237
111
  return [result[0], result[1]];
238
112
  }
239
113
 
114
+ /**
115
+ * @param visible
116
+ */
117
+ set PedAllWeaponsVisibility(visible: boolean) {
118
+ inv<void>('0x4F806A6CFED89468', this.ped.handle, visible);
119
+ }
120
+
240
121
  /**
241
122
  * @param weaponHash Refer to [enum: eWeaponHash]
123
+ * @param ammo
124
+ * @returns
242
125
  */
243
- enableAmmoTypeForPed(weaponHash: eWeaponHash): void {
244
- inv<void>('0x3B7B7908B7ADFB4B', this.ped.handle, weaponHash);
126
+ setAmmoInClip(weaponHash: eWeaponHash, ammo: number): boolean {
127
+ return !!inv<boolean>('0xDCD2A934D65CB497', this.ped.handle, weaponHash, ammo, rai());
245
128
  }
246
129
 
247
130
  /**
248
- * Detaches the weapon from the ped and actually removes the ped's weapon
131
+ * _GET_M* - _GET_PED_A*
249
132
  *
250
133
  * @param p1
251
134
  * @returns
252
135
  */
253
- getWeaponObjectFromPed(p1: boolean): Prop | null {
254
- return createFromHandle<Prop>('Prop', inv<number>('0xC6A6789BB405D11C', this.ped.handle, p1, rai()));
136
+ getPedWeaponObject(p1: boolean): Prop | null {
137
+ return createFromHandle<Prop>('Prop', inv<number>('0x6CA484C9A7377E4F', this.ped.handle, p1, rai()));
255
138
  }
256
139
 
257
140
  /**
141
+ * slotHash is usually just the weaponHash name, but WEAPON_* is replaced with SLOT_*
142
+ *
143
+ * @param slotHash
258
144
  * @returns
259
145
  */
260
- isPedCurrentWeaponHolstered(): any {
261
- return inv<number>('0xBDD9C235D8D1052E', this.ped.handle);
146
+ getPedWeaponInSlot(slotHash: string | number): number {
147
+ return (inv<number>('0xDBC4B552B2AE9A83', this.ped.handle, _h(slotHash), rai())) & 0xFFFFFFFF;
262
148
  }
263
149
 
264
150
  /**
265
- * @param toggle
151
+ * Outputs cached guids
152
+ *
153
+ * @returns guidPrimary; guidSecondary
266
154
  */
267
- setInstantlyEquipWeaponPickups(toggle: boolean): void {
268
- inv<void>('0x739B9C6D0E7F7F93', this.ped.handle, toggle);
155
+ get PlayerPedQuickSwapWeaponByGuid(): [number, number] {
156
+ const result = inv<[number, number]>('0xB7E52A058B07C7E2', this.ped.handle, pvi(), pvi());
157
+ return [result[0], result[1]];
269
158
  }
270
159
 
271
160
  /**
272
- * Hides the ped's weapon during a cutscene.
161
+ * Returns true if the ped is currently holstering or unholstering a weapon
273
162
  *
274
- * @param toggle
163
+ * @returns
275
164
  */
276
- hidePedWeaponForScriptedCutscene(toggle: boolean): void {
277
- inv<void>('0x6F6981D2253C208F', this.ped.handle, toggle);
165
+ get IsWeaponHolsterStateChanging(): boolean {
166
+ return !!inv<boolean>('0x2387D6E9C6B478AA', this.ped.handle, rai());
278
167
  }
279
168
 
280
169
  /**
281
- * @returns guidPrimary; guidSecondary
170
+ * @param ammoHash Refer to [enum: eAmmoType]
171
+ * @returns
282
172
  */
283
- setPlayerPedQuickSwapWeaponByGuid(): [number, number] {
284
- const result = inv<[number, number]>('0xEC1F85DA51D3D6C4', this.ped.handle, pvi(), pvi());
285
- return [result[0], result[1]];
173
+ N_0x44C8F4908F1B2622(ammoHash: eAmmoType): boolean {
174
+ return !!inv<boolean>('0x44C8F4908F1B2622', this.ped.handle, ammoHash, rai());
286
175
  }
287
176
 
288
177
  /**
289
- * @returns Returns the total ammo in the ped weapon from it's guid, or `0`.; guid
178
+ * @param p2
179
+ * @returns clipInventoryUid
290
180
  */
291
- getAmmoInPedWeaponFromGuid(): [number, number] {
292
- const result = inv<[number, number]>('0x4823F13A21F51964', this.ped.handle, pvi(), rai());
181
+ refillAmmoInClip(p2: number): [any, number] {
182
+ const result = inv<[number, number]>('0xDF4A3404D022ADDE', this.ped.handle, pvi(), p2);
293
183
  return [result[0], result[1]];
294
184
  }
295
185
 
296
186
  /**
187
+ * _SET_A* - _SET_B*
188
+ *
297
189
  * @param p1
298
- * @param p2
299
190
  */
300
- removeAllPedWeapons(p1: boolean, p2: boolean): void {
301
- inv<void>('0xF25DF915FA38C5F3', this.ped.handle, p1, p2);
191
+ N_0x2EBF70E1D8C06683(p1: string | number): void {
192
+ inv<void>('0x2EBF70E1D8C06683', this.ped.handle, _h(p1));
302
193
  }
303
194
 
304
195
  /**
@@ -370,15 +261,6 @@ export class Weapon {
370
261
  return [!!result[0], result[1]];
371
262
  }
372
263
 
373
- /**
374
- * emote hashes: KIT_EMOTE_TWIRL_GUN, KIT_EMOTE_TWIRL_GUN_LEFT_HOLSTER, KIT_EMOTE_TWIRL_GUN_DUAL, 0 (to unequip)
375
- *
376
- * @param emote
377
- */
378
- setActiveGunSpinningEquipKitEmoteTwirl(emote: string | number): void {
379
- inv<void>('0xCBCFFF805F1B4596', this.ped.handle, _h(emote));
380
- }
381
-
382
264
  /**
383
265
  * @returns
384
266
  */
@@ -395,7 +277,7 @@ export class Weapon {
395
277
  * @returns
396
278
  */
397
279
  isPedHoldingWeapon(weapon: string | number): boolean {
398
- return inv<boolean>('0x07E1C35F0078C3F9', this.ped.handle, _h(weapon), rai());
280
+ return !!inv<boolean>('0x07E1C35F0078C3F9', this.ped.handle, _h(weapon), rai());
399
281
  }
400
282
 
401
283
  /**
@@ -404,15 +286,15 @@ export class Weapon {
404
286
  * @returns
405
287
  */
406
288
  N_0x0DE0944ECCB3DF5D(): boolean {
407
- return inv<boolean>('0x0DE0944ECCB3DF5D', this.ped.handle, rai());
289
+ return !!inv<boolean>('0x0DE0944ECCB3DF5D', this.ped.handle, rai());
408
290
  }
409
291
 
410
292
  /**
411
293
  * @param flags
412
294
  * @returns
413
295
  */
414
- isPedArmed(flags: number): any {
415
- return inv<number>('0xCB690F680A3EA971', this.ped.handle, flags);
296
+ isPedArmed(flags: number): boolean {
297
+ return !!inv<boolean>('0xCB690F680A3EA971', this.ped.handle, flags, rai());
416
298
  }
417
299
 
418
300
  /**
@@ -431,7 +313,7 @@ export class Weapon {
431
313
  *
432
314
  * @returns
433
315
  */
434
- getDefaultUnarmedWeaponHash(): number {
316
+ get DefaultUnarmedWeaponHash(): number {
435
317
  return (inv<number>('0x08FF1099ED2E6E21', this.ped.handle, rai())) & 0xFFFFFFFF;
436
318
  }
437
319
 
@@ -453,96 +335,139 @@ export class Weapon {
453
335
  }
454
336
 
455
337
  /**
338
+ * @param weaponHash Refer to [enum: eWeaponHash]
339
+ */
340
+ enableAmmoTypeForPed(weaponHash: eWeaponHash): void {
341
+ inv<void>('0x3B7B7908B7ADFB4B', this.ped.handle, weaponHash);
342
+ }
343
+
344
+ /**
345
+ * Detaches the weapon from the ped and actually removes the ped's weapon
346
+ *
347
+ * @param p1
456
348
  * @returns
457
349
  */
458
- isPedWeaponReadyToShoot(): boolean {
459
- return inv<boolean>('0xB80CA294F2F26749', this.ped.handle, rai());
350
+ getWeaponObjectFromPed(p1: boolean): Prop | null {
351
+ return createFromHandle<Prop>('Prop', inv<number>('0xC6A6789BB405D11C', this.ped.handle, p1, rai()));
460
352
  }
461
353
 
462
354
  /**
463
- * @param componentHash
464
- * @param weaponHash Refer to [enum: eWeaponHash]
355
+ * @returns
465
356
  */
466
- removeWeaponComponentFromPed(componentHash: string | number, weaponHash: eWeaponHash): void {
467
- inv<void>('0x19F70C4D80494FF8', this.ped.handle, _h(componentHash), weaponHash);
357
+ get IsPedCurrentWeaponHolstered(): any {
358
+ return inv<number>('0xBDD9C235D8D1052E', this.ped.handle);
468
359
  }
469
360
 
470
361
  /**
471
- * @param visible
472
- * @param deselectWeapon
473
- * @param p3
474
- * @param p4
362
+ * @param toggle
475
363
  */
476
- setPedCurrentWeaponVisible(visible: boolean, deselectWeapon: boolean, p3: boolean, p4: boolean): void {
477
- inv<void>('0x0725A4CCFDED9A70', this.ped.handle, visible, deselectWeapon, p3, p4);
364
+ set InstantlyEquipWeaponPickups(toggle: boolean) {
365
+ inv<void>('0x739B9C6D0E7F7F93', this.ped.handle, toggle);
478
366
  }
479
367
 
480
368
  /**
481
- * Old name: _DROP_CURRENT_PED_WEAPON
369
+ * Hides the ped's weapon during a cutscene.
482
370
  *
483
- * @param p1
484
- * @param attachPoint Refer to [enum: eWeaponAttachPoint]
485
- * @param p3
486
- * @param p4
487
- * @returns
371
+ * @param toggle
488
372
  */
489
- makePedDropWeapon(p1: boolean, attachPoint: number, p3: boolean, p4: boolean): Entity | null {
490
- return createFromHandle<Entity>('Entity', inv<number>('0xCEF4C65DE502D367', this.ped.handle, p1, attachPoint, p3, p4, rai()));
373
+ hidePedWeaponForScriptedCutscene(toggle: boolean): void {
374
+ inv<void>('0x6F6981D2253C208F', this.ped.handle, toggle);
491
375
  }
492
376
 
493
- removeAllPedAmmo(): void {
494
- inv<void>('0x1B83C0DEEBCBB214', this.ped.handle);
377
+ /**
378
+ * @returns guidPrimary; guidSecondary
379
+ */
380
+ setPlayerPedQuickSwapWeaponByGuid(): [number, number] {
381
+ const result = inv<[number, number]>('0xEC1F85DA51D3D6C4', this.ped.handle, pvi(), pvi());
382
+ return [result[0], result[1]];
495
383
  }
496
384
 
497
385
  /**
498
- * @param allow
386
+ * @returns Returns the total ammo in the ped weapon from it's guid, or `0`.; guid
499
387
  */
500
- setAllowDualWield(allow: boolean): void {
501
- inv<void>('0x83B8D50EB9446BBA', this.ped.handle, allow);
388
+ get AmmoInPedWeaponFromGuid(): [number, number] {
389
+ const result = inv<[number, number]>('0x4823F13A21F51964', this.ped.handle, pvi(), rai());
390
+ return [result[0], result[1]];
502
391
  }
503
392
 
504
393
  /**
505
- * Returns weaponEmoteVariation WEAPON_EMOTE_VARIATION_INVALID = -2,
506
- * WEAPON_EMOTE_VARIATION_BASE,
507
- * WEAPON_EMOTE_VARIATION_A,
508
- * WEAPON_EMOTE_VARIATION_B,
509
- * WEAPON_EMOTE_VARIATION_C,
510
- * WEAPON_EMOTE_VARIATION_D,
511
- * WEAPON_EMOTE_VARIATION_PREVIEW,
512
- * WEAPON_EMOTE_NUM_VARIATIONS
513
- *
514
- * @param variation
515
- * @returns
394
+ * @param p1
395
+ * @param p2
516
396
  */
517
- getWeaponEmoteVariation(variation: number): number {
518
- return inv<number>('0x86147D05FA831D3A', this.ped.handle, variation, rai());
397
+ removeAllPedWeapons(p1: boolean, p2: boolean): void {
398
+ inv<void>('0xF25DF915FA38C5F3', this.ped.handle, p1, p2);
519
399
  }
520
400
 
521
401
  /**
522
- * @param weaponHash Refer to [enum: eWeaponHash]
523
402
  * @returns
524
403
  */
525
- isPedCarryingWeapon(weaponHash: eWeaponHash): any {
526
- return inv<number>('0xF29A186ED428B552', this.ped.handle, weaponHash);
404
+ get AllowDualWield(): any {
405
+ return inv<number>('0x918990BD9CE08582', this.ped.handle);
527
406
  }
528
407
 
529
408
  /**
530
- * @returns
531
- */
532
- refillAmmoInCurrentPedWeapon(): any {
533
- return inv<number>('0x0A2AB7B7ABC055F4', this.ped.handle);
409
+ * Returns eCurrentHeldWeapon
410
+ * _GET_R* - _GET_T*
411
+ *
412
+ * @returns
413
+ */
414
+ get PedCurrentHeldWeapon(): number {
415
+ return (inv<number>('0x8425C5F057012DAB', this.ped.handle, rai())) & 0xFFFFFFFF;
534
416
  }
535
417
 
536
418
  /**
537
- * Unequip current weapon and set current weapon to WEAPON_UNARMED.
538
- * p0 usually 2 in R* scripts. Doesn't seem to have any effect if changed....
539
- * immediately: if true it will instantly switch to unarmed
419
+ * @param toggle
420
+ */
421
+ set ForceAutoEquip(toggle: boolean) {
422
+ inv<void>('0xBE711B14A159E84F', this.ped.handle, toggle);
423
+ }
424
+
425
+ /**
426
+ * @param weaponHash Refer to [enum: eWeaponHash]
427
+ * @param ammo
428
+ */
429
+ setPedAmmo(weaponHash: eWeaponHash, ammo: number): void {
430
+ inv<void>('0x14E56BC5B5DB6A19', this.ped.handle, weaponHash, ammo);
431
+ }
432
+
433
+ /**
434
+ * Gives the ped the weapon.
435
+ * 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
436
+ * 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
540
437
  *
541
- * @param p0
542
- * @param immediately
438
+ * @param weaponHash Refer to [enum: eWeaponHash]
439
+ * @param ammoCount
440
+ * @param bForceInHand
441
+ * @param bForceInHolster
442
+ * @param attachPoint Refer to [enum: eWeaponAttachPoint]
443
+ * @param bAllowMultipleCopies
444
+ * @param p7
445
+ * @param p8
446
+ * @param addReason Refer to [enum: eAddItemReason]
447
+ * @param bIgnoreUnlocks
448
+ * @param permanentDegradation
449
+ * @param p12
450
+ * @returns
543
451
  */
544
- hidePedWeapons(p0: number, immediately: boolean): void {
545
- inv<void>('0xFCCC886EDE3C63EC', this.ped.handle, p0, immediately);
452
+ giveWeaponToPed(weaponHash: eWeaponHash, ammoCount: number, bForceInHand: boolean, bForceInHolster: boolean, attachPoint: number, bAllowMultipleCopies: boolean, p7: number, p8: number, addReason: eAddItemReason, bIgnoreUnlocks: boolean, permanentDegradation: number, p12: boolean): number {
453
+ return (inv<number>('0x5E3BDDBCB83F3D84', this.ped.handle, weaponHash, ammoCount, bForceInHand, bForceInHolster, attachPoint, bAllowMultipleCopies, f(p7), f(p8), addReason, bIgnoreUnlocks, f(permanentDegradation), p12, rai())) & 0xFFFFFFFF;
454
+ }
455
+
456
+ /**
457
+ * @param weaponHash Refer to [enum: eWeaponHash]
458
+ * @returns
459
+ */
460
+ getAmmoInPedWeapon(weaponHash: eWeaponHash): number {
461
+ return inv<number>('0x015A522136D7F951', this.ped.handle, weaponHash, rai());
462
+ }
463
+
464
+ /**
465
+ * @param attachPoint Refer to [enum: eWeaponAttachPoint]
466
+ * @returns weaponGuid
467
+ */
468
+ getPedWeaponGuidAtAttachPoint(attachPoint: number): [any, number] {
469
+ const result = inv<[number, number]>('0x6929E22158E52265', this.ped.handle, attachPoint, pvi());
470
+ return [result[0], result[1]];
546
471
  }
547
472
 
548
473
  /**
@@ -633,167 +558,268 @@ export class Weapon {
633
558
  /**
634
559
  * @returns
635
560
  */
636
- getMaxLockonDistanceOfCurrentPedWeapon(): number {
561
+ get MaxLockonDistanceOfCurrentPedWeapon(): number {
637
562
  return inv<number>('0x79B1A6E780266DB0', this.ped.handle, raf());
638
563
  }
639
564
 
640
565
  /**
641
- * @param visible
566
+ * @param ammoType
567
+ * @returns
642
568
  */
643
- setPedAllWeaponsVisibility(visible: boolean): void {
644
- inv<void>('0x4F806A6CFED89468', this.ped.handle, visible);
569
+ getPedAmmoByType(ammoType: string | number): number {
570
+ return inv<number>('0x39D22031557946C1', this.ped.handle, _h(ammoType), rai());
571
+ }
572
+
573
+ /**
574
+ * @param p1
575
+ * @param p2
576
+ * @returns
577
+ */
578
+ getBestPedWeapon(p1: boolean, p2: boolean): number {
579
+ return (inv<number>('0x8483E98E8B888AE2', this.ped.handle, p1, p2, rai())) & 0xFFFFFFFF;
580
+ }
581
+
582
+ /**
583
+ * @param toggle
584
+ * @param weaponHash Refer to [enum: eWeaponHash]
585
+ */
586
+ setPedInfiniteAmmo(toggle: boolean, weaponHash: eWeaponHash): void {
587
+ inv<void>('0x3EDCB0505123623B', this.ped.handle, toggle, weaponHash);
588
+ }
589
+
590
+ /**
591
+ * @param weaponHash Refer to [enum: eWeaponHash]
592
+ * @param ammoHash Refer to [enum: eAmmoType]
593
+ */
594
+ setAmmoTypeForPedWeapon(weaponHash: eWeaponHash, ammoHash: eAmmoType): void {
595
+ inv<void>('0xCC9C4393523833E2', this.ped.handle, weaponHash, ammoHash);
596
+ }
597
+
598
+ /**
599
+ * *GET_BEST** - *GET_CLOSEST**
600
+ *
601
+ * @returns weaponGuid
602
+ */
603
+ get CorrectKitEmoteTwirlGun(): [boolean, number] {
604
+ const result = inv<[boolean, number]>('0xCD356B42C57BFE01', this.ped.handle, pvi(), rai());
605
+ return [!!result[0], result[1]];
645
606
  }
646
607
 
647
608
  /**
648
609
  * @param weaponHash Refer to [enum: eWeaponHash]
649
- * @param ammo
650
610
  * @returns
651
611
  */
652
- setAmmoInClip(weaponHash: eWeaponHash, ammo: number): boolean {
653
- return inv<boolean>('0xDCD2A934D65CB497', this.ped.handle, weaponHash, ammo, rai());
612
+ setCurrentPedVehicleWeapon(weaponHash: eWeaponHash): boolean {
613
+ return !!inv<boolean>('0x75C55983C2C39DAA', this.ped.handle, weaponHash, rai());
654
614
  }
655
615
 
656
616
  /**
657
- * _GET_M* - _GET_PED_A*
617
+ * Returns whether the ped has a rifle p1: 0 or 1
658
618
  *
659
619
  * @param p1
660
620
  * @returns
661
621
  */
662
- getPedWeaponObject(p1: boolean): Prop | null {
663
- return createFromHandle<Prop>('Prop', inv<number>('0x6CA484C9A7377E4F', this.ped.handle, p1, rai()));
622
+ doesPedHaveRifle(p1: number): any {
623
+ return inv<number>('0x95CA12E2C68043E5', this.ped.handle, p1);
664
624
  }
665
625
 
666
626
  /**
667
- * slotHash is usually just the weaponHash name, but WEAPON_* is replaced with SLOT_*
627
+ * 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
628
+ * _A* or _B*
668
629
  *
669
- * @param slotHash
670
- * @returns
630
+ * @param weaponHash Refer to [enum: eWeaponHash]
631
+ * @param ped
671
632
  */
672
- getPedWeaponInSlot(slotHash: string | number): number {
673
- return (inv<number>('0xDBC4B552B2AE9A83', this.ped.handle, _h(slotHash), rai())) & 0xFFFFFFFF;
633
+ N_0x14FF0C2545527F9B(weaponHash: eWeaponHash, ped: Ped): void {
634
+ inv<void>('0x14FF0C2545527F9B', this.ped.handle, weaponHash, ped.handle);
674
635
  }
675
636
 
676
637
  /**
677
- * Outputs cached guids
638
+ * Returns iSpinHash / iVariationSpin
678
639
  *
679
- * @returns guidPrimary; guidSecondary
640
+ * @param weaponEmoteVariation
641
+ * @returns
680
642
  */
681
- getPlayerPedQuickSwapWeaponByGuid(): [number, number] {
682
- const result = inv<[number, number]>('0xB7E52A058B07C7E2', this.ped.handle, pvi(), pvi());
683
- return [result[0], result[1]];
643
+ getPedGunSpinningHashFromWeaponEmoteVariation(weaponEmoteVariation: number): number {
644
+ return (inv<number>('0xF3B1620B920D1708', this.ped.handle, weaponEmoteVariation, rai())) & 0xFFFFFFFF;
684
645
  }
685
646
 
686
647
  /**
687
- * Returns true if the ped is currently holstering or unholstering a weapon
648
+ * Returns whether the ped has a repeater p1: 0 or 1
688
649
  *
650
+ * @param p1
689
651
  * @returns
690
652
  */
691
- isWeaponHolsterStateChanging(): boolean {
692
- return inv<boolean>('0x2387D6E9C6B478AA', this.ped.handle, rai());
653
+ doesPedHaveRepeater(p1: number): any {
654
+ return inv<number>('0x495A04CAEC263AF8', this.ped.handle, p1);
655
+ }
656
+
657
+ /**
658
+ * @param weaponCollection
659
+ */
660
+ giveWeaponCollectionToPed(weaponCollection: string | number): void {
661
+ inv<void>('0x899A04AFCC725D04', this.ped.handle, _h(weaponCollection));
693
662
  }
694
663
 
695
664
  /**
696
- * @param ammoHash Refer to [enum: eAmmoType]
697
665
  * @returns
698
666
  */
699
- N_0x44C8F4908F1B2622(ammoHash: eAmmoType): boolean {
700
- return inv<boolean>('0x44C8F4908F1B2622', this.ped.handle, ammoHash, rai());
667
+ get IsPedWeaponReadyToShoot(): boolean {
668
+ return !!inv<boolean>('0xB80CA294F2F26749', this.ped.handle, rai());
701
669
  }
702
670
 
703
671
  /**
704
- * @param p2
705
- * @returns clipInventoryUid
672
+ * @param componentHash
673
+ * @param weaponHash Refer to [enum: eWeaponHash]
706
674
  */
707
- refillAmmoInClip(p2: number): [any, number] {
708
- const result = inv<[number, number]>('0xDF4A3404D022ADDE', this.ped.handle, pvi(), p2);
709
- return [result[0], result[1]];
675
+ removeWeaponComponentFromPed(componentHash: string | number, weaponHash: eWeaponHash): void {
676
+ inv<void>('0x19F70C4D80494FF8', this.ped.handle, _h(componentHash), weaponHash);
710
677
  }
711
678
 
712
679
  /**
713
- * _SET_A* - _SET_B*
680
+ * @param visible
681
+ * @param deselectWeapon
682
+ * @param p3
683
+ * @param p4
684
+ */
685
+ setPedCurrentWeaponVisible(visible: boolean, deselectWeapon: boolean, p3: boolean, p4: boolean): void {
686
+ inv<void>('0x0725A4CCFDED9A70', this.ped.handle, visible, deselectWeapon, p3, p4);
687
+ }
688
+
689
+ /**
690
+ * Old name: _DROP_CURRENT_PED_WEAPON
714
691
  *
715
692
  * @param p1
693
+ * @param attachPoint Refer to [enum: eWeaponAttachPoint]
694
+ * @param p3
695
+ * @param p4
696
+ * @returns
716
697
  */
717
- N_0x2EBF70E1D8C06683(p1: string | number): void {
718
- inv<void>('0x2EBF70E1D8C06683', this.ped.handle, _h(p1));
698
+ makePedDropWeapon(p1: boolean, attachPoint: number, p3: boolean, p4: boolean): Entity | null {
699
+ return createFromHandle<Entity>('Entity', inv<number>('0xCEF4C65DE502D367', this.ped.handle, p1, attachPoint, p3, p4, rai()));
700
+ }
701
+
702
+ removeAllPedAmmo(): void {
703
+ inv<void>('0x1B83C0DEEBCBB214', this.ped.handle);
719
704
  }
720
705
 
721
706
  /**
722
- * @returns
707
+ * @param allow
723
708
  */
724
- getAllowDualWield(): any {
725
- return inv<number>('0x918990BD9CE08582', this.ped.handle);
709
+ set AllowDualWield(allow: boolean) {
710
+ inv<void>('0x83B8D50EB9446BBA', this.ped.handle, allow);
726
711
  }
727
712
 
728
713
  /**
729
- * Returns eCurrentHeldWeapon
730
- * _GET_R* - _GET_T*
714
+ * Returns weaponEmoteVariation WEAPON_EMOTE_VARIATION_INVALID = -2,
715
+ * WEAPON_EMOTE_VARIATION_BASE,
716
+ * WEAPON_EMOTE_VARIATION_A,
717
+ * WEAPON_EMOTE_VARIATION_B,
718
+ * WEAPON_EMOTE_VARIATION_C,
719
+ * WEAPON_EMOTE_VARIATION_D,
720
+ * WEAPON_EMOTE_VARIATION_PREVIEW,
721
+ * WEAPON_EMOTE_NUM_VARIATIONS
731
722
  *
723
+ * @param variation
732
724
  * @returns
733
725
  */
734
- getPedCurrentHeldWeapon(): number {
735
- return (inv<number>('0x8425C5F057012DAB', this.ped.handle, rai())) & 0xFFFFFFFF;
726
+ getWeaponEmoteVariation(variation: number): number {
727
+ return inv<number>('0x86147D05FA831D3A', this.ped.handle, variation, rai());
736
728
  }
737
729
 
738
730
  /**
739
- * @param toggle
731
+ * @param weaponHash Refer to [enum: eWeaponHash]
732
+ * @returns
740
733
  */
741
- setForceAutoEquip(toggle: boolean): void {
742
- inv<void>('0xBE711B14A159E84F', this.ped.handle, toggle);
734
+ isPedCarryingWeapon(weaponHash: eWeaponHash): boolean {
735
+ return !!inv<boolean>('0xF29A186ED428B552', this.ped.handle, weaponHash, rai());
743
736
  }
744
737
 
745
738
  /**
746
- * @param weaponHash Refer to [enum: eWeaponHash]
747
- * @param ammo
739
+ * @returns
748
740
  */
749
- setPedAmmo(weaponHash: eWeaponHash, ammo: number): void {
750
- inv<void>('0x14E56BC5B5DB6A19', this.ped.handle, weaponHash, ammo);
741
+ refillAmmoInCurrentPedWeapon(): any {
742
+ return inv<number>('0x0A2AB7B7ABC055F4', this.ped.handle);
751
743
  }
752
744
 
753
745
  /**
754
- * Gives the ped the weapon.
755
- * 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
756
- * 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
746
+ * Unequip current weapon and set current weapon to WEAPON_UNARMED.
747
+ * p0 usually 2 in R* scripts. Doesn't seem to have any effect if changed....
748
+ * immediately: if true it will instantly switch to unarmed
757
749
  *
758
- * @param weaponHash Refer to [enum: eWeaponHash]
759
- * @param ammoCount
760
- * @param bForceInHand
761
- * @param bForceInHolster
762
- * @param attachPoint Refer to [enum: eWeaponAttachPoint]
763
- * @param bAllowMultipleCopies
764
- * @param p7
765
- * @param p8
766
- * @param addReason Refer to [enum: eAddItemReason]
767
- * @param bIgnoreUnlocks
768
- * @param permanentDegradation
769
- * @param p12
750
+ * @param p0
751
+ * @param immediately
752
+ */
753
+ hidePedWeapons(p0: number, immediately: boolean): void {
754
+ inv<void>('0xFCCC886EDE3C63EC', this.ped.handle, p0, immediately);
755
+ }
756
+
757
+ /**
758
+ * Returns ammoHash from weaponObject (Returned by 0x6CA484C9A7377E4F)
759
+ *
760
+ * @param weaponObject
770
761
  * @returns
771
762
  */
772
- giveWeaponToPed(weaponHash: eWeaponHash, ammoCount: number, bForceInHand: boolean, bForceInHolster: boolean, attachPoint: number, bAllowMultipleCopies: boolean, p7: number, p8: number, addReason: eAddItemReason, bIgnoreUnlocks: boolean, permanentDegradation: number, p12: boolean): number {
773
- return (inv<number>('0x5E3BDDBCB83F3D84', this.ped.handle, weaponHash, ammoCount, bForceInHand, bForceInHolster, attachPoint, bAllowMultipleCopies, f(p7), f(p8), addReason, bIgnoreUnlocks, f(permanentDegradation), p12, rai())) & 0xFFFFFFFF;
763
+ getCurrentPedWeaponAmmoType(weaponObject: Prop): number {
764
+ return (inv<number>('0x7E7B19A4355FEE13', this.ped.handle, weaponObject.handle, rai())) & 0xFFFFFFFF;
774
765
  }
775
766
 
776
767
  /**
777
- * @param weaponHash Refer to [enum: eWeaponHash]
768
+ * @param p1
769
+ * @param p2
770
+ * @param p3
778
771
  * @returns
779
772
  */
780
- getAmmoInPedWeapon(weaponHash: eWeaponHash): number {
781
- return inv<number>('0x015A522136D7F951', this.ped.handle, weaponHash, rai());
773
+ getPedWorstWeapon(p1: boolean, p2: boolean, p3: boolean): number {
774
+ return (inv<number>('0xDA37A053C1522F5D', this.ped.handle, p1, p2, p3, rai())) & 0xFFFFFFFF;
782
775
  }
783
776
 
784
777
  /**
785
- * @param attachPoint Refer to [enum: eWeaponAttachPoint]
786
- * @returns weaponGuid
778
+ * @param toggle
787
779
  */
788
- getPedWeaponGuidAtAttachPoint(attachPoint: number): [any, number] {
789
- const result = inv<[number, number]>('0x6929E22158E52265', this.ped.handle, attachPoint, pvi());
790
- return [result[0], result[1]];
780
+ set PedDropsWeaponsWhenDead(toggle: boolean) {
781
+ inv<void>('0x476AE72C1D19D1A8', this.ped.handle, toggle);
782
+ }
783
+
784
+ /**
785
+ * Returns ammoHash
786
+ *
787
+ * @returns Returns the [enum: eAmmoType]; weaponGuid
788
+ */
789
+ get CurrentAmmoTypeFromGuid(): [number, number] {
790
+ const result = inv<[number, number]>('0xAF9D167A5656D6A6', this.ped.handle, pvi(), rai());
791
+ return [result[0] & 0xFFFFFFFF, result[1]];
791
792
  }
792
793
 
793
794
  /**
794
795
  * @param toggle
795
796
  */
796
- setAllowAnyWeaponDrop(toggle: boolean): void {
797
+ set PedInfiniteAmmoClip(toggle: boolean) {
798
+ inv<void>('0xFBAA1E06B6BCA741', this.ped.handle, toggle);
799
+ }
800
+
801
+ /**
802
+ * returns the amount of peds that were restrained with the weapon thrown bolas
803
+ *
804
+ * @returns
805
+ */
806
+ get NumPedsRestrainedFromWeaponBolas(): any {
807
+ return inv<number>('0x46D42883E873C1D7', this.ped.handle);
808
+ }
809
+
810
+ /**
811
+ * emote hashes: KIT_EMOTE_TWIRL_GUN, KIT_EMOTE_TWIRL_GUN_LEFT_HOLSTER, KIT_EMOTE_TWIRL_GUN_DUAL, 0 (to unequip)
812
+ *
813
+ * @param emote
814
+ */
815
+ set ActiveGunSpinningEquipKitEmoteTwirl(emote: string | number) {
816
+ inv<void>('0xCBCFFF805F1B4596', this.ped.handle, _h(emote));
817
+ }
818
+
819
+ /**
820
+ * @param toggle
821
+ */
822
+ set AllowAnyWeaponDrop(toggle: boolean) {
797
823
  inv<void>('0x78030C7867D8B9B6', this.ped.handle, toggle);
798
824
  }
799
825
 
@@ -840,102 +866,76 @@ export class Weapon {
840
866
  }
841
867
 
842
868
  /**
843
- * @param ammoType
844
- * @returns
845
- */
846
- getPedAmmoByType(ammoType: string | number): number {
847
- return inv<number>('0x39D22031557946C1', this.ped.handle, _h(ammoType), rai());
848
- }
849
-
850
- /**
851
- * @param p1
852
- * @param p2
853
- * @returns
854
- */
855
- getBestPedWeapon(p1: boolean, p2: boolean): number {
856
- return (inv<number>('0x8483E98E8B888AE2', this.ped.handle, p1, p2, rai())) & 0xFFFFFFFF;
857
- }
858
-
859
- /**
860
- * @param toggle
861
869
  * @param weaponHash Refer to [enum: eWeaponHash]
870
+ * @param ammoHash Refer to [enum: eAmmoType]
862
871
  */
863
- setPedInfiniteAmmo(toggle: boolean, weaponHash: eWeaponHash): void {
864
- inv<void>('0x3EDCB0505123623B', this.ped.handle, toggle, weaponHash);
872
+ enableAmmoTypeForPedWeapon(weaponHash: eWeaponHash, ammoHash: eAmmoType): void {
873
+ inv<void>('0x23FB9FACA28779C1', this.ped.handle, weaponHash, ammoHash);
865
874
  }
866
875
 
867
876
  /**
868
- * @param weaponHash Refer to [enum: eWeaponHash]
869
- * @param ammoHash Refer to [enum: eAmmoType]
877
+ * @param toggle
870
878
  */
871
- setAmmoTypeForPedWeapon(weaponHash: eWeaponHash, ammoHash: eAmmoType): void {
872
- inv<void>('0xCC9C4393523833E2', this.ped.handle, weaponHash, ammoHash);
879
+ N_0x431240A58484D5D0(toggle: boolean): void {
880
+ inv<void>('0x431240A58484D5D0', this.ped.handle, toggle);
873
881
  }
874
882
 
875
883
  /**
876
- * *GET_BEST** - *GET_CLOSEST**
877
- *
878
- * @returns weaponGuid
884
+ * @param p2
885
+ * @param p3
886
+ * @returns outGUID
879
887
  */
880
- getCorrectKitEmoteTwirlGun(): [boolean, number] {
881
- const result = inv<[boolean, number]>('0xCD356B42C57BFE01', this.ped.handle, pvi(), rai());
882
- return [!!result[0], result[1]];
888
+ getBestPedShortarmGuid(p2: boolean, p3: boolean): number {
889
+ const result = inv<number>('0xF52BD94B47CCF736', this.ped.handle, pvi(), p2, p3);
890
+ return result;
883
891
  }
884
892
 
885
893
  /**
886
- * @param weaponHash Refer to [enum: eWeaponHash]
887
- * @returns
894
+ * @returns coords
888
895
  */
889
- setCurrentPedVehicleWeapon(weaponHash: eWeaponHash): boolean {
890
- return inv<boolean>('0x75C55983C2C39DAA', this.ped.handle, weaponHash, rai());
896
+ get PedLastWeaponImpactCoord(): [boolean, Vector3] {
897
+ const result = inv<[boolean, number[]]>('0x6C4D0409BA1A2BC2', this.ped.handle, pvv(), rai());
898
+ return [!!result[0], Vector3.fromArray(result[1])];
891
899
  }
892
900
 
893
901
  /**
894
- * Returns whether the ped has a rifle p1: 0 or 1
902
+ * Returns WeaponAttachPoint
895
903
  *
896
- * @param p1
904
+ * @param attachPoint Refer to [enum: eWeaponAttachPoint]
897
905
  * @returns
898
906
  */
899
- doesPedHaveRifle(p1: number): any {
900
- return inv<number>('0x95CA12E2C68043E5', this.ped.handle, p1);
907
+ getWeaponAttachPoint(attachPoint: number): number {
908
+ return inv<number>('0xCAD4FE9398820D24', this.ped.handle, attachPoint, rai());
901
909
  }
902
910
 
903
911
  /**
904
- * 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
905
- * _A* or _B*
906
- *
907
- * @param weaponHash Refer to [enum: eWeaponHash]
908
- * @param ped
912
+ * @param p2
913
+ * @param attachPoint Refer to [enum: eWeaponAttachPoint]
914
+ * @param p4
915
+ * @returns weaponHash: Refer to [enum: eWeaponHash]
909
916
  */
910
- N_0x14FF0C2545527F9B(weaponHash: eWeaponHash, ped: Ped): void {
911
- inv<void>('0x14FF0C2545527F9B', this.ped.handle, weaponHash, ped.handle);
917
+ getCurrentPedWeapon(p2: boolean, attachPoint: number, p4: boolean): [boolean, number] {
918
+ const result = inv<[boolean, number]>('0x3A87E44BB9A01D54', this.ped.handle, pvi(), p2, attachPoint, p4, rai());
919
+ return [!!result[0], result[1]];
912
920
  }
913
921
 
914
922
  /**
915
- * Returns iSpinHash / iVariationSpin
923
+ * Returns whether the ped has a revolver p1: 0 or 1
916
924
  *
917
- * @param weaponEmoteVariation
925
+ * @param p1
918
926
  * @returns
919
927
  */
920
- getPedGunSpinningHashFromWeaponEmoteVariation(weaponEmoteVariation: number): number {
921
- return (inv<number>('0xF3B1620B920D1708', this.ped.handle, weaponEmoteVariation, rai())) & 0xFFFFFFFF;
928
+ doesPedHaveRevolver(p1: number): any {
929
+ return inv<number>('0x5B235F24472F2C3B', this.ped.handle, p1);
922
930
  }
923
931
 
924
932
  /**
925
- * Returns whether the ped has a repeater p1: 0 or 1
933
+ * Returns emote Hash
926
934
  *
927
- * @param p1
928
935
  * @returns
929
936
  */
930
- doesPedHaveRepeater(p1: number): any {
931
- return inv<number>('0x495A04CAEC263AF8', this.ped.handle, p1);
932
- }
933
-
934
- /**
935
- * @param weaponCollection
936
- */
937
- giveWeaponCollectionToPed(weaponCollection: string | number): void {
938
- inv<void>('0x899A04AFCC725D04', this.ped.handle, _h(weaponCollection));
937
+ get PedGunSpinningEquippedKitEmoteTwirl(): number {
938
+ return (inv<number>('0x2C4FEC3D0EFA9FC0', this.ped.handle, rai())) & 0xFFFFFFFF;
939
939
  }
940
940
 
941
941
  /**
@@ -948,7 +948,7 @@ export class Weapon {
948
948
  /**
949
949
  * @returns ammo; inventoryUid
950
950
  */
951
- getAmmoInClipByInventoryUid(): [any, number, number] {
951
+ get AmmoInClipByInventoryUid(): [any, number, number] {
952
952
  const result = inv<[number, number, number]>('0x678F00858980F516', this.ped.handle, pvi(), pvi());
953
953
  return [result[0], result[1], result[2]];
954
954
  }
@@ -969,7 +969,7 @@ export class Weapon {
969
969
  *
970
970
  * @param disableAnim
971
971
  */
972
- setPedWeaponOnBack(disableAnim: boolean): void {
972
+ set PedWeaponOnBack(disableAnim: boolean) {
973
973
  inv<void>('0x4820A6939D7CEF28', this.ped.handle, disableAnim);
974
974
  }
975
975
 
@@ -992,14 +992,14 @@ export class Weapon {
992
992
  /**
993
993
  * @param attachPoint Refer to [enum: eWeaponAttachPoint]
994
994
  */
995
- setForceCurrentWeaponIntoCockedState(attachPoint: number): void {
995
+ set ForceCurrentWeaponIntoCockedState(attachPoint: number) {
996
996
  inv<void>('0x5230D3F6EE56CFE6', this.ped.handle, attachPoint);
997
997
  }
998
998
 
999
999
  /**
1000
1000
  * @returns
1001
1001
  */
1002
- getPedHogtieWeapon(): number {
1002
+ get PedHogtieWeapon(): number {
1003
1003
  return (inv<number>('0x90EB1CB189923587', this.ped.handle, rai())) & 0xFFFFFFFF;
1004
1004
  }
1005
1005
 
@@ -1018,14 +1018,14 @@ export class Weapon {
1018
1018
  *
1019
1019
  * @param emoteType
1020
1020
  */
1021
- setGunSpinningInventorySlotIdActivate(emoteType: number): void {
1021
+ set GunSpinningInventorySlotIdActivate(emoteType: number) {
1022
1022
  inv<void>('0x408CF580C5E96D49', this.ped.handle, emoteType);
1023
1023
  }
1024
1024
 
1025
1025
  /**
1026
1026
  * @returns weaponHash: Refer to [enum: eWeaponHash]
1027
1027
  */
1028
- getCurrentPedVehicleWeapon(): [boolean, number] {
1028
+ get CurrentPedVehicleWeapon(): [boolean, number] {
1029
1029
  const result = inv<[boolean, number]>('0x1017582BCD3832DC', this.ped.handle, pvi(), rai());
1030
1030
  return [!!result[0], result[1]];
1031
1031
  }
@@ -1057,7 +1057,7 @@ export class Weapon {
1057
1057
  * @returns
1058
1058
  */
1059
1059
  hasPedGotWeapon(weaponHash: eWeaponHash, p2: number, onlyCheckPlayerInventory: boolean): boolean {
1060
- return inv<boolean>('0x8DECB02F88F428BC', this.ped.handle, weaponHash, p2, onlyCheckPlayerInventory, rai());
1060
+ return !!inv<boolean>('0x8DECB02F88F428BC', this.ped.handle, weaponHash, p2, onlyCheckPlayerInventory, rai());
1061
1061
  }
1062
1062
 
1063
1063
  }