@nativewrappers/redm-codegen 0.0.3 → 0.0.4

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 (205) hide show
  1. package/dist/classes/AnimScene.d.ts +82 -82
  2. package/dist/classes/AnimScene.d.ts.map +1 -1
  3. package/dist/classes/AnimScene.js +124 -124
  4. package/dist/classes/BaseModel.d.ts +29 -29
  5. package/dist/classes/BaseModel.d.ts.map +1 -1
  6. package/dist/classes/BaseModel.js +43 -43
  7. package/dist/classes/BaseTask.d.ts +43 -43
  8. package/dist/classes/BaseTask.d.ts.map +1 -1
  9. package/dist/classes/BaseTask.js +53 -53
  10. package/dist/classes/Cam.d.ts +82 -82
  11. package/dist/classes/Cam.d.ts.map +1 -1
  12. package/dist/classes/Cam.js +115 -115
  13. package/dist/classes/Entity.d.ts +250 -250
  14. package/dist/classes/Entity.d.ts.map +1 -1
  15. package/dist/classes/Entity.js +350 -350
  16. package/dist/classes/Interior.d.ts +27 -27
  17. package/dist/classes/Interior.d.ts.map +1 -1
  18. package/dist/classes/Interior.js +42 -42
  19. package/dist/classes/Ped.d.ts +55 -55
  20. package/dist/classes/Ped.d.ts.map +1 -1
  21. package/dist/classes/Ped.js +76 -76
  22. package/dist/classes/PedTask.d.ts +797 -797
  23. package/dist/classes/PedTask.d.ts.map +1 -1
  24. package/dist/classes/PedTask.js +1023 -1023
  25. package/dist/classes/PersChar.d.ts +13 -13
  26. package/dist/classes/PersChar.d.ts.map +1 -1
  27. package/dist/classes/PersChar.js +27 -27
  28. package/dist/classes/Pickup.d.ts +8 -8
  29. package/dist/classes/Pickup.d.ts.map +1 -1
  30. package/dist/classes/Pickup.js +15 -15
  31. package/dist/classes/Player.d.ts +185 -185
  32. package/dist/classes/Player.d.ts.map +1 -1
  33. package/dist/classes/Player.js +251 -251
  34. package/dist/classes/Prop.d.ts +130 -130
  35. package/dist/classes/Prop.d.ts.map +1 -1
  36. package/dist/classes/Prop.js +188 -188
  37. package/dist/classes/PropSet.d.ts +17 -17
  38. package/dist/classes/PropSet.d.ts.map +1 -1
  39. package/dist/classes/PropSet.js +25 -25
  40. package/dist/classes/VehicleTask.d.ts +23 -23
  41. package/dist/classes/VehicleTask.d.ts.map +1 -1
  42. package/dist/classes/VehicleTask.js +30 -30
  43. package/dist/classes/Volume.d.ts +39 -39
  44. package/dist/classes/Volume.d.ts.map +1 -1
  45. package/dist/classes/Volume.js +54 -54
  46. package/dist/classes/Weapon.d.ts +291 -291
  47. package/dist/classes/Weapon.d.ts.map +1 -1
  48. package/dist/classes/Weapon.js +414 -414
  49. package/dist/namespaces/Animscene.d.ts +63 -63
  50. package/dist/namespaces/Animscene.d.ts.map +1 -1
  51. package/dist/namespaces/Animscene.js +83 -83
  52. package/dist/namespaces/Audio.d.ts +464 -464
  53. package/dist/namespaces/Audio.d.ts.map +1 -1
  54. package/dist/namespaces/Audio.js +650 -650
  55. package/dist/namespaces/Bounty.d.ts +57 -57
  56. package/dist/namespaces/Bounty.d.ts.map +1 -1
  57. package/dist/namespaces/Bounty.js +90 -90
  58. package/dist/namespaces/CamStatics.d.ts +426 -426
  59. package/dist/namespaces/CamStatics.d.ts.map +1 -1
  60. package/dist/namespaces/CamStatics.js +609 -609
  61. package/dist/namespaces/Collection.d.ts +81 -81
  62. package/dist/namespaces/Collection.d.ts.map +1 -1
  63. package/dist/namespaces/Collection.js +113 -113
  64. package/dist/namespaces/Compendium.d.ts +38 -38
  65. package/dist/namespaces/Compendium.d.ts.map +1 -1
  66. package/dist/namespaces/Compendium.js +52 -52
  67. package/dist/namespaces/Crashlog.d.ts +10 -10
  68. package/dist/namespaces/Crashlog.d.ts.map +1 -1
  69. package/dist/namespaces/Crashlog.js +14 -14
  70. package/dist/namespaces/Databinding.d.ts +174 -174
  71. package/dist/namespaces/Databinding.d.ts.map +1 -1
  72. package/dist/namespaces/Databinding.js +266 -266
  73. package/dist/namespaces/EntityStatics.d.ts +110 -110
  74. package/dist/namespaces/EntityStatics.d.ts.map +1 -1
  75. package/dist/namespaces/EntityStatics.js +146 -146
  76. package/dist/namespaces/Graphics.d.ts +547 -547
  77. package/dist/namespaces/Graphics.d.ts.map +1 -1
  78. package/dist/namespaces/Graphics.js +731 -731
  79. package/dist/namespaces/Hud.d.ts +395 -395
  80. package/dist/namespaces/Hud.d.ts.map +1 -1
  81. package/dist/namespaces/Hud.js +564 -564
  82. package/dist/namespaces/InteriorStatics.d.ts +40 -40
  83. package/dist/namespaces/InteriorStatics.d.ts.map +1 -1
  84. package/dist/namespaces/InteriorStatics.js +56 -56
  85. package/dist/namespaces/Inventory.d.ts +107 -107
  86. package/dist/namespaces/Inventory.d.ts.map +1 -1
  87. package/dist/namespaces/Inventory.js +149 -149
  88. package/dist/namespaces/Itemdatabase.d.ts +5 -5
  89. package/dist/namespaces/Itemdatabase.d.ts.map +1 -1
  90. package/dist/namespaces/Itemdatabase.js +7 -7
  91. package/dist/namespaces/Map.d.ts +173 -173
  92. package/dist/namespaces/Map.d.ts.map +1 -1
  93. package/dist/namespaces/Map.js +240 -240
  94. package/dist/namespaces/Minigame.d.ts +56 -56
  95. package/dist/namespaces/Minigame.d.ts.map +1 -1
  96. package/dist/namespaces/Minigame.js +80 -80
  97. package/dist/namespaces/Network.d.ts +964 -964
  98. package/dist/namespaces/Network.d.ts.map +1 -1
  99. package/dist/namespaces/Network.js +1333 -1333
  100. package/dist/namespaces/Object.d.ts +240 -240
  101. package/dist/namespaces/Object.d.ts.map +1 -1
  102. package/dist/namespaces/Object.js +337 -337
  103. package/dist/namespaces/Pad.d.ts +95 -95
  104. package/dist/namespaces/Pad.d.ts.map +1 -1
  105. package/dist/namespaces/Pad.js +127 -127
  106. package/dist/namespaces/PedStatics.d.ts +18 -18
  107. package/dist/namespaces/PedStatics.d.ts.map +1 -1
  108. package/dist/namespaces/PedStatics.js +26 -26
  109. package/dist/namespaces/Perschar.d.ts +46 -46
  110. package/dist/namespaces/Perschar.d.ts.map +1 -1
  111. package/dist/namespaces/Perschar.js +66 -66
  112. package/dist/namespaces/Physics.d.ts +207 -207
  113. package/dist/namespaces/Physics.d.ts.map +1 -1
  114. package/dist/namespaces/Physics.js +315 -315
  115. package/dist/namespaces/PlayerStatics.d.ts +68 -68
  116. package/dist/namespaces/PlayerStatics.d.ts.map +1 -1
  117. package/dist/namespaces/PlayerStatics.js +95 -95
  118. package/dist/namespaces/Population.d.ts +86 -86
  119. package/dist/namespaces/Population.d.ts.map +1 -1
  120. package/dist/namespaces/Population.js +116 -116
  121. package/dist/namespaces/Posse.d.ts +43 -43
  122. package/dist/namespaces/Posse.d.ts.map +1 -1
  123. package/dist/namespaces/Posse.js +67 -67
  124. package/dist/namespaces/Propset.d.ts +59 -59
  125. package/dist/namespaces/Propset.d.ts.map +1 -1
  126. package/dist/namespaces/Propset.js +81 -81
  127. package/dist/namespaces/Shapetest.d.ts +11 -11
  128. package/dist/namespaces/Shapetest.d.ts.map +1 -1
  129. package/dist/namespaces/Shapetest.js +13 -13
  130. package/dist/namespaces/Stats.d.ts +90 -90
  131. package/dist/namespaces/Stats.d.ts.map +1 -1
  132. package/dist/namespaces/Stats.js +127 -127
  133. package/dist/namespaces/Streaming.d.ts +127 -127
  134. package/dist/namespaces/Streaming.d.ts.map +1 -1
  135. package/dist/namespaces/Streaming.js +193 -193
  136. package/dist/namespaces/Task.d.ts +346 -346
  137. package/dist/namespaces/Task.d.ts.map +1 -1
  138. package/dist/namespaces/Task.js +525 -525
  139. package/dist/namespaces/Telemetry.d.ts +176 -176
  140. package/dist/namespaces/Telemetry.d.ts.map +1 -1
  141. package/dist/namespaces/Telemetry.js +255 -255
  142. package/dist/namespaces/VolumeStatics.d.ts +64 -64
  143. package/dist/namespaces/VolumeStatics.d.ts.map +1 -1
  144. package/dist/namespaces/VolumeStatics.js +85 -85
  145. package/dist/namespaces/Water.d.ts +27 -27
  146. package/dist/namespaces/Water.d.ts.map +1 -1
  147. package/dist/namespaces/Water.js +41 -41
  148. package/dist/namespaces/WeaponStatics.d.ts +234 -234
  149. package/dist/namespaces/WeaponStatics.d.ts.map +1 -1
  150. package/dist/namespaces/WeaponStatics.js +320 -320
  151. package/dist/namespaces/Zone.d.ts +7 -7
  152. package/dist/namespaces/Zone.d.ts.map +1 -1
  153. package/dist/namespaces/Zone.js +9 -9
  154. package/package.json +1 -1
  155. package/src/classes/AnimScene.ts +133 -133
  156. package/src/classes/BaseModel.ts +50 -50
  157. package/src/classes/BaseTask.ts +55 -55
  158. package/src/classes/Cam.ts +126 -126
  159. package/src/classes/Entity.ts +365 -365
  160. package/src/classes/Interior.ts +43 -43
  161. package/src/classes/Ped.ts +86 -86
  162. package/src/classes/PedTask.ts +2067 -2067
  163. package/src/classes/PersChar.ts +34 -34
  164. package/src/classes/Pickup.ts +16 -16
  165. package/src/classes/Player.ts +296 -296
  166. package/src/classes/Prop.ts +203 -203
  167. package/src/classes/PropSet.ts +29 -29
  168. package/src/classes/VehicleTask.ts +32 -32
  169. package/src/classes/Volume.ts +61 -61
  170. package/src/classes/Weapon.ts +427 -427
  171. package/src/namespaces/Animscene.ts +86 -86
  172. package/src/namespaces/Audio.ts +760 -760
  173. package/src/namespaces/Bounty.ts +102 -102
  174. package/src/namespaces/CamStatics.ts +631 -631
  175. package/src/namespaces/Collection.ts +114 -114
  176. package/src/namespaces/Compendium.ts +59 -59
  177. package/src/namespaces/Crashlog.ts +16 -16
  178. package/src/namespaces/Databinding.ts +282 -282
  179. package/src/namespaces/EntityStatics.ts +158 -158
  180. package/src/namespaces/Graphics.ts +1140 -1140
  181. package/src/namespaces/Hud.ts +592 -592
  182. package/src/namespaces/InteriorStatics.ts +64 -64
  183. package/src/namespaces/Inventory.ts +165 -165
  184. package/src/namespaces/Itemdatabase.ts +8 -8
  185. package/src/namespaces/Map.ts +256 -256
  186. package/src/namespaces/Minigame.ts +92 -92
  187. package/src/namespaces/Network.ts +1392 -1392
  188. package/src/namespaces/Object.ts +350 -350
  189. package/src/namespaces/Pad.ts +127 -127
  190. package/src/namespaces/PedStatics.ts +30 -30
  191. package/src/namespaces/Perschar.ts +76 -76
  192. package/src/namespaces/Physics.ts +327 -327
  193. package/src/namespaces/PlayerStatics.ts +103 -103
  194. package/src/namespaces/Population.ts +131 -131
  195. package/src/namespaces/Posse.ts +67 -67
  196. package/src/namespaces/Propset.ts +92 -92
  197. package/src/namespaces/Shapetest.ts +14 -14
  198. package/src/namespaces/Stats.ts +143 -143
  199. package/src/namespaces/Streaming.ts +226 -226
  200. package/src/namespaces/Task.ts +498 -498
  201. package/src/namespaces/Telemetry.ts +261 -261
  202. package/src/namespaces/VolumeStatics.ts +87 -87
  203. package/src/namespaces/Water.ts +47 -47
  204. package/src/namespaces/WeaponStatics.ts +325 -325
  205. package/src/namespaces/Zone.ts +10 -10
