@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
@@ -5,118 +5,6 @@ export class Weapon {
5
5
  constructor(ped) {
6
6
  this.ped = ped;
7
7
  }
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
32
- */
33
- getPedLastWeaponImpactCoord() {
34
- const result = inv('0x6C4D0409BA1A2BC2', this.ped.handle, pvv(), rai());
35
- return [!!result[0], Vector3.fromArray(result[1])];
36
- }
37
- /**
38
- * Returns WeaponAttachPoint
39
- *
40
- * @param attachPoint Refer to [enum: eWeaponAttachPoint]
41
- * @returns
42
- */
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]];
55
- }
56
- /**
57
- * Returns whether the ped has a revolver p1: 0 or 1
58
- *
59
- * @param p1
60
- * @returns
61
- */
62
- doesPedHaveRevolver(p1) {
63
- return inv('0x5B235F24472F2C3B', this.ped.handle, p1);
64
- }
65
- /**
66
- * Returns emote Hash
67
- *
68
- * @returns
69
- */
70
- getPedGunSpinningEquippedKitEmoteTwirl() {
71
- return (inv('0x2C4FEC3D0EFA9FC0', this.ped.handle, rai())) & 0xFFFFFFFF;
72
- }
73
- /**
74
- * Returns ammoHash from weaponObject (Returned by 0x6CA484C9A7377E4F)
75
- *
76
- * @param weaponObject
77
- * @returns
78
- */
79
- getCurrentPedWeaponAmmoType(weaponObject) {
80
- return (inv('0x7E7B19A4355FEE13', this.ped.handle, weaponObject.handle, rai())) & 0xFFFFFFFF;
81
- }
82
- /**
83
- * @param p1
84
- * @param p2
85
- * @param p3
86
- * @returns
87
- */
88
- getPedWorstWeapon(p1, p2, p3) {
89
- return (inv('0xDA37A053C1522F5D', this.ped.handle, p1, p2, p3, rai())) & 0xFFFFFFFF;
90
- }
91
- /**
92
- * @param toggle
93
- */
94
- setPedDropsWeaponsWhenDead(toggle) {
95
- inv('0x476AE72C1D19D1A8', this.ped.handle, toggle);
96
- }
97
- /**
98
- * Returns ammoHash
99
- *
100
- * @returns Returns the [enum: eAmmoType]; weaponGuid
101
- */
102
- getCurrentAmmoTypeFromGuid() {
103
- const result = inv('0xAF9D167A5656D6A6', this.ped.handle, pvi(), rai());
104
- return [result[0] & 0xFFFFFFFF, result[1]];
105
- }
106
- /**
107
- * @param toggle
108
- */
109
- setPedInfiniteAmmoClip(toggle) {
110
- inv('0xFBAA1E06B6BCA741', this.ped.handle, toggle);
111
- }
112
- /**
113
- * returns the amount of peds that were restrained with the weapon thrown bolas
114
- *
115
- * @returns
116
- */
117
- getNumPedsRestrainedFromWeaponBolas() {
118
- return inv('0x46D42883E873C1D7', this.ped.handle);
119
- }
120
8
  /**
121
9
  * Stores longarms to your horse on dismount
122
10
  * Params: p2 = 0
@@ -190,7 +78,7 @@ export class Weapon {
190
78
  * @returns
191
79
  */
192
80
  isTargetPedConstrainedByPedUsingBolas(targetPed) {
193
- return inv('0x8D50F43298AB9545', this.ped.handle, targetPed.handle, rai());
81
+ return !!inv('0x8D50F43298AB9545', this.ped.handle, targetPed.handle, rai());
194
82
  }
195
83
  /**
196
84
  * @param p1
@@ -200,61 +88,77 @@ export class Weapon {
200
88
  const result = inv('0x7B98500614C8E8B8', this.ped.handle, p1, pvi());
201
89
  return [result[0], result[1]];
202
90
  }
91
+ /**
92
+ * @param visible
93
+ */
94
+ set PedAllWeaponsVisibility(visible) {
95
+ inv('0x4F806A6CFED89468', this.ped.handle, visible);
96
+ }
203
97
  /**
204
98
  * @param weaponHash Refer to [enum: eWeaponHash]
99
+ * @param ammo
100
+ * @returns
205
101
  */
206
- enableAmmoTypeForPed(weaponHash) {
207
- inv('0x3B7B7908B7ADFB4B', this.ped.handle, weaponHash);
102
+ setAmmoInClip(weaponHash, ammo) {
103
+ return !!inv('0xDCD2A934D65CB497', this.ped.handle, weaponHash, ammo, rai());
208
104
  }
209
105
  /**
210
- * Detaches the weapon from the ped and actually removes the ped's weapon
106
+ * _GET_M* - _GET_PED_A*
211
107
  *
212
108
  * @param p1
213
109
  * @returns
214
110
  */
215
- getWeaponObjectFromPed(p1) {
216
- return createFromHandle('Prop', inv('0xC6A6789BB405D11C', this.ped.handle, p1, rai()));
111
+ getPedWeaponObject(p1) {
112
+ return createFromHandle('Prop', inv('0x6CA484C9A7377E4F', this.ped.handle, p1, rai()));
217
113
  }
218
114
  /**
115
+ * slotHash is usually just the weaponHash name, but WEAPON_* is replaced with SLOT_*
116
+ *
117
+ * @param slotHash
219
118
  * @returns
220
119
  */
221
- isPedCurrentWeaponHolstered() {
222
- return inv('0xBDD9C235D8D1052E', this.ped.handle);
120
+ getPedWeaponInSlot(slotHash) {
121
+ return (inv('0xDBC4B552B2AE9A83', this.ped.handle, _h(slotHash), rai())) & 0xFFFFFFFF;
223
122
  }
224
123
  /**
225
- * @param toggle
124
+ * Outputs cached guids
125
+ *
126
+ * @returns guidPrimary; guidSecondary
226
127
  */
227
- setInstantlyEquipWeaponPickups(toggle) {
228
- inv('0x739B9C6D0E7F7F93', this.ped.handle, toggle);
128
+ get PlayerPedQuickSwapWeaponByGuid() {
129
+ const result = inv('0xB7E52A058B07C7E2', this.ped.handle, pvi(), pvi());
130
+ return [result[0], result[1]];
229
131
  }
230
132
  /**
231
- * Hides the ped's weapon during a cutscene.
133
+ * Returns true if the ped is currently holstering or unholstering a weapon
232
134
  *
233
- * @param toggle
135
+ * @returns
234
136
  */
235
- hidePedWeaponForScriptedCutscene(toggle) {
236
- inv('0x6F6981D2253C208F', this.ped.handle, toggle);
137
+ get IsWeaponHolsterStateChanging() {
138
+ return !!inv('0x2387D6E9C6B478AA', this.ped.handle, rai());
237
139
  }
238
140
  /**
239
- * @returns guidPrimary; guidSecondary
141
+ * @param ammoHash Refer to [enum: eAmmoType]
142
+ * @returns
240
143
  */
241
- setPlayerPedQuickSwapWeaponByGuid() {
242
- const result = inv('0xEC1F85DA51D3D6C4', this.ped.handle, pvi(), pvi());
243
- return [result[0], result[1]];
144
+ N_0x44C8F4908F1B2622(ammoHash) {
145
+ return !!inv('0x44C8F4908F1B2622', this.ped.handle, ammoHash, rai());
244
146
  }
245
147
  /**
246
- * @returns Returns the total ammo in the ped weapon from it's guid, or `0`.; guid
148
+ * @param p2
149
+ * @returns clipInventoryUid
247
150
  */
248
- getAmmoInPedWeaponFromGuid() {
249
- const result = inv('0x4823F13A21F51964', this.ped.handle, pvi(), rai());
151
+ refillAmmoInClip(p2) {
152
+ const result = inv('0xDF4A3404D022ADDE', this.ped.handle, pvi(), p2);
250
153
  return [result[0], result[1]];
251
154
  }
252
155
  /**
156
+ * _SET_A* - _SET_B*
157
+ *
253
158
  * @param p1
254
- * @param p2
255
159
  */
256
- removeAllPedWeapons(p1, p2) {
257
- inv('0xF25DF915FA38C5F3', this.ped.handle, p1, p2);
160
+ N_0x2EBF70E1D8C06683(p1) {
161
+ inv('0x2EBF70E1D8C06683', this.ped.handle, _h(p1));
258
162
  }
259
163
  /**
260
164
  * @param ammoHash Refer to [enum: eAmmoType]
@@ -317,14 +221,6 @@ export class Weapon {
317
221
  const result = inv('0xDC16122C7A20C933', this.ped.handle, pvi(), weaponHash, rai());
318
222
  return [!!result[0], result[1]];
319
223
  }
320
- /**
321
- * emote hashes: KIT_EMOTE_TWIRL_GUN, KIT_EMOTE_TWIRL_GUN_LEFT_HOLSTER, KIT_EMOTE_TWIRL_GUN_DUAL, 0 (to unequip)
322
- *
323
- * @param emote
324
- */
325
- setActiveGunSpinningEquipKitEmoteTwirl(emote) {
326
- inv('0xCBCFFF805F1B4596', this.ped.handle, _h(emote));
327
- }
328
224
  /**
329
225
  * @returns
330
226
  */
@@ -340,7 +236,7 @@ export class Weapon {
340
236
  * @returns
341
237
  */
342
238
  isPedHoldingWeapon(weapon) {
343
- return inv('0x07E1C35F0078C3F9', this.ped.handle, _h(weapon), rai());
239
+ return !!inv('0x07E1C35F0078C3F9', this.ped.handle, _h(weapon), rai());
344
240
  }
345
241
  /**
346
242
  * _GET_D* - _GET_L*
@@ -348,14 +244,14 @@ export class Weapon {
348
244
  * @returns
349
245
  */
350
246
  N_0x0DE0944ECCB3DF5D() {
351
- return inv('0x0DE0944ECCB3DF5D', this.ped.handle, rai());
247
+ return !!inv('0x0DE0944ECCB3DF5D', this.ped.handle, rai());
352
248
  }
353
249
  /**
354
250
  * @param flags
355
251
  * @returns
356
252
  */
357
253
  isPedArmed(flags) {
358
- return inv('0xCB690F680A3EA971', this.ped.handle, flags);
254
+ return !!inv('0xCB690F680A3EA971', this.ped.handle, flags, rai());
359
255
  }
360
256
  /**
361
257
  * Returns whether the ped has a sniper p1: 0 or 1
@@ -372,7 +268,7 @@ export class Weapon {
372
268
  *
373
269
  * @returns
374
270
  */
375
- getDefaultUnarmedWeaponHash() {
271
+ get DefaultUnarmedWeaponHash() {
376
272
  return (inv('0x08FF1099ED2E6E21', this.ped.handle, rai())) & 0xFFFFFFFF;
377
273
  }
378
274
  /**
@@ -391,91 +287,129 @@ export class Weapon {
391
287
  return createFromHandle('Entity', inv('0x3B390A939AF0B5FC', this.ped.handle, attachPoint, rai()));
392
288
  }
393
289
  /**
290
+ * @param weaponHash Refer to [enum: eWeaponHash]
291
+ */
292
+ enableAmmoTypeForPed(weaponHash) {
293
+ inv('0x3B7B7908B7ADFB4B', this.ped.handle, weaponHash);
294
+ }
295
+ /**
296
+ * Detaches the weapon from the ped and actually removes the ped's weapon
297
+ *
298
+ * @param p1
394
299
  * @returns
395
300
  */
396
- isPedWeaponReadyToShoot() {
397
- return inv('0xB80CA294F2F26749', this.ped.handle, rai());
301
+ getWeaponObjectFromPed(p1) {
302
+ return createFromHandle('Prop', inv('0xC6A6789BB405D11C', this.ped.handle, p1, rai()));
398
303
  }
399
304
  /**
400
- * @param componentHash
401
- * @param weaponHash Refer to [enum: eWeaponHash]
305
+ * @returns
402
306
  */
403
- removeWeaponComponentFromPed(componentHash, weaponHash) {
404
- inv('0x19F70C4D80494FF8', this.ped.handle, _h(componentHash), weaponHash);
307
+ get IsPedCurrentWeaponHolstered() {
308
+ return inv('0xBDD9C235D8D1052E', this.ped.handle);
405
309
  }
406
310
  /**
407
- * @param visible
408
- * @param deselectWeapon
409
- * @param p3
410
- * @param p4
311
+ * @param toggle
411
312
  */
412
- setPedCurrentWeaponVisible(visible, deselectWeapon, p3, p4) {
413
- inv('0x0725A4CCFDED9A70', this.ped.handle, visible, deselectWeapon, p3, p4);
313
+ set InstantlyEquipWeaponPickups(toggle) {
314
+ inv('0x739B9C6D0E7F7F93', this.ped.handle, toggle);
414
315
  }
415
316
  /**
416
- * Old name: _DROP_CURRENT_PED_WEAPON
317
+ * Hides the ped's weapon during a cutscene.
417
318
  *
418
- * @param p1
419
- * @param attachPoint Refer to [enum: eWeaponAttachPoint]
420
- * @param p3
421
- * @param p4
422
- * @returns
319
+ * @param toggle
423
320
  */
424
- makePedDropWeapon(p1, attachPoint, p3, p4) {
425
- return createFromHandle('Entity', inv('0xCEF4C65DE502D367', this.ped.handle, p1, attachPoint, p3, p4, rai()));
321
+ hidePedWeaponForScriptedCutscene(toggle) {
322
+ inv('0x6F6981D2253C208F', this.ped.handle, toggle);
426
323
  }
427
- removeAllPedAmmo() {
428
- inv('0x1B83C0DEEBCBB214', this.ped.handle);
324
+ /**
325
+ * @returns guidPrimary; guidSecondary
326
+ */
327
+ setPlayerPedQuickSwapWeaponByGuid() {
328
+ const result = inv('0xEC1F85DA51D3D6C4', this.ped.handle, pvi(), pvi());
329
+ return [result[0], result[1]];
429
330
  }
430
331
  /**
431
- * @param allow
332
+ * @returns Returns the total ammo in the ped weapon from it's guid, or `0`.; guid
432
333
  */
433
- setAllowDualWield(allow) {
434
- inv('0x83B8D50EB9446BBA', this.ped.handle, allow);
334
+ get AmmoInPedWeaponFromGuid() {
335
+ const result = inv('0x4823F13A21F51964', this.ped.handle, pvi(), rai());
336
+ return [result[0], result[1]];
435
337
  }
436
338
  /**
437
- * Returns weaponEmoteVariation WEAPON_EMOTE_VARIATION_INVALID = -2,
438
- * WEAPON_EMOTE_VARIATION_BASE,
439
- * WEAPON_EMOTE_VARIATION_A,
440
- * WEAPON_EMOTE_VARIATION_B,
441
- * WEAPON_EMOTE_VARIATION_C,
442
- * WEAPON_EMOTE_VARIATION_D,
443
- * WEAPON_EMOTE_VARIATION_PREVIEW,
444
- * WEAPON_EMOTE_NUM_VARIATIONS
445
- *
446
- * @param variation
447
- * @returns
339
+ * @param p1
340
+ * @param p2
448
341
  */
449
- getWeaponEmoteVariation(variation) {
450
- return inv('0x86147D05FA831D3A', this.ped.handle, variation, rai());
342
+ removeAllPedWeapons(p1, p2) {
343
+ inv('0xF25DF915FA38C5F3', this.ped.handle, p1, p2);
451
344
  }
452
345
  /**
453
- * @param weaponHash Refer to [enum: eWeaponHash]
454
346
  * @returns
455
347
  */
456
- isPedCarryingWeapon(weaponHash) {
457
- return inv('0xF29A186ED428B552', this.ped.handle, weaponHash);
348
+ get AllowDualWield() {
349
+ return inv('0x918990BD9CE08582', this.ped.handle);
458
350
  }
459
351
  /**
352
+ * Returns eCurrentHeldWeapon
353
+ * _GET_R* - _GET_T*
354
+ *
460
355
  * @returns
461
356
  */
462
- refillAmmoInCurrentPedWeapon() {
463
- return inv('0x0A2AB7B7ABC055F4', this.ped.handle);
357
+ get PedCurrentHeldWeapon() {
358
+ return (inv('0x8425C5F057012DAB', this.ped.handle, rai())) & 0xFFFFFFFF;
464
359
  }
465
360
  /**
466
- * Unequip current weapon and set current weapon to WEAPON_UNARMED.
467
- * p0 usually 2 in R* scripts. Doesn't seem to have any effect if changed....
468
- * immediately: if true it will instantly switch to unarmed
469
- *
470
- * @param p0
471
- * @param immediately
361
+ * @param toggle
472
362
  */
473
- hidePedWeapons(p0, immediately) {
474
- inv('0xFCCC886EDE3C63EC', this.ped.handle, p0, immediately);
363
+ set ForceAutoEquip(toggle) {
364
+ inv('0xBE711B14A159E84F', this.ped.handle, toggle);
475
365
  }
476
366
  /**
477
367
  * @param weaponHash Refer to [enum: eWeaponHash]
478
- * @returns ammo
368
+ * @param ammo
369
+ */
370
+ setPedAmmo(weaponHash, ammo) {
371
+ inv('0x14E56BC5B5DB6A19', this.ped.handle, weaponHash, ammo);
372
+ }
373
+ /**
374
+ * Gives the ped the weapon.
375
+ * 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
376
+ * 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
377
+ *
378
+ * @param weaponHash Refer to [enum: eWeaponHash]
379
+ * @param ammoCount
380
+ * @param bForceInHand
381
+ * @param bForceInHolster
382
+ * @param attachPoint Refer to [enum: eWeaponAttachPoint]
383
+ * @param bAllowMultipleCopies
384
+ * @param p7
385
+ * @param p8
386
+ * @param addReason Refer to [enum: eAddItemReason]
387
+ * @param bIgnoreUnlocks
388
+ * @param permanentDegradation
389
+ * @param p12
390
+ * @returns
391
+ */
392
+ giveWeaponToPed(weaponHash, ammoCount, bForceInHand, bForceInHolster, attachPoint, bAllowMultipleCopies, p7, p8, addReason, bIgnoreUnlocks, permanentDegradation, p12) {
393
+ return (inv('0x5E3BDDBCB83F3D84', this.ped.handle, weaponHash, ammoCount, bForceInHand, bForceInHolster, attachPoint, bAllowMultipleCopies, f(p7), f(p8), addReason, bIgnoreUnlocks, f(permanentDegradation), p12, rai())) & 0xFFFFFFFF;
394
+ }
395
+ /**
396
+ * @param weaponHash Refer to [enum: eWeaponHash]
397
+ * @returns
398
+ */
399
+ getAmmoInPedWeapon(weaponHash) {
400
+ return inv('0x015A522136D7F951', this.ped.handle, weaponHash, rai());
401
+ }
402
+ /**
403
+ * @param attachPoint Refer to [enum: eWeaponAttachPoint]
404
+ * @returns weaponGuid
405
+ */
406
+ getPedWeaponGuidAtAttachPoint(attachPoint) {
407
+ const result = inv('0x6929E22158E52265', this.ped.handle, attachPoint, pvi());
408
+ return [result[0], result[1]];
409
+ }
410
+ /**
411
+ * @param weaponHash Refer to [enum: eWeaponHash]
412
+ * @returns ammo
479
413
  */
480
414
  getAmmoInClip(weaponHash) {
481
415
  const result = inv('0x2E1202248937775C', this.ped.handle, pvi(), weaponHash, rai());
@@ -552,150 +486,239 @@ export class Weapon {
552
486
  /**
553
487
  * @returns
554
488
  */
555
- getMaxLockonDistanceOfCurrentPedWeapon() {
489
+ get MaxLockonDistanceOfCurrentPedWeapon() {
556
490
  return inv('0x79B1A6E780266DB0', this.ped.handle, raf());
557
491
  }
558
492
  /**
559
- * @param visible
493
+ * @param ammoType
494
+ * @returns
560
495
  */
561
- setPedAllWeaponsVisibility(visible) {
562
- inv('0x4F806A6CFED89468', this.ped.handle, visible);
496
+ getPedAmmoByType(ammoType) {
497
+ return inv('0x39D22031557946C1', this.ped.handle, _h(ammoType), rai());
498
+ }
499
+ /**
500
+ * @param p1
501
+ * @param p2
502
+ * @returns
503
+ */
504
+ getBestPedWeapon(p1, p2) {
505
+ return (inv('0x8483E98E8B888AE2', this.ped.handle, p1, p2, rai())) & 0xFFFFFFFF;
506
+ }
507
+ /**
508
+ * @param toggle
509
+ * @param weaponHash Refer to [enum: eWeaponHash]
510
+ */
511
+ setPedInfiniteAmmo(toggle, weaponHash) {
512
+ inv('0x3EDCB0505123623B', this.ped.handle, toggle, weaponHash);
513
+ }
514
+ /**
515
+ * @param weaponHash Refer to [enum: eWeaponHash]
516
+ * @param ammoHash Refer to [enum: eAmmoType]
517
+ */
518
+ setAmmoTypeForPedWeapon(weaponHash, ammoHash) {
519
+ inv('0xCC9C4393523833E2', this.ped.handle, weaponHash, ammoHash);
520
+ }
521
+ /**
522
+ * *GET_BEST** - *GET_CLOSEST**
523
+ *
524
+ * @returns weaponGuid
525
+ */
526
+ get CorrectKitEmoteTwirlGun() {
527
+ const result = inv('0xCD356B42C57BFE01', this.ped.handle, pvi(), rai());
528
+ return [!!result[0], result[1]];
563
529
  }
564
530
  /**
565
531
  * @param weaponHash Refer to [enum: eWeaponHash]
566
- * @param ammo
567
532
  * @returns
568
533
  */
569
- setAmmoInClip(weaponHash, ammo) {
570
- return inv('0xDCD2A934D65CB497', this.ped.handle, weaponHash, ammo, rai());
534
+ setCurrentPedVehicleWeapon(weaponHash) {
535
+ return !!inv('0x75C55983C2C39DAA', this.ped.handle, weaponHash, rai());
571
536
  }
572
537
  /**
573
- * _GET_M* - _GET_PED_A*
538
+ * Returns whether the ped has a rifle p1: 0 or 1
574
539
  *
575
540
  * @param p1
576
541
  * @returns
577
542
  */
578
- getPedWeaponObject(p1) {
579
- return createFromHandle('Prop', inv('0x6CA484C9A7377E4F', this.ped.handle, p1, rai()));
543
+ doesPedHaveRifle(p1) {
544
+ return inv('0x95CA12E2C68043E5', this.ped.handle, p1);
580
545
  }
581
546
  /**
582
- * slotHash is usually just the weaponHash name, but WEAPON_* is replaced with SLOT_*
547
+ * 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
548
+ * _A* or _B*
583
549
  *
584
- * @param slotHash
585
- * @returns
550
+ * @param weaponHash Refer to [enum: eWeaponHash]
551
+ * @param ped
586
552
  */
587
- getPedWeaponInSlot(slotHash) {
588
- return (inv('0xDBC4B552B2AE9A83', this.ped.handle, _h(slotHash), rai())) & 0xFFFFFFFF;
553
+ N_0x14FF0C2545527F9B(weaponHash, ped) {
554
+ inv('0x14FF0C2545527F9B', this.ped.handle, weaponHash, ped.handle);
589
555
  }
590
556
  /**
591
- * Outputs cached guids
557
+ * Returns iSpinHash / iVariationSpin
592
558
  *
593
- * @returns guidPrimary; guidSecondary
559
+ * @param weaponEmoteVariation
560
+ * @returns
594
561
  */
595
- getPlayerPedQuickSwapWeaponByGuid() {
596
- const result = inv('0xB7E52A058B07C7E2', this.ped.handle, pvi(), pvi());
597
- return [result[0], result[1]];
562
+ getPedGunSpinningHashFromWeaponEmoteVariation(weaponEmoteVariation) {
563
+ return (inv('0xF3B1620B920D1708', this.ped.handle, weaponEmoteVariation, rai())) & 0xFFFFFFFF;
598
564
  }
599
565
  /**
600
- * Returns true if the ped is currently holstering or unholstering a weapon
566
+ * Returns whether the ped has a repeater p1: 0 or 1
601
567
  *
568
+ * @param p1
602
569
  * @returns
603
570
  */
604
- isWeaponHolsterStateChanging() {
605
- return inv('0x2387D6E9C6B478AA', this.ped.handle, rai());
571
+ doesPedHaveRepeater(p1) {
572
+ return inv('0x495A04CAEC263AF8', this.ped.handle, p1);
573
+ }
574
+ /**
575
+ * @param weaponCollection
576
+ */
577
+ giveWeaponCollectionToPed(weaponCollection) {
578
+ inv('0x899A04AFCC725D04', this.ped.handle, _h(weaponCollection));
606
579
  }
607
580
  /**
608
- * @param ammoHash Refer to [enum: eAmmoType]
609
581
  * @returns
610
582
  */
611
- N_0x44C8F4908F1B2622(ammoHash) {
612
- return inv('0x44C8F4908F1B2622', this.ped.handle, ammoHash, rai());
583
+ get IsPedWeaponReadyToShoot() {
584
+ return !!inv('0xB80CA294F2F26749', this.ped.handle, rai());
613
585
  }
614
586
  /**
615
- * @param p2
616
- * @returns clipInventoryUid
587
+ * @param componentHash
588
+ * @param weaponHash Refer to [enum: eWeaponHash]
617
589
  */
618
- refillAmmoInClip(p2) {
619
- const result = inv('0xDF4A3404D022ADDE', this.ped.handle, pvi(), p2);
620
- return [result[0], result[1]];
590
+ removeWeaponComponentFromPed(componentHash, weaponHash) {
591
+ inv('0x19F70C4D80494FF8', this.ped.handle, _h(componentHash), weaponHash);
621
592
  }
622
593
  /**
623
- * _SET_A* - _SET_B*
594
+ * @param visible
595
+ * @param deselectWeapon
596
+ * @param p3
597
+ * @param p4
598
+ */
599
+ setPedCurrentWeaponVisible(visible, deselectWeapon, p3, p4) {
600
+ inv('0x0725A4CCFDED9A70', this.ped.handle, visible, deselectWeapon, p3, p4);
601
+ }
602
+ /**
603
+ * Old name: _DROP_CURRENT_PED_WEAPON
624
604
  *
625
605
  * @param p1
606
+ * @param attachPoint Refer to [enum: eWeaponAttachPoint]
607
+ * @param p3
608
+ * @param p4
609
+ * @returns
626
610
  */
627
- N_0x2EBF70E1D8C06683(p1) {
628
- inv('0x2EBF70E1D8C06683', this.ped.handle, _h(p1));
611
+ makePedDropWeapon(p1, attachPoint, p3, p4) {
612
+ return createFromHandle('Entity', inv('0xCEF4C65DE502D367', this.ped.handle, p1, attachPoint, p3, p4, rai()));
613
+ }
614
+ removeAllPedAmmo() {
615
+ inv('0x1B83C0DEEBCBB214', this.ped.handle);
629
616
  }
630
617
  /**
631
- * @returns
618
+ * @param allow
632
619
  */
633
- getAllowDualWield() {
634
- return inv('0x918990BD9CE08582', this.ped.handle);
620
+ set AllowDualWield(allow) {
621
+ inv('0x83B8D50EB9446BBA', this.ped.handle, allow);
635
622
  }
636
623
  /**
637
- * Returns eCurrentHeldWeapon
638
- * _GET_R* - _GET_T*
624
+ * Returns weaponEmoteVariation WEAPON_EMOTE_VARIATION_INVALID = -2,
625
+ * WEAPON_EMOTE_VARIATION_BASE,
626
+ * WEAPON_EMOTE_VARIATION_A,
627
+ * WEAPON_EMOTE_VARIATION_B,
628
+ * WEAPON_EMOTE_VARIATION_C,
629
+ * WEAPON_EMOTE_VARIATION_D,
630
+ * WEAPON_EMOTE_VARIATION_PREVIEW,
631
+ * WEAPON_EMOTE_NUM_VARIATIONS
639
632
  *
633
+ * @param variation
640
634
  * @returns
641
635
  */
642
- getPedCurrentHeldWeapon() {
643
- return (inv('0x8425C5F057012DAB', this.ped.handle, rai())) & 0xFFFFFFFF;
636
+ getWeaponEmoteVariation(variation) {
637
+ return inv('0x86147D05FA831D3A', this.ped.handle, variation, rai());
644
638
  }
645
639
  /**
646
- * @param toggle
640
+ * @param weaponHash Refer to [enum: eWeaponHash]
641
+ * @returns
647
642
  */
648
- setForceAutoEquip(toggle) {
649
- inv('0xBE711B14A159E84F', this.ped.handle, toggle);
643
+ isPedCarryingWeapon(weaponHash) {
644
+ return !!inv('0xF29A186ED428B552', this.ped.handle, weaponHash, rai());
650
645
  }
651
646
  /**
652
- * @param weaponHash Refer to [enum: eWeaponHash]
653
- * @param ammo
647
+ * @returns
654
648
  */
655
- setPedAmmo(weaponHash, ammo) {
656
- inv('0x14E56BC5B5DB6A19', this.ped.handle, weaponHash, ammo);
649
+ refillAmmoInCurrentPedWeapon() {
650
+ return inv('0x0A2AB7B7ABC055F4', this.ped.handle);
657
651
  }
658
652
  /**
659
- * Gives the ped the weapon.
660
- * List: https://github.com/femga/rdr3_discoveries/blob/master/weapons/weapons.lua Params: p7 is 0.5f, and p8 is 1.0f. p11 and p12 are both 0 in R* Scripts
661
- * permanentDegradation: default 0.5, any higher than 0 it will automatically make the weapon worn, you can also adjust the value to change the weapons maximum cleanliness
653
+ * Unequip current weapon and set current weapon to WEAPON_UNARMED.
654
+ * p0 usually 2 in R* scripts. Doesn't seem to have any effect if changed....
655
+ * immediately: if true it will instantly switch to unarmed
662
656
  *
663
- * @param weaponHash Refer to [enum: eWeaponHash]
664
- * @param ammoCount
665
- * @param bForceInHand
666
- * @param bForceInHolster
667
- * @param attachPoint Refer to [enum: eWeaponAttachPoint]
668
- * @param bAllowMultipleCopies
669
- * @param p7
670
- * @param p8
671
- * @param addReason Refer to [enum: eAddItemReason]
672
- * @param bIgnoreUnlocks
673
- * @param permanentDegradation
674
- * @param p12
657
+ * @param p0
658
+ * @param immediately
659
+ */
660
+ hidePedWeapons(p0, immediately) {
661
+ inv('0xFCCC886EDE3C63EC', this.ped.handle, p0, immediately);
662
+ }
663
+ /**
664
+ * Returns ammoHash from weaponObject (Returned by 0x6CA484C9A7377E4F)
665
+ *
666
+ * @param weaponObject
675
667
  * @returns
676
668
  */
677
- giveWeaponToPed(weaponHash, ammoCount, bForceInHand, bForceInHolster, attachPoint, bAllowMultipleCopies, p7, p8, addReason, bIgnoreUnlocks, permanentDegradation, p12) {
678
- return (inv('0x5E3BDDBCB83F3D84', this.ped.handle, weaponHash, ammoCount, bForceInHand, bForceInHolster, attachPoint, bAllowMultipleCopies, f(p7), f(p8), addReason, bIgnoreUnlocks, f(permanentDegradation), p12, rai())) & 0xFFFFFFFF;
669
+ getCurrentPedWeaponAmmoType(weaponObject) {
670
+ return (inv('0x7E7B19A4355FEE13', this.ped.handle, weaponObject.handle, rai())) & 0xFFFFFFFF;
679
671
  }
680
672
  /**
681
- * @param weaponHash Refer to [enum: eWeaponHash]
673
+ * @param p1
674
+ * @param p2
675
+ * @param p3
682
676
  * @returns
683
677
  */
684
- getAmmoInPedWeapon(weaponHash) {
685
- return inv('0x015A522136D7F951', this.ped.handle, weaponHash, rai());
678
+ getPedWorstWeapon(p1, p2, p3) {
679
+ return (inv('0xDA37A053C1522F5D', this.ped.handle, p1, p2, p3, rai())) & 0xFFFFFFFF;
686
680
  }
687
681
  /**
688
- * @param attachPoint Refer to [enum: eWeaponAttachPoint]
689
- * @returns weaponGuid
682
+ * @param toggle
690
683
  */
691
- getPedWeaponGuidAtAttachPoint(attachPoint) {
692
- const result = inv('0x6929E22158E52265', this.ped.handle, attachPoint, pvi());
693
- return [result[0], result[1]];
684
+ set PedDropsWeaponsWhenDead(toggle) {
685
+ inv('0x476AE72C1D19D1A8', this.ped.handle, toggle);
686
+ }
687
+ /**
688
+ * Returns ammoHash
689
+ *
690
+ * @returns Returns the [enum: eAmmoType]; weaponGuid
691
+ */
692
+ get CurrentAmmoTypeFromGuid() {
693
+ const result = inv('0xAF9D167A5656D6A6', this.ped.handle, pvi(), rai());
694
+ return [result[0] & 0xFFFFFFFF, result[1]];
694
695
  }
695
696
  /**
696
697
  * @param toggle
697
698
  */
698
- setAllowAnyWeaponDrop(toggle) {
699
+ set PedInfiniteAmmoClip(toggle) {
700
+ inv('0xFBAA1E06B6BCA741', this.ped.handle, toggle);
701
+ }
702
+ /**
703
+ * returns the amount of peds that were restrained with the weapon thrown bolas
704
+ *
705
+ * @returns
706
+ */
707
+ get NumPedsRestrainedFromWeaponBolas() {
708
+ return inv('0x46D42883E873C1D7', this.ped.handle);
709
+ }
710
+ /**
711
+ * emote hashes: KIT_EMOTE_TWIRL_GUN, KIT_EMOTE_TWIRL_GUN_LEFT_HOLSTER, KIT_EMOTE_TWIRL_GUN_DUAL, 0 (to unequip)
712
+ *
713
+ * @param emote
714
+ */
715
+ set ActiveGunSpinningEquipKitEmoteTwirl(emote) {
716
+ inv('0xCBCFFF805F1B4596', this.ped.handle, _h(emote));
717
+ }
718
+ /**
719
+ * @param toggle
720
+ */
721
+ set AllowAnyWeaponDrop(toggle) {
699
722
  inv('0x78030C7867D8B9B6', this.ped.handle, toggle);
700
723
  }
701
724
  /**
@@ -736,92 +759,69 @@ export class Weapon {
736
759
  inv('0x4899CB088EDF59B8', this.ped.handle, weaponHash, p2, removeReason);
737
760
  }
738
761
  /**
739
- * @param ammoType
740
- * @returns
741
- */
742
- getPedAmmoByType(ammoType) {
743
- return inv('0x39D22031557946C1', this.ped.handle, _h(ammoType), rai());
744
- }
745
- /**
746
- * @param p1
747
- * @param p2
748
- * @returns
749
- */
750
- getBestPedWeapon(p1, p2) {
751
- return (inv('0x8483E98E8B888AE2', this.ped.handle, p1, p2, rai())) & 0xFFFFFFFF;
752
- }
753
- /**
754
- * @param toggle
755
762
  * @param weaponHash Refer to [enum: eWeaponHash]
763
+ * @param ammoHash Refer to [enum: eAmmoType]
756
764
  */
757
- setPedInfiniteAmmo(toggle, weaponHash) {
758
- inv('0x3EDCB0505123623B', this.ped.handle, toggle, weaponHash);
765
+ enableAmmoTypeForPedWeapon(weaponHash, ammoHash) {
766
+ inv('0x23FB9FACA28779C1', this.ped.handle, weaponHash, ammoHash);
759
767
  }
760
768
  /**
761
- * @param weaponHash Refer to [enum: eWeaponHash]
762
- * @param ammoHash Refer to [enum: eAmmoType]
769
+ * @param toggle
763
770
  */
764
- setAmmoTypeForPedWeapon(weaponHash, ammoHash) {
765
- inv('0xCC9C4393523833E2', this.ped.handle, weaponHash, ammoHash);
771
+ N_0x431240A58484D5D0(toggle) {
772
+ inv('0x431240A58484D5D0', this.ped.handle, toggle);
766
773
  }
767
774
  /**
768
- * *GET_BEST** - *GET_CLOSEST**
769
- *
770
- * @returns weaponGuid
775
+ * @param p2
776
+ * @param p3
777
+ * @returns outGUID
771
778
  */
772
- getCorrectKitEmoteTwirlGun() {
773
- const result = inv('0xCD356B42C57BFE01', this.ped.handle, pvi(), rai());
774
- return [!!result[0], result[1]];
779
+ getBestPedShortarmGuid(p2, p3) {
780
+ const result = inv('0xF52BD94B47CCF736', this.ped.handle, pvi(), p2, p3);
781
+ return result;
775
782
  }
776
783
  /**
777
- * @param weaponHash Refer to [enum: eWeaponHash]
778
- * @returns
784
+ * @returns coords
779
785
  */
780
- setCurrentPedVehicleWeapon(weaponHash) {
781
- return inv('0x75C55983C2C39DAA', this.ped.handle, weaponHash, rai());
786
+ get PedLastWeaponImpactCoord() {
787
+ const result = inv('0x6C4D0409BA1A2BC2', this.ped.handle, pvv(), rai());
788
+ return [!!result[0], Vector3.fromArray(result[1])];
782
789
  }
783
790
  /**
784
- * Returns whether the ped has a rifle p1: 0 or 1
791
+ * Returns WeaponAttachPoint
785
792
  *
786
- * @param p1
793
+ * @param attachPoint Refer to [enum: eWeaponAttachPoint]
787
794
  * @returns
788
795
  */
789
- doesPedHaveRifle(p1) {
790
- return inv('0x95CA12E2C68043E5', this.ped.handle, p1);
796
+ getWeaponAttachPoint(attachPoint) {
797
+ return inv('0xCAD4FE9398820D24', this.ped.handle, attachPoint, rai());
791
798
  }
792
799
  /**
793
- * Puts the gun visibly in your horse's holster without having to be close to the horse. Use `_SEND_WEAPON_TO_INVENTORY` before using this native
794
- * _A* or _B*
795
- *
796
- * @param weaponHash Refer to [enum: eWeaponHash]
797
- * @param ped
800
+ * @param p2
801
+ * @param attachPoint Refer to [enum: eWeaponAttachPoint]
802
+ * @param p4
803
+ * @returns weaponHash: Refer to [enum: eWeaponHash]
798
804
  */
799
- N_0x14FF0C2545527F9B(weaponHash, ped) {
800
- inv('0x14FF0C2545527F9B', this.ped.handle, weaponHash, ped.handle);
805
+ getCurrentPedWeapon(p2, attachPoint, p4) {
806
+ const result = inv('0x3A87E44BB9A01D54', this.ped.handle, pvi(), p2, attachPoint, p4, rai());
807
+ return [!!result[0], result[1]];
801
808
  }
802
809
  /**
803
- * Returns iSpinHash / iVariationSpin
810
+ * Returns whether the ped has a revolver p1: 0 or 1
804
811
  *
805
- * @param weaponEmoteVariation
812
+ * @param p1
806
813
  * @returns
807
814
  */
808
- getPedGunSpinningHashFromWeaponEmoteVariation(weaponEmoteVariation) {
809
- return (inv('0xF3B1620B920D1708', this.ped.handle, weaponEmoteVariation, rai())) & 0xFFFFFFFF;
815
+ doesPedHaveRevolver(p1) {
816
+ return inv('0x5B235F24472F2C3B', this.ped.handle, p1);
810
817
  }
811
818
  /**
812
- * Returns whether the ped has a repeater p1: 0 or 1
819
+ * Returns emote Hash
813
820
  *
814
- * @param p1
815
821
  * @returns
816
822
  */
817
- doesPedHaveRepeater(p1) {
818
- return inv('0x495A04CAEC263AF8', this.ped.handle, p1);
819
- }
820
- /**
821
- * @param weaponCollection
822
- */
823
- giveWeaponCollectionToPed(weaponCollection) {
824
- inv('0x899A04AFCC725D04', this.ped.handle, _h(weaponCollection));
823
+ get PedGunSpinningEquippedKitEmoteTwirl() {
824
+ return (inv('0x2C4FEC3D0EFA9FC0', this.ped.handle, rai())) & 0xFFFFFFFF;
825
825
  }
826
826
  /**
827
827
  * @param toggle
@@ -832,7 +832,7 @@ export class Weapon {
832
832
  /**
833
833
  * @returns ammo; inventoryUid
834
834
  */
835
- getAmmoInClipByInventoryUid() {
835
+ get AmmoInClipByInventoryUid() {
836
836
  const result = inv('0x678F00858980F516', this.ped.handle, pvi(), pvi());
837
837
  return [result[0], result[1], result[2]];
838
838
  }
@@ -851,7 +851,7 @@ export class Weapon {
851
851
  *
852
852
  * @param disableAnim
853
853
  */
854
- setPedWeaponOnBack(disableAnim) {
854
+ set PedWeaponOnBack(disableAnim) {
855
855
  inv('0x4820A6939D7CEF28', this.ped.handle, disableAnim);
856
856
  }
857
857
  /**
@@ -871,13 +871,13 @@ export class Weapon {
871
871
  /**
872
872
  * @param attachPoint Refer to [enum: eWeaponAttachPoint]
873
873
  */
874
- setForceCurrentWeaponIntoCockedState(attachPoint) {
874
+ set ForceCurrentWeaponIntoCockedState(attachPoint) {
875
875
  inv('0x5230D3F6EE56CFE6', this.ped.handle, attachPoint);
876
876
  }
877
877
  /**
878
878
  * @returns
879
879
  */
880
- getPedHogtieWeapon() {
880
+ get PedHogtieWeapon() {
881
881
  return (inv('0x90EB1CB189923587', this.ped.handle, rai())) & 0xFFFFFFFF;
882
882
  }
883
883
  /**
@@ -894,13 +894,13 @@ export class Weapon {
894
894
  *
895
895
  * @param emoteType
896
896
  */
897
- setGunSpinningInventorySlotIdActivate(emoteType) {
897
+ set GunSpinningInventorySlotIdActivate(emoteType) {
898
898
  inv('0x408CF580C5E96D49', this.ped.handle, emoteType);
899
899
  }
900
900
  /**
901
901
  * @returns weaponHash: Refer to [enum: eWeaponHash]
902
902
  */
903
- getCurrentPedVehicleWeapon() {
903
+ get CurrentPedVehicleWeapon() {
904
904
  const result = inv('0x1017582BCD3832DC', this.ped.handle, pvi(), rai());
905
905
  return [!!result[0], result[1]];
906
906
  }
@@ -929,6 +929,6 @@ export class Weapon {
929
929
  * @returns
930
930
  */
931
931
  hasPedGotWeapon(weaponHash, p2, onlyCheckPlayerInventory) {
932
- return inv('0x8DECB02F88F428BC', this.ped.handle, weaponHash, p2, onlyCheckPlayerInventory, rai());
932
+ return !!inv('0x8DECB02F88F428BC', this.ped.handle, weaponHash, p2, onlyCheckPlayerInventory, rai());
933
933
  }
934
934
  }