@@ -93,715 +93,750 @@ export class Weapon {
93
93
  }
94
94
 
95
95
  /**
96
- * @param weaponHash Refer to [enum: eWeaponHash]
97
- * @returns ammo
96
+ * Returns ammoHash from weaponObject (Returned by 0x6CA484C9A7377E4F)
97
+ *
98
+ * @param weaponObject
99
+ * @returns
98
100
  */
99
- getAmmoInClip(weaponHash: eWeaponHash): [boolean, number] {
100
- const result = inv<[boolean, number]>('0x2E1202248937775C', this.ped.handle, pvi(), weaponHash, rai());
101
- return [!!result[0], result[1]];
101
+ getCurrentPedWeaponAmmoType(weaponObject: Prop): number {
102
+ return (inv<number>('0x7E7B19A4355FEE13', this.ped.handle, weaponObject.handle, rai())) & 0xFFFFFFFF;
102
103
  }
103
104
 
104
105
  /**
105
- * @param toggle
106
+ * @param p1
107
+ * @param p2
108
+ * @param p3
109
+ * @returns
106
110
  */
107
- N_0x16D9841A85FA627E(toggle: boolean): void {
108
- inv<void>('0x16D9841A85FA627E', this.ped.handle, toggle);
111
+ getPedWorstWeapon(p1: boolean, p2: boolean, p3: boolean): number {
112
+ return (inv<number>('0xDA37A053C1522F5D', this.ped.handle, p1, p2, p3, rai())) & 0xFFFFFFFF;
109
113
  }
110
114
 
111
115
  /**
112
- * @param weaponHash Refer to [enum: eWeaponHash]
113
- * @param offset
114
- * @param ammoCount
116
+ * @param toggle
115
117
  */
116
- setPedDropsInventoryWeapon(weaponHash: eWeaponHash, offset: Vector3, ammoCount: number): void {
117
- inv<void>('0x208A1888007FC0E6', this.ped.handle, weaponHash, f(offset.x), f(offset.y), f(offset.z), ammoCount);
118
+ setPedDropsWeaponsWhenDead(toggle: boolean): void {
119
+ inv<void>('0x476AE72C1D19D1A8', this.ped.handle, toggle);
118
120
  }
119
121
 
120
122
  /**
121
- * spinHash can be -1, 0 to disable
123
+ * Returns ammoHash
122
124
  *
123
- * @param weaponEmoteTrickType
124
- * @param spin
125
+ * @returns Returns the [enum: eAmmoType]; weaponGuid
125
126
  */
126
- setActiveGunSpinningKitEmoteTwirl(weaponEmoteTrickType: number, spin: string | number): void {
127
- inv<void>('0x01F661BB9C71B465', this.ped.handle, weaponEmoteTrickType, _h(spin));
127
+ getCurrentAmmoTypeFromGuid(): [number, number] {
128
+ const result = inv<[number, number]>('0xAF9D167A5656D6A6', this.ped.handle, pvi(), rai());
129
+ return [result[0] & 0xFFFFFFFF, result[1]];
128
130
  }
129
131
 
130
132
  /**
131
- * Appears to just send specified weapon to your horse holster without having to be close
132
- * However, the weapon is not visible on the horse holster, but you can reach the weapon on the weapon wheel
133
- *
134
- * @param weaponHash Refer to [enum: eWeaponHash]
133
+ * @param toggle
135
134
  */
136
- sendWeaponToInventory(weaponHash: eWeaponHash): void {
137
- inv<void>('0xE9BD19F8121ADE3E', this.ped.handle, weaponHash);
135
+ setPedInfiniteAmmoClip(toggle: boolean): void {
136
+ inv<void>('0xFBAA1E06B6BCA741', this.ped.handle, toggle);
138
137
  }
139
138
 
140
139
  /**
141
- * If near your horse when called, weapons stored on your horse will be considered
142
- * Returns weaponHash
140
+ * returns the amount of peds that were restrained with the weapon thrown bolas
143
141
  *
144
- * @param weaponGroup
145
- * @param p2
146
- * @param p3
147
142
  * @returns
148
143
  */
149
- getBestPedWeaponInGroup(weaponGroup: string | number, p2: boolean, p3: boolean): number {
150
- return (inv<number>('0x9F67929D98E7C6E8', this.ped.handle, _h(weaponGroup), p2, p3, rai())) & 0xFFFFFFFF;
144
+ getNumPedsRestrainedFromWeaponBolas(): any {
145
+ return inv<number>('0x46D42883E873C1D7', this.ped.handle);
151
146
  }
152
147
 
153
148
  /**
154
- * Only used in R* SP Scripts native_son2, native_son3 and smuggler2
155
- * Params: p2 = -1
149
+ * Stores longarms to your horse on dismount
150
+ * Params: p2 = 0
151
+ * SET_[I - M]*
156
152
  *
157
- * @param p1
153
+ * @param storeLongarms
158
154
  * @param p2
159
155
  */
160
- N_0x8A779706DA5CA3DD(p1: boolean, p2: number): void {
161
- inv<void>('0x8A779706DA5CA3DD', this.ped.handle, p1, p2);
162
- }
163
-
164
- /**
165
- * @param weaponHash Refer to [enum: eWeaponHash]
166
- * @param ammoHash Refer to [enum: eAmmoType]
167
- */
168
- disableAmmoTypeForPedWeapon(weaponHash: eWeaponHash, ammoHash: eAmmoType): void {
169
- inv<void>('0xF0D728EEA3C99775', this.ped.handle, weaponHash, ammoHash);
156
+ setInstantlyStoreLongarmsOnDismount(storeLongarms: boolean, p2: number): void {
157
+ inv<void>('0xB832F1A686B9B810', this.ped.handle, storeLongarms, p2);
170
158
  }
171
159
 
172
160
  /**
173
- * @returns data; outData
161
+ * @param removeReason Refer to [enum: eRemoveItemReason]
162
+ * @returns weaponGuid
174
163
  */
175
- giveWeaponToPedWithOptions(): [boolean, number, number] {
176
- const result = inv<[boolean, number, number]>('0xBE7E42B07FD317AC', this.ped.handle, pvi(), pvi(), rai());
177
- return [!!result[0], result[1], result[2]];
164
+ removeWeaponFromPedByGuid(removeReason: eRemoveItemReason): number {
165
+ const result = inv<number>('0x51C3B71591811485', this.ped.handle, pvi(), removeReason);
166
+ return result;
178
167
  }
179
168
 
180
169
  /**
181
- * @returns
170
+ * attachPoint:
171
+ *
172
+ * @param weaponHash Refer to [enum: eWeaponHash]
173
+ * @param equipNow
174
+ * @param attachPoint Refer to [enum: eWeaponAttachPoint]
175
+ * @param p4
176
+ * @param p5
182
177
  */
183
- getMaxLockonDistanceOfCurrentPedWeapon(): number {
184
- return inv<number>('0x79B1A6E780266DB0', this.ped.handle, raf());
178
+ setCurrentPedWeapon(weaponHash: eWeaponHash, equipNow: boolean, attachPoint: number, p4: boolean, p5: boolean): void {
179
+ inv<void>('0xADF692B254977C0C', this.ped.handle, weaponHash, equipNow, attachPoint, p4, p5);
185
180
  }
186
181
 
187
182
  /**
188
- * @returns
183
+ * Equips a weapon from a weaponItem, similar to GIVE_WEAPON_TO_PED
184
+ *
185
+ * @param p2
186
+ * @param p3
187
+ * @param p4
188
+ * @param p5
189
+ * @returns weaponUid
189
190
  */
190
- getAllowDualWield(): any {
191
- return inv<number>('0x918990BD9CE08582', this.ped.handle);
191
+ setCurrentPedWeaponByGuid(p2: boolean, p3: boolean, p4: boolean, p5: boolean): number {
192
+ const result = inv<number>('0x12FB95FE3D579238', this.ped.handle, pvi(), p2, p3, p4, p5);
193
+ return result;
192
194
  }
193
195
 
194
196
  /**
195
- * Returns eCurrentHeldWeapon
196
- * _GET_R* - _GET_T*
197
- *
197
+ * @param componentHash
198
+ * @param weaponHash Refer to [enum: eWeaponHash]
198
199
  * @returns
199
200
  */
200
- getPedCurrentHeldWeapon(): number {
201
- return (inv<number>('0x8425C5F057012DAB', this.ped.handle, rai())) & 0xFFFFFFFF;
201
+ hasPedGotWeaponComponent(componentHash: string | number, weaponHash: eWeaponHash): any {
202
+ return inv<number>('0xBBC67A6F965C688A', this.ped.handle, _h(componentHash), weaponHash);
202
203
  }
203
204
 
204
205
  /**
205
- * @param toggle
206
+ * @param weaponHash Refer to [enum: eWeaponHash]
207
+ * @param amount The amount of ped to add to the ammo
208
+ * @param addReason Refer to [enum: eAddItemReason]
206
209
  */
207
- setForceAutoEquip(toggle: boolean): void {
208
- inv<void>('0xBE711B14A159E84F', this.ped.handle, toggle);
210
+ addAmmoToPed(weaponHash: eWeaponHash, amount: number, addReason: eAddItemReason): void {
211
+ inv<void>('0xB190BCA3F4042F95', this.ped.handle, weaponHash, amount, addReason);
209
212
  }
210
213
 
211
214
  /**
212
- * @param weaponHash Refer to [enum: eWeaponHash]
213
- * @param ammo
215
+ * @param ammoType
216
+ * @param amount
217
+ * @param addReason Refer to [enum: eAddItemReason]
214
218
  */
215
- setPedAmmo(weaponHash: eWeaponHash, ammo: number): void {
216
- inv<void>('0x14E56BC5B5DB6A19', this.ped.handle, weaponHash, ammo);
219
+ addAmmoToPedByType(ammoType: string | number, amount: number, addReason: eAddItemReason): void {
220
+ inv<void>('0x106A811C6D3035F3', this.ped.handle, _h(ammoType), amount, addReason);
217
221
  }
218
222
 
219
223
  /**
220
- * Gives the ped the weapon.
221
- * 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
222
- * 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
223
- *
224
- * @param weaponHash Refer to [enum: eWeaponHash]
225
- * @param ammoCount
226
- * @param bForceInHand
227
- * @param bForceInHolster
228
- * @param attachPoint Refer to [enum: eWeaponAttachPoint]
229
- * @param bAllowMultipleCopies
230
- * @param p7
231
- * @param p8
232
- * @param addReason Refer to [enum: eAddItemReason]
233
- * @param bIgnoreUnlocks
234
- * @param permanentDegradation
235
- * @param p12
224
+ * @param targetPed
236
225
  * @returns
237
226
  */
238
- 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 {
239
- return (inv<number>('0x5E3BDDBCB83F3D84', this.ped.handle, weaponHash, ammoCount, bForceInHand, bForceInHolster, attachPoint, bAllowMultipleCopies, f(p7), f(p8), addReason, bIgnoreUnlocks, f(permanentDegradation), p12, rai())) & 0xFFFFFFFF;
227
+ isTargetPedConstrainedByPedUsingBolas(targetPed: Ped): boolean {
228
+ return inv<boolean>('0x8D50F43298AB9545', this.ped.handle, targetPed.handle, rai());
240
229
  }
241
230
 
242
231
  /**
243
- * @param weaponHash Refer to [enum: eWeaponHash]
244
- * @returns
232
+ * @param p1
233
+ * @returns guidPrimary
245
234
  */
246
- getAmmoInPedWeapon(weaponHash: eWeaponHash): number {
247
- return inv<number>('0x015A522136D7F951', this.ped.handle, weaponHash, rai());
235
+ getBestPedWeaponInInventory(p1: any): [any, number] {
236
+ const result = inv<[number, number]>('0x7B98500614C8E8B8', this.ped.handle, p1, pvi());
237
+ return [result[0], result[1]];
248
238
  }
249
239
 
250
240
  /**
251
- * @param attachPoint Refer to [enum: eWeaponAttachPoint]
252
- * @returns weaponGuid
241
+ * @param weaponHash Refer to [enum: eWeaponHash]
253
242
  */
254
- getPedWeaponGuidAtAttachPoint(attachPoint: number): [any, number] {
255
- const result = inv<[number, number]>('0x6929E22158E52265', this.ped.handle, attachPoint, pvi());
256
- return [result[0], result[1]];
243
+ enableAmmoTypeForPed(weaponHash: eWeaponHash): void {
244
+ inv<void>('0x3B7B7908B7ADFB4B', this.ped.handle, weaponHash);
257
245
  }
258
246
 
259
247
  /**
260
- * @param toggle
248
+ * Detaches the weapon from the ped and actually removes the ped's weapon
249
+ *
250
+ * @param p1
251
+ * @returns
261
252
  */
262
- setAllowAnyWeaponDrop(toggle: boolean): void {
263
- inv<void>('0x78030C7867D8B9B6', this.ped.handle, toggle);
253
+ getWeaponObjectFromPed(p1: boolean): Prop | null {
254
+ return createFromHandle<Prop>('Prop', inv<number>('0xC6A6789BB405D11C', this.ped.handle, p1, rai()));
264
255
  }
265
256
 
266
257
  /**
267
258
  * @returns
268
259
  */
269
- makePedReload(): any {
270
- return inv<number>('0x79E1E511FF7EFB13', this.ped.handle);
260
+ isPedCurrentWeaponHolstered(): any {
261
+ return inv<number>('0xBDD9C235D8D1052E', this.ped.handle);
271
262
  }
272
263
 
273
264
  /**
274
- * @param weaponHash Refer to [enum: eWeaponHash]
275
- * @param ammoCount
276
- * @param p3
277
- * @param addReason Refer to [enum: eAddItemReason]
265
+ * @param toggle
278
266
  */
279
- giveDelayedWeaponToPed(weaponHash: eWeaponHash, ammoCount: number, p3: boolean, addReason: eAddItemReason): void {
280
- inv<void>('0xB282DC6EBD803C75', this.ped.handle, weaponHash, ammoCount, p3, addReason);
267
+ setInstantlyEquipWeaponPickups(toggle: boolean): void {
268
+ inv<void>('0x739B9C6D0E7F7F93', this.ped.handle, toggle);
281
269
  }
282
270
 
283
271
  /**
272
+ * Hides the ped's weapon during a cutscene.
273
+ *
284
274
  * @param toggle
285
275
  */
286
- N_0x45E57FDD531C9477(toggle: boolean): void {
287
- inv<void>('0x45E57FDD531C9477', this.ped.handle, toggle);
276
+ hidePedWeaponForScriptedCutscene(toggle: boolean): void {
277
+ inv<void>('0x6F6981D2253C208F', this.ped.handle, toggle);
288
278
  }
289
279
 
290
280
  /**
291
- * @param ammoHash Refer to [enum: eAmmoType]
292
- * @returns weaponInventoryUid
281
+ * @returns guidPrimary; guidSecondary
293
282
  */
294
- setAmmoTypeForPedWeaponInventory(ammoHash: eAmmoType): number {
295
- const result = inv<number>('0xEBE46B501BC3FBCF', this.ped.handle, pvi(), ammoHash);
296
- return result;
283
+ setPlayerPedQuickSwapWeaponByGuid(): [number, number] {
284
+ const result = inv<[number, number]>('0xEC1F85DA51D3D6C4', this.ped.handle, pvi(), pvi());
285
+ return [result[0], result[1]];
297
286
  }
298
287
 
299
288
  /**
300
- * @param weaponHash Refer to [enum: eWeaponHash]
301
- * @param p2
302
- * @param removeReason Refer to [enum: eRemoveItemReason]
289
+ * @returns Returns the total ammo in the ped weapon from it's guid, or `0`.; guid
303
290
  */
304
- removeWeaponFromPed(weaponHash: eWeaponHash, p2: boolean, removeReason: eRemoveItemReason): void {
305
- inv<void>('0x4899CB088EDF59B8', this.ped.handle, weaponHash, p2, removeReason);
291
+ getAmmoInPedWeaponFromGuid(): [number, number] {
292
+ const result = inv<[number, number]>('0x4823F13A21F51964', this.ped.handle, pvi(), rai());
293
+ return [result[0], result[1]];
306
294
  }
307
295
 
308
296
  /**
309
- * @param visible
297
+ * @param p1
298
+ * @param p2
310
299
  */
311
- setPedAllWeaponsVisibility(visible: boolean): void {
312
- inv<void>('0x4F806A6CFED89468', this.ped.handle, visible);
300
+ removeAllPedWeapons(p1: boolean, p2: boolean): void {
301
+ inv<void>('0xF25DF915FA38C5F3', this.ped.handle, p1, p2);
313
302
  }
314
303
 
315
304
  /**
316
- * @param weaponHash Refer to [enum: eWeaponHash]
317
- * @param ammo
318
- * @returns
305
+ * @param ammoHash Refer to [enum: eAmmoType]
319
306
  */
320
- setAmmoInClip(weaponHash: eWeaponHash, ammo: number): boolean {
321
- return inv<boolean>('0xDCD2A934D65CB497', this.ped.handle, weaponHash, ammo, rai());
307
+ disableAmmoTypeForPed(ammoHash: eAmmoType): void {
308
+ inv<void>('0xAA5A52204E077883', this.ped.handle, ammoHash);
322
309
  }
323
310
 
324
311
  /**
325
- * _GET_M* - _GET_PED_A*
312
+ * Returns whether the ped has a shotgun p1: 0 or 1
326
313
  *
327
314
  * @param p1
328
315
  * @returns
329
316
  */
330
- getPedWeaponObject(p1: boolean): Prop | null {
331
- return createFromHandle<Prop>('Prop', inv<number>('0x6CA484C9A7377E4F', this.ped.handle, p1, rai()));
317
+ doesPedHaveShotgun(p1: number): any {
318
+ return inv<number>('0xABC18A28BAD4B46F', this.ped.handle, p1);
319
+ }
320
+
321
+ clearPedLastWeaponDamage(): void {
322
+ inv<void>('0x087D8F4BC65F68E4', this.ped.handle);
332
323
  }
333
324
 
334
325
  /**
335
- * slotHash is usually just the weaponHash name, but WEAPON_* is replaced with SLOT_*
326
+ * Returns true if ped is on a horse while inside of a town
327
+ * Params: p1 = 0
328
+ * GET_L* - GET_MA*
336
329
  *
337
- * @param slotHash
330
+ * @param p1
338
331
  * @returns
339
332
  */
340
- getPedWeaponInSlot(slotHash: string | number): number {
341
- return (inv<number>('0xDBC4B552B2AE9A83', this.ped.handle, _h(slotHash), rai())) & 0xFFFFFFFF;
333
+ N_0x5A695BD328586B44(p1: number): any {
334
+ return inv<number>('0x5A695BD328586B44', this.ped.handle, p1);
342
335
  }
343
336
 
344
337
  /**
345
- * Outputs cached guids
346
- *
347
- * @returns guidPrimary; guidSecondary
338
+ * @param weaponHash Refer to [enum: eWeaponHash]
339
+ * @param amount
340
+ * @param removeReason Refer to [enum: eRemoveItemReason]
348
341
  */
349
- getPlayerPedQuickSwapWeaponByGuid(): [number, number] {
350
- const result = inv<[number, number]>('0xB7E52A058B07C7E2', this.ped.handle, pvi(), pvi());
351
- return [result[0], result[1]];
342
+ removeAmmoFromPed(weaponHash: eWeaponHash, amount: number, removeReason: eRemoveItemReason): void {
343
+ inv<void>('0xF4823C813CB8277D', this.ped.handle, weaponHash, amount, removeReason);
352
344
  }
353
345
 
354
346
  /**
355
- * Returns true if the ped is currently holstering or unholstering a weapon
356
- *
357
- * @returns
347
+ * @param p1
348
+ * @param p2
358
349
  */
359
- isWeaponHolsterStateChanging(): boolean {
360
- return inv<boolean>('0x2387D6E9C6B478AA', this.ped.handle, rai());
350
+ setPedAmmoToDrop(p1: number, p2: number): void {
351
+ inv<void>('0xA4EFEF9440A5B0EF', this.ped.handle, p1, p2);
361
352
  }
362
353
 
363
354
  /**
364
- * @param ammoHash Refer to [enum: eAmmoType]
355
+ * Returns the current ammo type of the specified ped's specified weapon.
356
+ *
357
+ * @param weaponHash Refer to [enum: eWeaponHash]
365
358
  * @returns
366
359
  */
367
- N_0x44C8F4908F1B2622(ammoHash: eAmmoType): boolean {
368
- return inv<boolean>('0x44C8F4908F1B2622', this.ped.handle, ammoHash, rai());
360
+ getPedAmmoTypeFromWeapon(weaponHash: eWeaponHash): number {
361
+ return (inv<number>('0x7FEAD38B326B9F74', this.ped.handle, weaponHash, rai())) & 0xFFFFFFFF;
369
362
  }
370
363
 
371
364
  /**
372
- * @param p2
373
- * @returns clipInventoryUid
365
+ * @param weaponHash Refer to [enum: eWeaponHash]
366
+ * @returns ammo
374
367
  */
375
- refillAmmoInClip(p2: number): [any, number] {
376
- const result = inv<[number, number]>('0xDF4A3404D022ADDE', this.ped.handle, pvi(), p2);
377
- return [result[0], result[1]];
368
+ getMaxAmmo(weaponHash: eWeaponHash): [boolean, number] {
369
+ const result = inv<[boolean, number]>('0xDC16122C7A20C933', this.ped.handle, pvi(), weaponHash, rai());
370
+ return [!!result[0], result[1]];
378
371
  }
379
372
 
380
373
  /**
381
- * _SET_A* - _SET_B*
374
+ * emote hashes: KIT_EMOTE_TWIRL_GUN, KIT_EMOTE_TWIRL_GUN_LEFT_HOLSTER, KIT_EMOTE_TWIRL_GUN_DUAL, 0 (to unequip)
382
375
  *
383
- * @param p1
376
+ * @param emote
384
377
  */
385
- N_0x2EBF70E1D8C06683(p1: string | number): void {
386
- inv<void>('0x2EBF70E1D8C06683', this.ped.handle, _h(p1));
378
+ setActiveGunSpinningEquipKitEmoteTwirl(emote: string | number): void {
379
+ inv<void>('0xCBCFFF805F1B4596', this.ped.handle, _h(emote));
387
380
  }
388
381
 
389
382
  /**
390
- * @param ammoHash Refer to [enum: eAmmoType]
383
+ * @returns
391
384
  */
392
- disableAmmoTypeForPed(ammoHash: eAmmoType): void {
393
- inv<void>('0xAA5A52204E077883', this.ped.handle, ammoHash);
385
+ enableWeaponRestore(): any {
386
+ return inv<number>('0xC395355843BE134B', this.ped.handle);
394
387
  }
395
388
 
396
389
  /**
397
- * Returns whether the ped has a shotgun p1: 0 or 1
390
+ * Returns whether the specified ped is holding a weapon with the given hash.
391
+ * only these weapons below return true
392
+ * WEAPON_BOW, WEAPON_KIT_METAL_DETECTOR, WEAPON_MELEE_CLEAVER, WEAPON_MELEE_DAVY_LANTERN, WEAPON_MELEE_HATCHET, WEAPON_MELEE_HATCHET_HUNTER, WEAPON_MELEE_KNIFE_JAWBONE, WEAPON_MELEE_LANTERN WEAPON_MELEE_TORCH, WEAPON_MOONSHINEJUG_MP, WEAPON_RIFLE_BOLTACTION, WEAPON_SHOTGUN_PUMP, WEAPON_THROWN_BOLAS, WEAPON_THROWN_MOLOTOV
398
393
  *
399
- * @param p1
394
+ * @param weapon
400
395
  * @returns
401
396
  */
402
- doesPedHaveShotgun(p1: number): any {
403
- return inv<number>('0xABC18A28BAD4B46F', this.ped.handle, p1);
404
- }
405
-
406
- clearPedLastWeaponDamage(): void {
407
- inv<void>('0x087D8F4BC65F68E4', this.ped.handle);
397
+ isPedHoldingWeapon(weapon: string | number): boolean {
398
+ return inv<boolean>('0x07E1C35F0078C3F9', this.ped.handle, _h(weapon), rai());
408
399
  }
409
400
 
410
401
  /**
411
- * Returns true if ped is on a horse while inside of a town
412
- * Params: p1 = 0
413
- * GET_L* - GET_MA*
402
+ * _GET_D* - _GET_L*
414
403
  *
415
- * @param p1
416
404
  * @returns
417
405
  */
418
- N_0x5A695BD328586B44(p1: number): any {
419
- return inv<number>('0x5A695BD328586B44', this.ped.handle, p1);
406
+ N_0x0DE0944ECCB3DF5D(): boolean {
407
+ return inv<boolean>('0x0DE0944ECCB3DF5D', this.ped.handle, rai());
420
408
  }
421
409
 
422
410
  /**
423
- * @param weaponHash Refer to [enum: eWeaponHash]
424
- * @param amount
425
- * @param removeReason Refer to [enum: eRemoveItemReason]
411
+ * @param flags
412
+ * @returns
426
413
  */
427
- removeAmmoFromPed(weaponHash: eWeaponHash, amount: number, removeReason: eRemoveItemReason): void {
428
- inv<void>('0xF4823C813CB8277D', this.ped.handle, weaponHash, amount, removeReason);
414
+ isPedArmed(flags: number): any {
415
+ return inv<number>('0xCB690F680A3EA971', this.ped.handle, flags);
429
416
  }
430
417
 
431
418
  /**
419
+ * Returns whether the ped has a sniper p1: 0 or 1
420
+ *
432
421
  * @param p1
433
- * @param p2
422
+ * @returns
434
423
  */
435
- setPedAmmoToDrop(p1: number, p2: number): void {
436
- inv<void>('0xA4EFEF9440A5B0EF', this.ped.handle, p1, p2);
424
+ doesPedHaveSniper(p1: number): any {
425
+ return inv<number>('0x80BB243789008A82', this.ped.handle, p1);
437
426
  }
438
427
 
439
428
  /**
440
- * Returns the current ammo type of the specified ped's specified weapon.
429
+ * Returns the ped's default unarmed weapon hash as defined in CPedModelInfo (DefaultUnarmedWeapon).
430
+ * Falls back to WEAPON_UNARMED if the ped doesn't have a valid model info pointer, or 0 if the ped doesn't exist.
441
431
  *
442
- * @param weaponHash Refer to [enum: eWeaponHash]
443
432
  * @returns
444
433
  */
445
- getPedAmmoTypeFromWeapon(weaponHash: eWeaponHash): number {
446
- return (inv<number>('0x7FEAD38B326B9F74', this.ped.handle, weaponHash, rai())) & 0xFFFFFFFF;
434
+ getDefaultUnarmedWeaponHash(): number {
435
+ return (inv<number>('0x08FF1099ED2E6E21', this.ped.handle, rai())) & 0xFFFFFFFF;
447
436
  }
448
437
 
449
438
  /**
450
439
  * @param weaponHash Refer to [enum: eWeaponHash]
451
- * @returns ammo
440
+ * @param p2
441
+ * @returns
452
442
  */
453
- getMaxAmmo(weaponHash: eWeaponHash): [boolean, number] {
454
- const result = inv<[boolean, number]>('0xDC16122C7A20C933', this.ped.handle, pvi(), weaponHash, rai());
455
- return [!!result[0], result[1]];
443
+ getMaxAmmoInClip(weaponHash: eWeaponHash, p2: boolean): number {
444
+ return inv<number>('0xA38DCFFCEA8962FA', this.ped.handle, weaponHash, p2, rai());
456
445
  }
457
446
 
458
447
  /**
459
- * @param weaponHash Refer to [enum: eWeaponHash]
448
+ * @param attachPoint Refer to [enum: eWeaponAttachPoint]
449
+ * @returns Returns the weapon entity
460
450
  */
461
- enableAmmoTypeForPed(weaponHash: eWeaponHash): void {
462
- inv<void>('0x3B7B7908B7ADFB4B', this.ped.handle, weaponHash);
451
+ getCurrentPedWeaponEntityIndex(attachPoint: number): Entity | null {
452
+ return createFromHandle<Entity>('Entity', inv<number>('0x3B390A939AF0B5FC', this.ped.handle, attachPoint, rai()));
463
453
  }
464
454
 
465
455
  /**
466
- * Detaches the weapon from the ped and actually removes the ped's weapon
467
- *
468
- * @param p1
469
456
  * @returns
470
457
  */
471
- getWeaponObjectFromPed(p1: boolean): Prop | null {
472
- return createFromHandle<Prop>('Prop', inv<number>('0xC6A6789BB405D11C', this.ped.handle, p1, rai()));
458
+ isPedWeaponReadyToShoot(): boolean {
459
+ return inv<boolean>('0xB80CA294F2F26749', this.ped.handle, rai());
473
460
  }
474
461
 
475
462
  /**
476
- * @returns
463
+ * @param componentHash
464
+ * @param weaponHash Refer to [enum: eWeaponHash]
477
465
  */
478
- isPedCurrentWeaponHolstered(): any {
479
- return inv<number>('0xBDD9C235D8D1052E', this.ped.handle);
466
+ removeWeaponComponentFromPed(componentHash: string | number, weaponHash: eWeaponHash): void {
467
+ inv<void>('0x19F70C4D80494FF8', this.ped.handle, _h(componentHash), weaponHash);
480
468
  }
481
469
 
482
470
  /**
483
- * @param toggle
471
+ * @param visible
472
+ * @param deselectWeapon
473
+ * @param p3
474
+ * @param p4
484
475
  */
485
- setInstantlyEquipWeaponPickups(toggle: boolean): void {
486
- inv<void>('0x739B9C6D0E7F7F93', this.ped.handle, toggle);
476
+ setPedCurrentWeaponVisible(visible: boolean, deselectWeapon: boolean, p3: boolean, p4: boolean): void {
477
+ inv<void>('0x0725A4CCFDED9A70', this.ped.handle, visible, deselectWeapon, p3, p4);
487
478
  }
488
479
 
489
480
  /**
490
- * Hides the ped's weapon during a cutscene.
481
+ * Old name: _DROP_CURRENT_PED_WEAPON
491
482
  *
492
- * @param toggle
483
+ * @param p1
484
+ * @param attachPoint Refer to [enum: eWeaponAttachPoint]
485
+ * @param p3
486
+ * @param p4
487
+ * @returns
493
488
  */
494
- hidePedWeaponForScriptedCutscene(toggle: boolean): void {
495
- inv<void>('0x6F6981D2253C208F', this.ped.handle, toggle);
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()));
491
+ }
492
+
493
+ removeAllPedAmmo(): void {
494
+ inv<void>('0x1B83C0DEEBCBB214', this.ped.handle);
496
495
  }
497
496
 
498
497
  /**
499
- * @returns guidPrimary; guidSecondary
498
+ * @param allow
500
499
  */
501
- setPlayerPedQuickSwapWeaponByGuid(): [number, number] {
502
- const result = inv<[number, number]>('0xEC1F85DA51D3D6C4', this.ped.handle, pvi(), pvi());
503
- return [result[0], result[1]];
500
+ setAllowDualWield(allow: boolean): void {
501
+ inv<void>('0x83B8D50EB9446BBA', this.ped.handle, allow);
504
502
  }
505
503
 
506
504
  /**
507
- * @returns Returns the total ammo in the ped weapon from it's guid, or `0`.; guid
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
508
516
  */
509
- getAmmoInPedWeaponFromGuid(): [number, number] {
510
- const result = inv<[number, number]>('0x4823F13A21F51964', this.ped.handle, pvi(), rai());
511
- return [result[0], result[1]];
517
+ getWeaponEmoteVariation(variation: number): number {
518
+ return inv<number>('0x86147D05FA831D3A', this.ped.handle, variation, rai());
512
519
  }
513
520
 
514
521
  /**
515
- * @param p1
516
- * @param p2
522
+ * @param weaponHash Refer to [enum: eWeaponHash]
523
+ * @returns
517
524
  */
518
- removeAllPedWeapons(p1: boolean, p2: boolean): void {
519
- inv<void>('0xF25DF915FA38C5F3', this.ped.handle, p1, p2);
525
+ isPedCarryingWeapon(weaponHash: eWeaponHash): any {
526
+ return inv<number>('0xF29A186ED428B552', this.ped.handle, weaponHash);
520
527
  }
521
528
 
522
529
  /**
523
- * Returns ammoHash from weaponObject (Returned by 0x6CA484C9A7377E4F)
524
- *
525
- * @param weaponObject
526
530
  * @returns
527
531
  */
528
- getCurrentPedWeaponAmmoType(weaponObject: Prop): number {
529
- return (inv<number>('0x7E7B19A4355FEE13', this.ped.handle, weaponObject.handle, rai())) & 0xFFFFFFFF;
532
+ refillAmmoInCurrentPedWeapon(): any {
533
+ return inv<number>('0x0A2AB7B7ABC055F4', this.ped.handle);
530
534
  }
531
535
 
532
536
  /**
533
- * @param p1
534
- * @param p2
535
- * @param p3
536
- * @returns
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
540
+ *
541
+ * @param p0
542
+ * @param immediately
537
543
  */
538
- getPedWorstWeapon(p1: boolean, p2: boolean, p3: boolean): number {
539
- return (inv<number>('0xDA37A053C1522F5D', this.ped.handle, p1, p2, p3, rai())) & 0xFFFFFFFF;
544
+ hidePedWeapons(p0: number, immediately: boolean): void {
545
+ inv<void>('0xFCCC886EDE3C63EC', this.ped.handle, p0, immediately);
546
+ }
547
+
548
+ /**
549
+ * @param weaponHash Refer to [enum: eWeaponHash]
550
+ * @returns ammo
551
+ */
552
+ getAmmoInClip(weaponHash: eWeaponHash): [boolean, number] {
553
+ const result = inv<[boolean, number]>('0x2E1202248937775C', this.ped.handle, pvi(), weaponHash, rai());
554
+ return [!!result[0], result[1]];
540
555
  }
541
556
 
542
557
  /**
543
558
  * @param toggle
544
559
  */
545
- setPedDropsWeaponsWhenDead(toggle: boolean): void {
546
- inv<void>('0x476AE72C1D19D1A8', this.ped.handle, toggle);
560
+ N_0x16D9841A85FA627E(toggle: boolean): void {
561
+ inv<void>('0x16D9841A85FA627E', this.ped.handle, toggle);
547
562
  }
548
563
 
549
564
  /**
550
- * Returns ammoHash
551
- *
552
- * @returns Returns the [enum: eAmmoType]; weaponGuid
565
+ * @param weaponHash Refer to [enum: eWeaponHash]
566
+ * @param offset
567
+ * @param ammoCount
553
568
  */
554
- getCurrentAmmoTypeFromGuid(): [number, number] {
555
- const result = inv<[number, number]>('0xAF9D167A5656D6A6', this.ped.handle, pvi(), rai());
556
- return [result[0] & 0xFFFFFFFF, result[1]];
569
+ setPedDropsInventoryWeapon(weaponHash: eWeaponHash, offset: Vector3, ammoCount: number): void {
570
+ inv<void>('0x208A1888007FC0E6', this.ped.handle, weaponHash, f(offset.x), f(offset.y), f(offset.z), ammoCount);
557
571
  }
558
572
 
559
573
  /**
560
- * @param toggle
574
+ * spinHash can be -1, 0 to disable
575
+ *
576
+ * @param weaponEmoteTrickType
577
+ * @param spin
561
578
  */
562
- setPedInfiniteAmmoClip(toggle: boolean): void {
563
- inv<void>('0xFBAA1E06B6BCA741', this.ped.handle, toggle);
579
+ setActiveGunSpinningKitEmoteTwirl(weaponEmoteTrickType: number, spin: string | number): void {
580
+ inv<void>('0x01F661BB9C71B465', this.ped.handle, weaponEmoteTrickType, _h(spin));
564
581
  }
565
582
 
566
583
  /**
567
- * returns the amount of peds that were restrained with the weapon thrown bolas
584
+ * Appears to just send specified weapon to your horse holster without having to be close
585
+ * However, the weapon is not visible on the horse holster, but you can reach the weapon on the weapon wheel
568
586
  *
569
- * @returns
587
+ * @param weaponHash Refer to [enum: eWeaponHash]
570
588
  */
571
- getNumPedsRestrainedFromWeaponBolas(): any {
572
- return inv<number>('0x46D42883E873C1D7', this.ped.handle);
589
+ sendWeaponToInventory(weaponHash: eWeaponHash): void {
590
+ inv<void>('0xE9BD19F8121ADE3E', this.ped.handle, weaponHash);
573
591
  }
574
592
 
575
593
  /**
576
- * emote hashes: KIT_EMOTE_TWIRL_GUN, KIT_EMOTE_TWIRL_GUN_LEFT_HOLSTER, KIT_EMOTE_TWIRL_GUN_DUAL, 0 (to unequip)
594
+ * If near your horse when called, weapons stored on your horse will be considered
595
+ * Returns weaponHash
577
596
  *
578
- * @param emote
597
+ * @param weaponGroup
598
+ * @param p2
599
+ * @param p3
600
+ * @returns
579
601
  */
580
- setActiveGunSpinningEquipKitEmoteTwirl(emote: string | number): void {
581
- inv<void>('0xCBCFFF805F1B4596', this.ped.handle, _h(emote));
602
+ getBestPedWeaponInGroup(weaponGroup: string | number, p2: boolean, p3: boolean): number {
603
+ return (inv<number>('0x9F67929D98E7C6E8', this.ped.handle, _h(weaponGroup), p2, p3, rai())) & 0xFFFFFFFF;
582
604
  }
583
605
 
584
606
  /**
585
- * Stores longarms to your horse on dismount
586
- * Params: p2 = 0
587
- * SET_[I - M]*
607
+ * Only used in R* SP Scripts native_son2, native_son3 and smuggler2
608
+ * Params: p2 = -1
588
609
  *
589
- * @param storeLongarms
610
+ * @param p1
590
611
  * @param p2
591
612
  */
592
- setInstantlyStoreLongarmsOnDismount(storeLongarms: boolean, p2: number): void {
593
- inv<void>('0xB832F1A686B9B810', this.ped.handle, storeLongarms, p2);
613
+ N_0x8A779706DA5CA3DD(p1: boolean, p2: number): void {
614
+ inv<void>('0x8A779706DA5CA3DD', this.ped.handle, p1, p2);
594
615
  }
595
616
 
596
617
  /**
597
- * @param removeReason Refer to [enum: eRemoveItemReason]
598
- * @returns weaponGuid
618
+ * @param weaponHash Refer to [enum: eWeaponHash]
619
+ * @param ammoHash Refer to [enum: eAmmoType]
599
620
  */
600
- removeWeaponFromPedByGuid(removeReason: eRemoveItemReason): number {
601
- const result = inv<number>('0x51C3B71591811485', this.ped.handle, pvi(), removeReason);
602
- return result;
621
+ disableAmmoTypeForPedWeapon(weaponHash: eWeaponHash, ammoHash: eAmmoType): void {
622
+ inv<void>('0xF0D728EEA3C99775', this.ped.handle, weaponHash, ammoHash);
623
+ }
624
+
625
+ /**
626
+ * @returns data; outData
627
+ */
628
+ giveWeaponToPedWithOptions(): [boolean, number, number] {
629
+ const result = inv<[boolean, number, number]>('0xBE7E42B07FD317AC', this.ped.handle, pvi(), pvi(), rai());
630
+ return [!!result[0], result[1], result[2]];
631
+ }
632
+
633
+ /**
634
+ * @returns
635
+ */
636
+ getMaxLockonDistanceOfCurrentPedWeapon(): number {
637
+ return inv<number>('0x79B1A6E780266DB0', this.ped.handle, raf());
638
+ }
639
+
640
+ /**
641
+ * @param visible
642
+ */
643
+ setPedAllWeaponsVisibility(visible: boolean): void {
644
+ inv<void>('0x4F806A6CFED89468', this.ped.handle, visible);
603
645
  }
604
646
 
605
647
  /**
606
- * attachPoint:
607
- *
608
648
  * @param weaponHash Refer to [enum: eWeaponHash]
609
- * @param equipNow
610
- * @param attachPoint Refer to [enum: eWeaponAttachPoint]
611
- * @param p4
612
- * @param p5
649
+ * @param ammo
650
+ * @returns
613
651
  */
614
- setCurrentPedWeapon(weaponHash: eWeaponHash, equipNow: boolean, attachPoint: number, p4: boolean, p5: boolean): void {
615
- inv<void>('0xADF692B254977C0C', this.ped.handle, weaponHash, equipNow, attachPoint, p4, p5);
652
+ setAmmoInClip(weaponHash: eWeaponHash, ammo: number): boolean {
653
+ return inv<boolean>('0xDCD2A934D65CB497', this.ped.handle, weaponHash, ammo, rai());
616
654
  }
617
655
 
618
656
  /**
619
- * Equips a weapon from a weaponItem, similar to GIVE_WEAPON_TO_PED
657
+ * _GET_M* - _GET_PED_A*
620
658
  *
621
- * @param p2
622
- * @param p3
623
- * @param p4
624
- * @param p5
625
- * @returns weaponUid
659
+ * @param p1
660
+ * @returns
626
661
  */
627
- setCurrentPedWeaponByGuid(p2: boolean, p3: boolean, p4: boolean, p5: boolean): number {
628
- const result = inv<number>('0x12FB95FE3D579238', this.ped.handle, pvi(), p2, p3, p4, p5);
629
- return result;
662
+ getPedWeaponObject(p1: boolean): Prop | null {
663
+ return createFromHandle<Prop>('Prop', inv<number>('0x6CA484C9A7377E4F', this.ped.handle, p1, rai()));
630
664
  }
631
665
 
632
666
  /**
633
- * @param componentHash
634
- * @param weaponHash Refer to [enum: eWeaponHash]
667
+ * slotHash is usually just the weaponHash name, but WEAPON_* is replaced with SLOT_*
668
+ *
669
+ * @param slotHash
635
670
  * @returns
636
671
  */
637
- hasPedGotWeaponComponent(componentHash: string | number, weaponHash: eWeaponHash): any {
638
- return inv<number>('0xBBC67A6F965C688A', this.ped.handle, _h(componentHash), weaponHash);
672
+ getPedWeaponInSlot(slotHash: string | number): number {
673
+ return (inv<number>('0xDBC4B552B2AE9A83', this.ped.handle, _h(slotHash), rai())) & 0xFFFFFFFF;
639
674
  }
640
675
 
641
676
  /**
642
- * @param weaponHash Refer to [enum: eWeaponHash]
643
- * @param amount The amount of ped to add to the ammo
644
- * @param addReason Refer to [enum: eAddItemReason]
677
+ * Outputs cached guids
678
+ *
679
+ * @returns guidPrimary; guidSecondary
645
680
  */
646
- addAmmoToPed(weaponHash: eWeaponHash, amount: number, addReason: eAddItemReason): void {
647
- inv<void>('0xB190BCA3F4042F95', this.ped.handle, weaponHash, amount, addReason);
681
+ getPlayerPedQuickSwapWeaponByGuid(): [number, number] {
682
+ const result = inv<[number, number]>('0xB7E52A058B07C7E2', this.ped.handle, pvi(), pvi());
683
+ return [result[0], result[1]];
648
684
  }
649
685
 
650
686
  /**
651
- * @param ammoType
652
- * @param amount
653
- * @param addReason Refer to [enum: eAddItemReason]
687
+ * Returns true if the ped is currently holstering or unholstering a weapon
688
+ *
689
+ * @returns
654
690
  */
655
- addAmmoToPedByType(ammoType: string | number, amount: number, addReason: eAddItemReason): void {
656
- inv<void>('0x106A811C6D3035F3', this.ped.handle, _h(ammoType), amount, addReason);
691
+ isWeaponHolsterStateChanging(): boolean {
692
+ return inv<boolean>('0x2387D6E9C6B478AA', this.ped.handle, rai());
657
693
  }
658
694
 
659
695
  /**
660
- * @param targetPed
696
+ * @param ammoHash Refer to [enum: eAmmoType]
661
697
  * @returns
662
698
  */
663
- isTargetPedConstrainedByPedUsingBolas(targetPed: Ped): boolean {
664
- return inv<boolean>('0x8D50F43298AB9545', this.ped.handle, targetPed.handle, rai());
699
+ N_0x44C8F4908F1B2622(ammoHash: eAmmoType): boolean {
700
+ return inv<boolean>('0x44C8F4908F1B2622', this.ped.handle, ammoHash, rai());
665
701
  }
666
702
 
667
703
  /**
668
- * @param p1
669
- * @returns guidPrimary
704
+ * @param p2
705
+ * @returns clipInventoryUid
670
706
  */
671
- getBestPedWeaponInInventory(p1: any): [any, number] {
672
- const result = inv<[number, number]>('0x7B98500614C8E8B8', this.ped.handle, p1, pvi());
707
+ refillAmmoInClip(p2: number): [any, number] {
708
+ const result = inv<[number, number]>('0xDF4A3404D022ADDE', this.ped.handle, pvi(), p2);
673
709
  return [result[0], result[1]];
674
710
  }
675
711
 
676
712
  /**
677
- * @param toggle
713
+ * _SET_A* - _SET_B*
714
+ *
715
+ * @param p1
678
716
  */
679
- N_0xF08D8FEB455F2C8C(toggle: boolean): void {
680
- inv<void>('0xF08D8FEB455F2C8C', this.ped.handle, toggle);
717
+ N_0x2EBF70E1D8C06683(p1: string | number): void {
718
+ inv<void>('0x2EBF70E1D8C06683', this.ped.handle, _h(p1));
681
719
  }
682
720
 
683
721
  /**
684
- * @returns ammo; inventoryUid
722
+ * @returns
685
723
  */
686
- getAmmoInClipByInventoryUid(): [any, number, number] {
687
- const result = inv<[number, number, number]>('0x678F00858980F516', this.ped.handle, pvi(), pvi());
688
- return [result[0], result[1], result[2]];
724
+ getAllowDualWield(): any {
725
+ return inv<number>('0x918990BD9CE08582', this.ped.handle);
689
726
  }
690
727
 
691
728
  /**
692
- * removeReason must be REMOVE_REASON_USED, REMOVE_REASON_GIVEN, REMOVE_REASON_DROPPED or REMOVE_REASON_DEBUG, unless amount is -1
729
+ * Returns eCurrentHeldWeapon
730
+ * _GET_R* - _GET_T*
693
731
  *
694
- * @param ammoHash Refer to [enum: eAmmoType]
695
- * @param amount
696
- * @param removeReason Refer to [enum: eRemoveItemReason]
732
+ * @returns
697
733
  */
698
- removeAmmoFromPedByType(ammoHash: eAmmoType, amount: number, removeReason: eRemoveItemReason): void {
699
- inv<void>('0xB6CFEC32E3742779', this.ped.handle, ammoHash, amount, removeReason);
734
+ getPedCurrentHeldWeapon(): number {
735
+ return (inv<number>('0x8425C5F057012DAB', this.ped.handle, rai())) & 0xFFFFFFFF;
700
736
  }
701
737
 
702
738
  /**
703
- * Holster the holded shoulder weapon. Precisions: 0 means with anim while 1 means direct holster
704
- *
705
- * @param disableAnim
739
+ * @param toggle
706
740
  */
707
- setPedWeaponOnBack(disableAnim: boolean): void {
708
- inv<void>('0x4820A6939D7CEF28', this.ped.handle, disableAnim);
741
+ setForceAutoEquip(toggle: boolean): void {
742
+ inv<void>('0xBE711B14A159E84F', this.ped.handle, toggle);
709
743
  }
710
744
 
711
745
  /**
712
- * @param ammoType
746
+ * @param weaponHash Refer to [enum: eWeaponHash]
713
747
  * @param ammo
714
748
  */
715
- setPedAmmoByType(ammoType: string | number, ammo: number): void {
716
- inv<void>('0x5FD1E1F011E76D7E', this.ped.handle, _h(ammoType), ammo);
749
+ setPedAmmo(weaponHash: eWeaponHash, ammo: number): void {
750
+ inv<void>('0x14E56BC5B5DB6A19', this.ped.handle, weaponHash, ammo);
717
751
  }
718
752
 
719
753
  /**
720
- * @param p1
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
757
+ *
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
721
770
  * @returns
722
771
  */
723
- getPedBackupWeapon(p1: boolean): number {
724
- return (inv<number>('0xC71FE230A513C30F', this.ped.handle, p1, rai())) & 0xFFFFFFFF;
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;
725
774
  }
726
775
 
727
776
  /**
728
- * @param attachPoint Refer to [enum: eWeaponAttachPoint]
777
+ * @param weaponHash Refer to [enum: eWeaponHash]
778
+ * @returns
729
779
  */
730
- setForceCurrentWeaponIntoCockedState(attachPoint: number): void {
731
- inv<void>('0x5230D3F6EE56CFE6', this.ped.handle, attachPoint);
780
+ getAmmoInPedWeapon(weaponHash: eWeaponHash): number {
781
+ return inv<number>('0x015A522136D7F951', this.ped.handle, weaponHash, rai());
732
782
  }
733
783
 
734
784
  /**
735
- * @returns
785
+ * @param attachPoint Refer to [enum: eWeaponAttachPoint]
786
+ * @returns weaponGuid
736
787
  */
737
- enableWeaponRestore(): any {
738
- return inv<number>('0xC395355843BE134B', this.ped.handle);
788
+ getPedWeaponGuidAtAttachPoint(attachPoint: number): [any, number] {
789
+ const result = inv<[number, number]>('0x6929E22158E52265', this.ped.handle, attachPoint, pvi());
790
+ return [result[0], result[1]];
739
791
  }
740
792
 
741
793
  /**
742
- * Returns whether the specified ped is holding a weapon with the given hash.
743
- * only these weapons below return true
744
- * WEAPON_BOW, WEAPON_KIT_METAL_DETECTOR, WEAPON_MELEE_CLEAVER, WEAPON_MELEE_DAVY_LANTERN, WEAPON_MELEE_HATCHET, WEAPON_MELEE_HATCHET_HUNTER, WEAPON_MELEE_KNIFE_JAWBONE, WEAPON_MELEE_LANTERN WEAPON_MELEE_TORCH, WEAPON_MOONSHINEJUG_MP, WEAPON_RIFLE_BOLTACTION, WEAPON_SHOTGUN_PUMP, WEAPON_THROWN_BOLAS, WEAPON_THROWN_MOLOTOV
745
- *
746
- * @param weapon
747
- * @returns
794
+ * @param toggle
748
795
  */
749
- isPedHoldingWeapon(weapon: string | number): boolean {
750
- return inv<boolean>('0x07E1C35F0078C3F9', this.ped.handle, _h(weapon), rai());
796
+ setAllowAnyWeaponDrop(toggle: boolean): void {
797
+ inv<void>('0x78030C7867D8B9B6', this.ped.handle, toggle);
751
798
  }
752
799
 
753
800
  /**
754
- * _GET_D* - _GET_L*
755
- *
756
801
  * @returns
757
802
  */
758
- N_0x0DE0944ECCB3DF5D(): boolean {
759
- return inv<boolean>('0x0DE0944ECCB3DF5D', this.ped.handle, rai());
803
+ makePedReload(): any {
804
+ return inv<number>('0x79E1E511FF7EFB13', this.ped.handle);
760
805
  }
761
806
 
762
807
  /**
763
- * @param flags
764
- * @returns
808
+ * @param weaponHash Refer to [enum: eWeaponHash]
809
+ * @param ammoCount
810
+ * @param p3
811
+ * @param addReason Refer to [enum: eAddItemReason]
765
812
  */
766
- isPedArmed(flags: number): any {
767
- return inv<number>('0xCB690F680A3EA971', this.ped.handle, flags);
813
+ giveDelayedWeaponToPed(weaponHash: eWeaponHash, ammoCount: number, p3: boolean, addReason: eAddItemReason): void {
814
+ inv<void>('0xB282DC6EBD803C75', this.ped.handle, weaponHash, ammoCount, p3, addReason);
768
815
  }
769
816
 
770
817
  /**
771
- * Returns whether the ped has a sniper p1: 0 or 1
772
- *
773
- * @param p1
774
- * @returns
818
+ * @param toggle
775
819
  */
776
- doesPedHaveSniper(p1: number): any {
777
- return inv<number>('0x80BB243789008A82', this.ped.handle, p1);
820
+ N_0x45E57FDD531C9477(toggle: boolean): void {
821
+ inv<void>('0x45E57FDD531C9477', this.ped.handle, toggle);
778
822
  }
779
823
 
780
824
  /**
781
- * Returns the ped's default unarmed weapon hash as defined in CPedModelInfo (DefaultUnarmedWeapon).
782
- * Falls back to WEAPON_UNARMED if the ped doesn't have a valid model info pointer, or 0 if the ped doesn't exist.
783
- *
784
- * @returns
825
+ * @param ammoHash Refer to [enum: eAmmoType]
826
+ * @returns weaponInventoryUid
785
827
  */
786
- getDefaultUnarmedWeaponHash(): number {
787
- return (inv<number>('0x08FF1099ED2E6E21', this.ped.handle, rai())) & 0xFFFFFFFF;
828
+ setAmmoTypeForPedWeaponInventory(ammoHash: eAmmoType): number {
829
+ const result = inv<number>('0xEBE46B501BC3FBCF', this.ped.handle, pvi(), ammoHash);
830
+ return result;
788
831
  }
789
832
 
790
833
  /**
791
834
  * @param weaponHash Refer to [enum: eWeaponHash]
792
835
  * @param p2
793
- * @returns
794
- */
795
- getMaxAmmoInClip(weaponHash: eWeaponHash, p2: boolean): number {
796
- return inv<number>('0xA38DCFFCEA8962FA', this.ped.handle, weaponHash, p2, rai());
797
- }
798
-
799
- /**
800
- * @param attachPoint Refer to [enum: eWeaponAttachPoint]
801
- * @returns Returns the weapon entity
836
+ * @param removeReason Refer to [enum: eRemoveItemReason]
802
837
  */
803
- getCurrentPedWeaponEntityIndex(attachPoint: number): Entity | null {
804
- return createFromHandle<Entity>('Entity', inv<number>('0x3B390A939AF0B5FC', this.ped.handle, attachPoint, rai()));
838
+ removeWeaponFromPed(weaponHash: eWeaponHash, p2: boolean, removeReason: eRemoveItemReason): void {
839
+ inv<void>('0x4899CB088EDF59B8', this.ped.handle, weaponHash, p2, removeReason);
805
840
  }
806
841
 
807
842
  /**
@@ -904,96 +939,61 @@ export class Weapon {
904
939
  }
905
940
 
906
941
  /**
907
- * @returns
908
- */
909
- isPedWeaponReadyToShoot(): boolean {
910
- return inv<boolean>('0xB80CA294F2F26749', this.ped.handle, rai());
911
- }
912
-
913
- /**
914
- * @param componentHash
915
- * @param weaponHash Refer to [enum: eWeaponHash]
942
+ * @param toggle
916
943
  */
917
- removeWeaponComponentFromPed(componentHash: string | number, weaponHash: eWeaponHash): void {
918
- inv<void>('0x19F70C4D80494FF8', this.ped.handle, _h(componentHash), weaponHash);
944
+ N_0xF08D8FEB455F2C8C(toggle: boolean): void {
945
+ inv<void>('0xF08D8FEB455F2C8C', this.ped.handle, toggle);
919
946
  }
920
947
 
921
948
  /**
922
- * @param visible
923
- * @param deselectWeapon
924
- * @param p3
925
- * @param p4
949
+ * @returns ammo; inventoryUid
926
950
  */
927
- setPedCurrentWeaponVisible(visible: boolean, deselectWeapon: boolean, p3: boolean, p4: boolean): void {
928
- inv<void>('0x0725A4CCFDED9A70', this.ped.handle, visible, deselectWeapon, p3, p4);
951
+ getAmmoInClipByInventoryUid(): [any, number, number] {
952
+ const result = inv<[number, number, number]>('0x678F00858980F516', this.ped.handle, pvi(), pvi());
953
+ return [result[0], result[1], result[2]];
929
954
  }
930
955
 
931
956
  /**
932
- * Old name: _DROP_CURRENT_PED_WEAPON
957
+ * removeReason must be REMOVE_REASON_USED, REMOVE_REASON_GIVEN, REMOVE_REASON_DROPPED or REMOVE_REASON_DEBUG, unless amount is -1
933
958
  *
934
- * @param p1
935
- * @param attachPoint Refer to [enum: eWeaponAttachPoint]
936
- * @param p3
937
- * @param p4
938
- * @returns
939
- */
940
- makePedDropWeapon(p1: boolean, attachPoint: number, p3: boolean, p4: boolean): Entity | null {
941
- return createFromHandle<Entity>('Entity', inv<number>('0xCEF4C65DE502D367', this.ped.handle, p1, attachPoint, p3, p4, rai()));
942
- }
943
-
944
- removeAllPedAmmo(): void {
945
- inv<void>('0x1B83C0DEEBCBB214', this.ped.handle);
946
- }
947
-
948
- /**
949
- * @param allow
959
+ * @param ammoHash Refer to [enum: eAmmoType]
960
+ * @param amount
961
+ * @param removeReason Refer to [enum: eRemoveItemReason]
950
962
  */
951
- setAllowDualWield(allow: boolean): void {
952
- inv<void>('0x83B8D50EB9446BBA', this.ped.handle, allow);
963
+ removeAmmoFromPedByType(ammoHash: eAmmoType, amount: number, removeReason: eRemoveItemReason): void {
964
+ inv<void>('0xB6CFEC32E3742779', this.ped.handle, ammoHash, amount, removeReason);
953
965
  }
954
966
 
955
967
  /**
956
- * Returns weaponEmoteVariation WEAPON_EMOTE_VARIATION_INVALID = -2,
957
- * WEAPON_EMOTE_VARIATION_BASE,
958
- * WEAPON_EMOTE_VARIATION_A,
959
- * WEAPON_EMOTE_VARIATION_B,
960
- * WEAPON_EMOTE_VARIATION_C,
961
- * WEAPON_EMOTE_VARIATION_D,
962
- * WEAPON_EMOTE_VARIATION_PREVIEW,
963
- * WEAPON_EMOTE_NUM_VARIATIONS
968
+ * Holster the holded shoulder weapon. Precisions: 0 means with anim while 1 means direct holster
964
969
  *
965
- * @param variation
966
- * @returns
970
+ * @param disableAnim
967
971
  */
968
- getWeaponEmoteVariation(variation: number): number {
969
- return inv<number>('0x86147D05FA831D3A', this.ped.handle, variation, rai());
972
+ setPedWeaponOnBack(disableAnim: boolean): void {
973
+ inv<void>('0x4820A6939D7CEF28', this.ped.handle, disableAnim);
970
974
  }
971
975
 
972
976
  /**
973
- * @param weaponHash Refer to [enum: eWeaponHash]
974
- * @returns
977
+ * @param ammoType
978
+ * @param ammo
975
979
  */
976
- isPedCarryingWeapon(weaponHash: eWeaponHash): any {
977
- return inv<number>('0xF29A186ED428B552', this.ped.handle, weaponHash);
980
+ setPedAmmoByType(ammoType: string | number, ammo: number): void {
981
+ inv<void>('0x5FD1E1F011E76D7E', this.ped.handle, _h(ammoType), ammo);
978
982
  }
979
983
 
980
984
  /**
985
+ * @param p1
981
986
  * @returns
982
987
  */
983
- refillAmmoInCurrentPedWeapon(): any {
984
- return inv<number>('0x0A2AB7B7ABC055F4', this.ped.handle);
988
+ getPedBackupWeapon(p1: boolean): number {
989
+ return (inv<number>('0xC71FE230A513C30F', this.ped.handle, p1, rai())) & 0xFFFFFFFF;
985
990
  }
986
991
 
987
992
  /**
988
- * Unequip current weapon and set current weapon to WEAPON_UNARMED.
989
- * p0 usually 2 in R* scripts. Doesn't seem to have any effect if changed....
990
- * immediately: if true it will instantly switch to unarmed
991
- *
992
- * @param p0
993
- * @param immediately
993
+ * @param attachPoint Refer to [enum: eWeaponAttachPoint]
994
994
  */
995
- hidePedWeapons(p0: number, immediately: boolean): void {
996
- inv<void>('0xFCCC886EDE3C63EC', this.ped.handle, p0, immediately);
995
+ setForceCurrentWeaponIntoCockedState(attachPoint: number): void {
996
+ inv<void>('0x5230D3F6EE56CFE6', this.ped.handle, attachPoint);
997
997
  }
998
998
 
999
999
  /**