@nativewrappers/redm-codegen 0.0.2 → 0.0.3
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.
- package/dist/classes/AnimScene.d.ts +142 -142
- package/dist/classes/AnimScene.d.ts.map +1 -1
- package/dist/classes/AnimScene.js +203 -203
- package/dist/classes/BaseModel.d.ts +29 -29
- package/dist/classes/BaseModel.d.ts.map +1 -1
- package/dist/classes/BaseModel.js +43 -43
- package/dist/classes/BaseTask.d.ts +34 -34
- package/dist/classes/BaseTask.d.ts.map +1 -1
- package/dist/classes/BaseTask.js +42 -42
- package/dist/classes/Cam.d.ts +71 -71
- package/dist/classes/Cam.d.ts.map +1 -1
- package/dist/classes/Cam.js +102 -102
- package/dist/classes/Entity.d.ts +387 -386
- package/dist/classes/Entity.d.ts.map +1 -1
- package/dist/classes/Entity.js +509 -504
- package/dist/classes/Interior.d.ts +27 -27
- package/dist/classes/Interior.d.ts.map +1 -1
- package/dist/classes/Interior.js +42 -42
- package/dist/classes/Ped.d.ts +67 -66
- package/dist/classes/Ped.d.ts.map +1 -1
- package/dist/classes/Ped.js +80 -75
- package/dist/classes/PedTask.d.ts +1518 -1518
- package/dist/classes/PedTask.d.ts.map +1 -1
- package/dist/classes/PedTask.js +1930 -1930
- package/dist/classes/PersChar.d.ts +11 -11
- package/dist/classes/PersChar.d.ts.map +1 -1
- package/dist/classes/PersChar.js +23 -23
- package/dist/classes/Pickup.d.ts +7 -7
- package/dist/classes/Pickup.d.ts.map +1 -1
- package/dist/classes/Pickup.js +13 -13
- package/dist/classes/Player.d.ts +237 -237
- package/dist/classes/Player.d.ts.map +1 -1
- package/dist/classes/Player.js +319 -319
- package/dist/classes/Prop.d.ts +105 -104
- package/dist/classes/Prop.d.ts.map +1 -1
- package/dist/classes/Prop.js +155 -150
- package/dist/classes/PropSet.d.ts +1 -1
- package/dist/classes/PropSet.d.ts.map +1 -1
- package/dist/classes/Vehicle.d.ts +1 -0
- package/dist/classes/Vehicle.d.ts.map +1 -1
- package/dist/classes/Vehicle.js +5 -0
- package/dist/classes/VehicleTask.d.ts +21 -21
- package/dist/classes/VehicleTask.d.ts.map +1 -1
- package/dist/classes/VehicleTask.js +27 -27
- package/dist/classes/Volume.d.ts +40 -40
- package/dist/classes/Volume.d.ts.map +1 -1
- package/dist/classes/Volume.js +54 -54
- package/dist/classes/Weapon.d.ts +364 -364
- package/dist/classes/Weapon.d.ts.map +1 -1
- package/dist/classes/Weapon.js +515 -515
- package/dist/namespaces/Aitransport.d.ts +77 -77
- package/dist/namespaces/Aitransport.d.ts.map +1 -1
- package/dist/namespaces/Aitransport.js +94 -94
- package/dist/namespaces/Animscene.d.ts +65 -65
- package/dist/namespaces/Animscene.d.ts.map +1 -1
- package/dist/namespaces/Animscene.js +83 -83
- package/dist/namespaces/Audio.d.ts +464 -464
- package/dist/namespaces/Audio.d.ts.map +1 -1
- package/dist/namespaces/Audio.js +651 -651
- package/dist/namespaces/Bounty.d.ts +23 -23
- package/dist/namespaces/Bounty.d.ts.map +1 -1
- package/dist/namespaces/Bounty.js +40 -40
- package/dist/namespaces/Brain.d.ts +15 -15
- package/dist/namespaces/Brain.d.ts.map +1 -1
- package/dist/namespaces/Brain.js +20 -20
- package/dist/namespaces/CamStatics.d.ts +459 -459
- package/dist/namespaces/CamStatics.d.ts.map +1 -1
- package/dist/namespaces/CamStatics.js +719 -719
- package/dist/namespaces/Collection.d.ts +78 -78
- package/dist/namespaces/Collection.d.ts.map +1 -1
- package/dist/namespaces/Collection.js +109 -109
- package/dist/namespaces/Companion.d.ts +22 -22
- package/dist/namespaces/Companion.d.ts.map +1 -1
- package/dist/namespaces/Companion.js +30 -30
- package/dist/namespaces/Compendium.d.ts +94 -94
- package/dist/namespaces/Compendium.d.ts.map +1 -1
- package/dist/namespaces/Compendium.js +126 -126
- package/dist/namespaces/Databinding.d.ts +113 -113
- package/dist/namespaces/Databinding.d.ts.map +1 -1
- package/dist/namespaces/Databinding.js +167 -167
- package/dist/namespaces/Dlc.d.ts +5 -5
- package/dist/namespaces/Dlc.d.ts.map +1 -1
- package/dist/namespaces/Dlc.js +9 -9
- package/dist/namespaces/EntityStatics.d.ts +164 -164
- package/dist/namespaces/EntityStatics.d.ts.map +1 -1
- package/dist/namespaces/EntityStatics.js +225 -225
- package/dist/namespaces/Event.d.ts +62 -62
- package/dist/namespaces/Event.d.ts.map +1 -1
- package/dist/namespaces/Event.js +82 -82
- package/dist/namespaces/Fire.d.ts +7 -7
- package/dist/namespaces/Fire.d.ts.map +1 -1
- package/dist/namespaces/Fire.js +9 -9
- package/dist/namespaces/Graphics.d.ts +688 -688
- package/dist/namespaces/Graphics.d.ts.map +1 -1
- package/dist/namespaces/Graphics.js +876 -876
- package/dist/namespaces/Hud.d.ts +456 -456
- package/dist/namespaces/Hud.d.ts.map +1 -1
- package/dist/namespaces/Hud.js +598 -598
- package/dist/namespaces/InteriorStatics.d.ts +42 -42
- package/dist/namespaces/InteriorStatics.d.ts.map +1 -1
- package/dist/namespaces/InteriorStatics.js +56 -56
- package/dist/namespaces/Inventory.d.ts +156 -156
- package/dist/namespaces/Inventory.d.ts.map +1 -1
- package/dist/namespaces/Inventory.js +210 -210
- package/dist/namespaces/Itemdatabase.d.ts +3 -3
- package/dist/namespaces/Itemdatabase.d.ts.map +1 -1
- package/dist/namespaces/Law.d.ts +2 -2
- package/dist/namespaces/Law.d.ts.map +1 -1
- package/dist/namespaces/Map.d.ts +128 -128
- package/dist/namespaces/Map.d.ts.map +1 -1
- package/dist/namespaces/Map.js +180 -180
- package/dist/namespaces/Minigame.d.ts +60 -60
- package/dist/namespaces/Minigame.d.ts.map +1 -1
- package/dist/namespaces/Minigame.js +88 -88
- package/dist/namespaces/Misc.d.ts +5 -5
- package/dist/namespaces/Misc.d.ts.map +1 -1
- package/dist/namespaces/Missiondata.d.ts +3 -3
- package/dist/namespaces/Missiondata.d.ts.map +1 -1
- package/dist/namespaces/Netshopping.d.ts +1 -1
- package/dist/namespaces/Netshopping.d.ts.map +1 -1
- package/dist/namespaces/Network.d.ts +1528 -1536
- package/dist/namespaces/Network.d.ts.map +1 -1
- package/dist/namespaces/Network.js +2196 -2204
- package/dist/namespaces/Object.d.ts +244 -244
- package/dist/namespaces/Object.d.ts.map +1 -1
- package/dist/namespaces/Object.js +355 -355
- package/dist/namespaces/Pad.d.ts +43 -43
- package/dist/namespaces/Pad.d.ts.map +1 -1
- package/dist/namespaces/Pad.js +58 -58
- package/dist/namespaces/PedStatics.d.ts +21 -21
- package/dist/namespaces/PedStatics.d.ts.map +1 -1
- package/dist/namespaces/PedStatics.js +26 -26
- package/dist/namespaces/Perschar.d.ts +62 -62
- package/dist/namespaces/Perschar.d.ts.map +1 -1
- package/dist/namespaces/Perschar.js +91 -91
- package/dist/namespaces/Persistence.d.ts +30 -30
- package/dist/namespaces/Persistence.d.ts.map +1 -1
- package/dist/namespaces/Persistence.js +42 -42
- package/dist/namespaces/Physics.d.ts +207 -207
- package/dist/namespaces/Physics.d.ts.map +1 -1
- package/dist/namespaces/Physics.js +310 -310
- package/dist/namespaces/PlayerStatics.d.ts +72 -72
- package/dist/namespaces/PlayerStatics.d.ts.map +1 -1
- package/dist/namespaces/PlayerStatics.js +103 -103
- package/dist/namespaces/Population.d.ts +88 -88
- package/dist/namespaces/Population.d.ts.map +1 -1
- package/dist/namespaces/Population.js +116 -116
- package/dist/namespaces/Posse.d.ts +49 -49
- package/dist/namespaces/Posse.d.ts.map +1 -1
- package/dist/namespaces/Posse.js +79 -79
- package/dist/namespaces/Propset.d.ts +1 -1
- package/dist/namespaces/Propset.d.ts.map +1 -1
- package/dist/namespaces/Scripts.d.ts +3 -3
- package/dist/namespaces/Scripts.d.ts.map +1 -1
- package/dist/namespaces/Shapetest.d.ts +11 -11
- package/dist/namespaces/Shapetest.d.ts.map +1 -1
- package/dist/namespaces/Shapetest.js +13 -13
- package/dist/namespaces/Socialclub.d.ts +1 -1
- package/dist/namespaces/Socialclub.d.ts.map +1 -1
- package/dist/namespaces/Stats.d.ts +174 -174
- package/dist/namespaces/Stats.d.ts.map +1 -1
- package/dist/namespaces/Stats.js +240 -240
- package/dist/namespaces/Streaming.d.ts +127 -127
- package/dist/namespaces/Streaming.d.ts.map +1 -1
- package/dist/namespaces/Streaming.js +193 -193
- package/dist/namespaces/Task.d.ts +220 -220
- package/dist/namespaces/Task.d.ts.map +1 -1
- package/dist/namespaces/Task.js +299 -299
- package/dist/namespaces/Telemetry.d.ts +188 -188
- package/dist/namespaces/Telemetry.d.ts.map +1 -1
- package/dist/namespaces/Telemetry.js +249 -249
- package/dist/namespaces/Uiapps.d.ts +24 -24
- package/dist/namespaces/Uiapps.d.ts.map +1 -1
- package/dist/namespaces/Uiapps.js +33 -33
- package/dist/namespaces/Uistickyfeed.d.ts +16 -16
- package/dist/namespaces/Uistickyfeed.d.ts.map +1 -1
- package/dist/namespaces/Uistickyfeed.js +21 -21
- package/dist/namespaces/VehicleStatics.d.ts +2 -2
- package/dist/namespaces/VehicleStatics.d.ts.map +1 -1
- package/dist/namespaces/VolumeStatics.d.ts +64 -64
- package/dist/namespaces/VolumeStatics.d.ts.map +1 -1
- package/dist/namespaces/VolumeStatics.js +85 -85
- package/dist/namespaces/WeaponStatics.d.ts +262 -262
- package/dist/namespaces/WeaponStatics.d.ts.map +1 -1
- package/dist/namespaces/WeaponStatics.js +361 -361
- package/dist/namespaces/Zone.d.ts +2 -2
- package/dist/namespaces/Zone.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/classes/AnimScene.ts +230 -230
- package/src/classes/BaseModel.ts +50 -50
- package/src/classes/BaseTask.ts +46 -46
- package/src/classes/Cam.ts +113 -113
- package/src/classes/Entity.ts +537 -532
- package/src/classes/Interior.ts +43 -43
- package/src/classes/Ped.ts +100 -95
- package/src/classes/PedTask.ts +1969 -1969
- package/src/classes/PersChar.ts +28 -28
- package/src/classes/Pickup.ts +13 -13
- package/src/classes/Player.ts +364 -364
- package/src/classes/Prop.ts +167 -162
- package/src/classes/PropSet.ts +1 -1
- package/src/classes/Vehicle.ts +5 -0
- package/src/classes/VehicleTask.ts +30 -30
- package/src/classes/Volume.ts +62 -62
- package/src/classes/Weapon.ts +517 -517
- package/src/namespaces/Aitransport.ts +102 -102
- package/src/namespaces/Animscene.ts +92 -92
- package/src/namespaces/Audio.ts +765 -765
- package/src/namespaces/Bounty.ts +46 -46
- package/src/namespaces/Brain.ts +22 -22
- package/src/namespaces/CamStatics.ts +747 -747
- package/src/namespaces/Collection.ts +112 -112
- package/src/namespaces/Companion.ts +34 -34
- package/src/namespaces/Compendium.ts +131 -131
- package/src/namespaces/Databinding.ts +170 -170
- package/src/namespaces/Dlc.ts +9 -9
- package/src/namespaces/EntityStatics.ts +237 -237
- package/src/namespaces/Event.ts +92 -92
- package/src/namespaces/Fire.ts +10 -10
- package/src/namespaces/Graphics.ts +1206 -1206
- package/src/namespaces/Hud.ts +647 -647
- package/src/namespaces/InteriorStatics.ts +66 -66
- package/src/namespaces/Inventory.ts +237 -237
- package/src/namespaces/Itemdatabase.ts +3 -3
- package/src/namespaces/Law.ts +2 -2
- package/src/namespaces/Map.ts +204 -204
- package/src/namespaces/Minigame.ts +100 -100
- package/src/namespaces/Misc.ts +5 -5
- package/src/namespaces/Missiondata.ts +3 -3
- package/src/namespaces/Netshopping.ts +1 -1
- package/src/namespaces/Network.ts +2217 -2225
- package/src/namespaces/Object.ts +381 -381
- package/src/namespaces/Pad.ts +67 -67
- package/src/namespaces/PedStatics.ts +33 -33
- package/src/namespaces/Perschar.ts +105 -105
- package/src/namespaces/Persistence.ts +48 -48
- package/src/namespaces/Physics.ts +326 -326
- package/src/namespaces/PlayerStatics.ts +113 -113
- package/src/namespaces/Population.ts +133 -133
- package/src/namespaces/Posse.ts +80 -80
- package/src/namespaces/Propset.ts +1 -1
- package/src/namespaces/Scripts.ts +3 -3
- package/src/namespaces/Shapetest.ts +14 -14
- package/src/namespaces/Socialclub.ts +1 -1
- package/src/namespaces/Stats.ts +266 -266
- package/src/namespaces/Streaming.ts +226 -226
- package/src/namespaces/Task.ts +527 -527
- package/src/namespaces/Telemetry.ts +300 -300
- package/src/namespaces/Uiapps.ts +39 -39
- package/src/namespaces/Uistickyfeed.ts +23 -23
- package/src/namespaces/VehicleStatics.ts +2 -2
- package/src/namespaces/VolumeStatics.ts +87 -87
- package/src/namespaces/WeaponStatics.ts +365 -365
- package/src/namespaces/Zone.ts +2 -2
package/src/classes/Weapon.ts
CHANGED
|
@@ -20,702 +20,657 @@ export class Weapon {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
|
-
* @param
|
|
23
|
+
* @param weaponHash Refer to [enum: eWeaponHash]
|
|
24
|
+
* @param ammoHash Refer to [enum: eAmmoType]
|
|
24
25
|
*/
|
|
25
|
-
|
|
26
|
-
inv<void>('
|
|
26
|
+
enableAmmoTypeForPedWeapon(weaponHash: eWeaponHash, ammoHash: eAmmoType): void {
|
|
27
|
+
inv<void>('0x23FB9FACA28779C1', this.ped.handle, weaponHash, ammoHash);
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
/**
|
|
30
|
-
* @
|
|
31
|
+
* @param toggle
|
|
31
32
|
*/
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
N_0x431240A58484D5D0(toggle: boolean): void {
|
|
34
|
+
inv<void>('0x431240A58484D5D0', this.ped.handle, toggle);
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
/**
|
|
37
|
-
* @param
|
|
38
|
-
* @param ammoCount
|
|
38
|
+
* @param p2
|
|
39
39
|
* @param p3
|
|
40
|
-
* @
|
|
40
|
+
* @returns outGUID
|
|
41
41
|
*/
|
|
42
|
-
|
|
43
|
-
inv<
|
|
42
|
+
getBestPedShortarmGuid(p2: boolean, p3: boolean): number {
|
|
43
|
+
const result = inv<number>('0xF52BD94B47CCF736', this.ped.handle, pvi(), p2, p3);
|
|
44
|
+
return result;
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
/**
|
|
47
|
-
* @
|
|
48
|
+
* @returns coords
|
|
48
49
|
*/
|
|
49
|
-
|
|
50
|
-
inv<
|
|
50
|
+
getPedLastWeaponImpactCoord(): [boolean, Vector3] {
|
|
51
|
+
const result = inv<[boolean, number[]]>('0x6C4D0409BA1A2BC2', this.ped.handle, pvv(), rai());
|
|
52
|
+
return [!!result[0], Vector3.fromArray(result[1])];
|
|
51
53
|
}
|
|
52
54
|
|
|
53
55
|
/**
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
+
* Returns WeaponAttachPoint
|
|
57
|
+
*
|
|
58
|
+
* @param attachPoint Refer to [enum: eWeaponAttachPoint]
|
|
59
|
+
* @returns
|
|
56
60
|
*/
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
return result;
|
|
61
|
+
getWeaponAttachPoint(attachPoint: number): number {
|
|
62
|
+
return inv<number>('0xCAD4FE9398820D24', this.ped.handle, attachPoint, rai());
|
|
60
63
|
}
|
|
61
64
|
|
|
62
65
|
/**
|
|
63
|
-
* @param weaponHash Refer to [enum: eWeaponHash]
|
|
64
66
|
* @param p2
|
|
65
|
-
* @param
|
|
67
|
+
* @param attachPoint Refer to [enum: eWeaponAttachPoint]
|
|
68
|
+
* @param p4
|
|
69
|
+
* @returns weaponHash: Refer to [enum: eWeaponHash]
|
|
66
70
|
*/
|
|
67
|
-
|
|
68
|
-
inv<
|
|
71
|
+
getCurrentPedWeapon(p2: boolean, attachPoint: number, p4: boolean): [boolean, number] {
|
|
72
|
+
const result = inv<[boolean, number]>('0x3A87E44BB9A01D54', this.ped.handle, pvi(), p2, attachPoint, p4, rai());
|
|
73
|
+
return [!!result[0], result[1]];
|
|
69
74
|
}
|
|
70
75
|
|
|
71
76
|
/**
|
|
72
|
-
*
|
|
77
|
+
* Returns whether the ped has a revolver p1: 0 or 1
|
|
73
78
|
*
|
|
74
79
|
* @param p1
|
|
75
80
|
* @returns
|
|
76
81
|
*/
|
|
77
|
-
|
|
78
|
-
return
|
|
82
|
+
doesPedHaveRevolver(p1: number): any {
|
|
83
|
+
return inv<number>('0x5B235F24472F2C3B', this.ped.handle, p1);
|
|
79
84
|
}
|
|
80
85
|
|
|
81
86
|
/**
|
|
87
|
+
* Returns emote Hash
|
|
88
|
+
*
|
|
82
89
|
* @returns
|
|
83
90
|
*/
|
|
84
|
-
|
|
85
|
-
return inv<number>('
|
|
91
|
+
getPedGunSpinningEquippedKitEmoteTwirl(): number {
|
|
92
|
+
return (inv<number>('0x2C4FEC3D0EFA9FC0', this.ped.handle, rai())) & 0xFFFFFFFF;
|
|
86
93
|
}
|
|
87
94
|
|
|
88
95
|
/**
|
|
89
|
-
* @param
|
|
96
|
+
* @param weaponHash Refer to [enum: eWeaponHash]
|
|
97
|
+
* @returns ammo
|
|
90
98
|
*/
|
|
91
|
-
|
|
92
|
-
inv<
|
|
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]];
|
|
93
102
|
}
|
|
94
103
|
|
|
95
104
|
/**
|
|
96
|
-
* Hides the ped's weapon during a cutscene.
|
|
97
|
-
*
|
|
98
105
|
* @param toggle
|
|
99
106
|
*/
|
|
100
|
-
|
|
101
|
-
inv<void>('
|
|
107
|
+
N_0x16D9841A85FA627E(toggle: boolean): void {
|
|
108
|
+
inv<void>('0x16D9841A85FA627E', this.ped.handle, toggle);
|
|
102
109
|
}
|
|
103
110
|
|
|
104
111
|
/**
|
|
105
|
-
* @
|
|
112
|
+
* @param weaponHash Refer to [enum: eWeaponHash]
|
|
113
|
+
* @param offset
|
|
114
|
+
* @param ammoCount
|
|
106
115
|
*/
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
return [result[0], result[1]];
|
|
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);
|
|
110
118
|
}
|
|
111
119
|
|
|
112
120
|
/**
|
|
113
|
-
*
|
|
121
|
+
* spinHash can be -1, 0 to disable
|
|
122
|
+
*
|
|
123
|
+
* @param weaponEmoteTrickType
|
|
124
|
+
* @param spin
|
|
114
125
|
*/
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
return [result[0], result[1]];
|
|
126
|
+
setActiveGunSpinningKitEmoteTwirl(weaponEmoteTrickType: number, spin: string | number): void {
|
|
127
|
+
inv<void>('0x01F661BB9C71B465', this.ped.handle, weaponEmoteTrickType, _h(spin));
|
|
118
128
|
}
|
|
119
129
|
|
|
120
130
|
/**
|
|
121
|
-
*
|
|
122
|
-
*
|
|
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]
|
|
123
135
|
*/
|
|
124
|
-
|
|
125
|
-
inv<void>('
|
|
136
|
+
sendWeaponToInventory(weaponHash: eWeaponHash): void {
|
|
137
|
+
inv<void>('0xE9BD19F8121ADE3E', this.ped.handle, weaponHash);
|
|
126
138
|
}
|
|
127
139
|
|
|
128
140
|
/**
|
|
129
|
-
*
|
|
130
|
-
*
|
|
141
|
+
* If near your horse when called, weapons stored on your horse will be considered
|
|
142
|
+
* Returns weaponHash
|
|
131
143
|
*
|
|
144
|
+
* @param weaponGroup
|
|
145
|
+
* @param p2
|
|
146
|
+
* @param p3
|
|
132
147
|
* @returns
|
|
133
148
|
*/
|
|
134
|
-
|
|
135
|
-
return (inv<number>('
|
|
149
|
+
getBestPedWeaponInGroup(weaponGroup: string | number, p2: boolean, p3: boolean): number {
|
|
150
|
+
return (inv<number>('0x9F67929D98E7C6E8', this.ped.handle, _h(weaponGroup), p2, p3, rai())) & 0xFFFFFFFF;
|
|
136
151
|
}
|
|
137
152
|
|
|
138
153
|
/**
|
|
139
|
-
*
|
|
154
|
+
* Only used in R* SP Scripts native_son2, native_son3 and smuggler2
|
|
155
|
+
* Params: p2 = -1
|
|
156
|
+
*
|
|
157
|
+
* @param p1
|
|
158
|
+
* @param p2
|
|
140
159
|
*/
|
|
141
|
-
|
|
142
|
-
inv<void>('
|
|
160
|
+
N_0x8A779706DA5CA3DD(p1: boolean, p2: number): void {
|
|
161
|
+
inv<void>('0x8A779706DA5CA3DD', this.ped.handle, p1, p2);
|
|
143
162
|
}
|
|
144
163
|
|
|
145
164
|
/**
|
|
146
|
-
* @param componentHash
|
|
147
165
|
* @param weaponHash Refer to [enum: eWeaponHash]
|
|
166
|
+
* @param ammoHash Refer to [enum: eAmmoType]
|
|
148
167
|
*/
|
|
149
|
-
|
|
150
|
-
inv<void>('
|
|
168
|
+
disableAmmoTypeForPedWeapon(weaponHash: eWeaponHash, ammoHash: eAmmoType): void {
|
|
169
|
+
inv<void>('0xF0D728EEA3C99775', this.ped.handle, weaponHash, ammoHash);
|
|
151
170
|
}
|
|
152
171
|
|
|
153
172
|
/**
|
|
154
|
-
* @
|
|
155
|
-
* @param deselectWeapon
|
|
156
|
-
* @param p3
|
|
157
|
-
* @param p4
|
|
173
|
+
* @returns data; outData
|
|
158
174
|
*/
|
|
159
|
-
|
|
160
|
-
inv<
|
|
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]];
|
|
161
178
|
}
|
|
162
179
|
|
|
163
180
|
/**
|
|
164
|
-
* Old name: _DROP_CURRENT_PED_WEAPON
|
|
165
|
-
*
|
|
166
|
-
* @param p1
|
|
167
|
-
* @param attachPoint Refer to [enum: eWeaponAttachPoint]
|
|
168
|
-
* @param p3
|
|
169
|
-
* @param p4
|
|
170
181
|
* @returns
|
|
171
182
|
*/
|
|
172
|
-
|
|
173
|
-
return
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
removeAllPedAmmo(): void {
|
|
177
|
-
inv<void>('0x1B83C0DEEBCBB214', this.ped.handle);
|
|
183
|
+
getMaxLockonDistanceOfCurrentPedWeapon(): number {
|
|
184
|
+
return inv<number>('0x79B1A6E780266DB0', this.ped.handle, raf());
|
|
178
185
|
}
|
|
179
186
|
|
|
180
187
|
/**
|
|
181
|
-
* @
|
|
188
|
+
* @returns
|
|
182
189
|
*/
|
|
183
|
-
|
|
184
|
-
inv<
|
|
190
|
+
getAllowDualWield(): any {
|
|
191
|
+
return inv<number>('0x918990BD9CE08582', this.ped.handle);
|
|
185
192
|
}
|
|
186
193
|
|
|
187
194
|
/**
|
|
188
|
-
* Returns
|
|
189
|
-
*
|
|
190
|
-
* WEAPON_EMOTE_VARIATION_A,
|
|
191
|
-
* WEAPON_EMOTE_VARIATION_B,
|
|
192
|
-
* WEAPON_EMOTE_VARIATION_C,
|
|
193
|
-
* WEAPON_EMOTE_VARIATION_D,
|
|
194
|
-
* WEAPON_EMOTE_VARIATION_PREVIEW,
|
|
195
|
-
* WEAPON_EMOTE_NUM_VARIATIONS
|
|
195
|
+
* Returns eCurrentHeldWeapon
|
|
196
|
+
* _GET_R* - _GET_T*
|
|
196
197
|
*
|
|
197
|
-
* @param variation
|
|
198
198
|
* @returns
|
|
199
199
|
*/
|
|
200
|
-
|
|
201
|
-
return inv<number>('
|
|
200
|
+
getPedCurrentHeldWeapon(): number {
|
|
201
|
+
return (inv<number>('0x8425C5F057012DAB', this.ped.handle, rai())) & 0xFFFFFFFF;
|
|
202
202
|
}
|
|
203
203
|
|
|
204
204
|
/**
|
|
205
|
-
* @param
|
|
206
|
-
* @returns
|
|
205
|
+
* @param toggle
|
|
207
206
|
*/
|
|
208
|
-
|
|
209
|
-
|
|
207
|
+
setForceAutoEquip(toggle: boolean): void {
|
|
208
|
+
inv<void>('0xBE711B14A159E84F', this.ped.handle, toggle);
|
|
210
209
|
}
|
|
211
210
|
|
|
212
211
|
/**
|
|
213
|
-
* @
|
|
212
|
+
* @param weaponHash Refer to [enum: eWeaponHash]
|
|
213
|
+
* @param ammo
|
|
214
214
|
*/
|
|
215
|
-
|
|
216
|
-
|
|
215
|
+
setPedAmmo(weaponHash: eWeaponHash, ammo: number): void {
|
|
216
|
+
inv<void>('0x14E56BC5B5DB6A19', this.ped.handle, weaponHash, ammo);
|
|
217
217
|
}
|
|
218
218
|
|
|
219
219
|
/**
|
|
220
|
-
*
|
|
221
|
-
*
|
|
222
|
-
*
|
|
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
223
|
*
|
|
224
|
-
* @param
|
|
225
|
-
* @param
|
|
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
|
|
236
|
+
* @returns
|
|
226
237
|
*/
|
|
227
|
-
|
|
228
|
-
inv<
|
|
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;
|
|
229
240
|
}
|
|
230
241
|
|
|
231
242
|
/**
|
|
232
243
|
* @param weaponHash Refer to [enum: eWeaponHash]
|
|
244
|
+
* @returns
|
|
233
245
|
*/
|
|
234
|
-
|
|
235
|
-
inv<
|
|
246
|
+
getAmmoInPedWeapon(weaponHash: eWeaponHash): number {
|
|
247
|
+
return inv<number>('0x015A522136D7F951', this.ped.handle, weaponHash, rai());
|
|
236
248
|
}
|
|
237
249
|
|
|
238
250
|
/**
|
|
239
|
-
*
|
|
240
|
-
*
|
|
241
|
-
* @param weaponObject
|
|
242
|
-
* @returns
|
|
251
|
+
* @param attachPoint Refer to [enum: eWeaponAttachPoint]
|
|
252
|
+
* @returns weaponGuid
|
|
243
253
|
*/
|
|
244
|
-
|
|
245
|
-
|
|
254
|
+
getPedWeaponGuidAtAttachPoint(attachPoint: number): [any, number] {
|
|
255
|
+
const result = inv<[number, number]>('0x6929E22158E52265', this.ped.handle, attachPoint, pvi());
|
|
256
|
+
return [result[0], result[1]];
|
|
246
257
|
}
|
|
247
258
|
|
|
248
259
|
/**
|
|
249
|
-
* @param
|
|
250
|
-
* @param p2
|
|
251
|
-
* @param p3
|
|
252
|
-
* @returns
|
|
260
|
+
* @param toggle
|
|
253
261
|
*/
|
|
254
|
-
|
|
255
|
-
|
|
262
|
+
setAllowAnyWeaponDrop(toggle: boolean): void {
|
|
263
|
+
inv<void>('0x78030C7867D8B9B6', this.ped.handle, toggle);
|
|
256
264
|
}
|
|
257
265
|
|
|
258
266
|
/**
|
|
259
|
-
* @
|
|
267
|
+
* @returns
|
|
260
268
|
*/
|
|
261
|
-
|
|
262
|
-
inv<
|
|
269
|
+
makePedReload(): any {
|
|
270
|
+
return inv<number>('0x79E1E511FF7EFB13', this.ped.handle);
|
|
263
271
|
}
|
|
264
272
|
|
|
265
273
|
/**
|
|
266
|
-
*
|
|
267
|
-
*
|
|
268
|
-
* @
|
|
274
|
+
* @param weaponHash Refer to [enum: eWeaponHash]
|
|
275
|
+
* @param ammoCount
|
|
276
|
+
* @param p3
|
|
277
|
+
* @param addReason Refer to [enum: eAddItemReason]
|
|
269
278
|
*/
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
return [result[0] & 0xFFFFFFFF, result[1]];
|
|
279
|
+
giveDelayedWeaponToPed(weaponHash: eWeaponHash, ammoCount: number, p3: boolean, addReason: eAddItemReason): void {
|
|
280
|
+
inv<void>('0xB282DC6EBD803C75', this.ped.handle, weaponHash, ammoCount, p3, addReason);
|
|
273
281
|
}
|
|
274
282
|
|
|
275
283
|
/**
|
|
276
284
|
* @param toggle
|
|
277
285
|
*/
|
|
278
|
-
|
|
279
|
-
inv<void>('
|
|
286
|
+
N_0x45E57FDD531C9477(toggle: boolean): void {
|
|
287
|
+
inv<void>('0x45E57FDD531C9477', this.ped.handle, toggle);
|
|
280
288
|
}
|
|
281
289
|
|
|
282
290
|
/**
|
|
283
|
-
*
|
|
284
|
-
*
|
|
285
|
-
* @returns
|
|
291
|
+
* @param ammoHash Refer to [enum: eAmmoType]
|
|
292
|
+
* @returns weaponInventoryUid
|
|
286
293
|
*/
|
|
287
|
-
|
|
288
|
-
|
|
294
|
+
setAmmoTypeForPedWeaponInventory(ammoHash: eAmmoType): number {
|
|
295
|
+
const result = inv<number>('0xEBE46B501BC3FBCF', this.ped.handle, pvi(), ammoHash);
|
|
296
|
+
return result;
|
|
289
297
|
}
|
|
290
298
|
|
|
291
299
|
/**
|
|
292
|
-
* @
|
|
300
|
+
* @param weaponHash Refer to [enum: eWeaponHash]
|
|
301
|
+
* @param p2
|
|
302
|
+
* @param removeReason Refer to [enum: eRemoveItemReason]
|
|
293
303
|
*/
|
|
294
|
-
|
|
295
|
-
|
|
304
|
+
removeWeaponFromPed(weaponHash: eWeaponHash, p2: boolean, removeReason: eRemoveItemReason): void {
|
|
305
|
+
inv<void>('0x4899CB088EDF59B8', this.ped.handle, weaponHash, p2, removeReason);
|
|
296
306
|
}
|
|
297
307
|
|
|
298
308
|
/**
|
|
299
|
-
* @
|
|
309
|
+
* @param visible
|
|
300
310
|
*/
|
|
301
|
-
|
|
302
|
-
|
|
311
|
+
setPedAllWeaponsVisibility(visible: boolean): void {
|
|
312
|
+
inv<void>('0x4F806A6CFED89468', this.ped.handle, visible);
|
|
303
313
|
}
|
|
304
314
|
|
|
305
315
|
/**
|
|
306
|
-
*
|
|
307
|
-
*
|
|
308
|
-
* 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
|
|
309
|
-
*
|
|
310
|
-
* @param weapon
|
|
316
|
+
* @param weaponHash Refer to [enum: eWeaponHash]
|
|
317
|
+
* @param ammo
|
|
311
318
|
* @returns
|
|
312
319
|
*/
|
|
313
|
-
|
|
314
|
-
return inv<boolean>('
|
|
320
|
+
setAmmoInClip(weaponHash: eWeaponHash, ammo: number): boolean {
|
|
321
|
+
return inv<boolean>('0xDCD2A934D65CB497', this.ped.handle, weaponHash, ammo, rai());
|
|
315
322
|
}
|
|
316
323
|
|
|
317
324
|
/**
|
|
318
|
-
*
|
|
325
|
+
* _GET_M* - _GET_PED_A*
|
|
319
326
|
*
|
|
327
|
+
* @param p1
|
|
320
328
|
* @returns
|
|
321
329
|
*/
|
|
322
|
-
|
|
323
|
-
return inv<
|
|
330
|
+
getPedWeaponObject(p1: boolean): Prop | null {
|
|
331
|
+
return createFromHandle<Prop>('Prop', inv<number>('0x6CA484C9A7377E4F', this.ped.handle, p1, rai()));
|
|
324
332
|
}
|
|
325
333
|
|
|
326
334
|
/**
|
|
327
|
-
*
|
|
335
|
+
* slotHash is usually just the weaponHash name, but WEAPON_* is replaced with SLOT_*
|
|
336
|
+
*
|
|
337
|
+
* @param slotHash
|
|
328
338
|
* @returns
|
|
329
339
|
*/
|
|
330
|
-
|
|
331
|
-
return inv<number>('
|
|
340
|
+
getPedWeaponInSlot(slotHash: string | number): number {
|
|
341
|
+
return (inv<number>('0xDBC4B552B2AE9A83', this.ped.handle, _h(slotHash), rai())) & 0xFFFFFFFF;
|
|
332
342
|
}
|
|
333
343
|
|
|
334
344
|
/**
|
|
335
|
-
*
|
|
345
|
+
* Outputs cached guids
|
|
336
346
|
*
|
|
337
|
-
* @
|
|
338
|
-
* @returns
|
|
347
|
+
* @returns guidPrimary; guidSecondary
|
|
339
348
|
*/
|
|
340
|
-
|
|
341
|
-
|
|
349
|
+
getPlayerPedQuickSwapWeaponByGuid(): [number, number] {
|
|
350
|
+
const result = inv<[number, number]>('0xB7E52A058B07C7E2', this.ped.handle, pvi(), pvi());
|
|
351
|
+
return [result[0], result[1]];
|
|
342
352
|
}
|
|
343
353
|
|
|
344
354
|
/**
|
|
345
|
-
* Returns the ped
|
|
346
|
-
* Falls back to WEAPON_UNARMED if the ped doesn't have a valid model info pointer, or 0 if the ped doesn't exist.
|
|
355
|
+
* Returns true if the ped is currently holstering or unholstering a weapon
|
|
347
356
|
*
|
|
348
357
|
* @returns
|
|
349
358
|
*/
|
|
350
|
-
|
|
351
|
-
return
|
|
359
|
+
isWeaponHolsterStateChanging(): boolean {
|
|
360
|
+
return inv<boolean>('0x2387D6E9C6B478AA', this.ped.handle, rai());
|
|
352
361
|
}
|
|
353
362
|
|
|
354
363
|
/**
|
|
355
|
-
* @param
|
|
356
|
-
* @param p2
|
|
364
|
+
* @param ammoHash Refer to [enum: eAmmoType]
|
|
357
365
|
* @returns
|
|
358
366
|
*/
|
|
359
|
-
|
|
360
|
-
return inv<
|
|
367
|
+
N_0x44C8F4908F1B2622(ammoHash: eAmmoType): boolean {
|
|
368
|
+
return inv<boolean>('0x44C8F4908F1B2622', this.ped.handle, ammoHash, rai());
|
|
361
369
|
}
|
|
362
370
|
|
|
363
371
|
/**
|
|
364
|
-
* @param
|
|
365
|
-
* @returns
|
|
372
|
+
* @param p2
|
|
373
|
+
* @returns clipInventoryUid
|
|
366
374
|
*/
|
|
367
|
-
|
|
368
|
-
|
|
375
|
+
refillAmmoInClip(p2: number): [any, number] {
|
|
376
|
+
const result = inv<[number, number]>('0xDF4A3404D022ADDE', this.ped.handle, pvi(), p2);
|
|
377
|
+
return [result[0], result[1]];
|
|
369
378
|
}
|
|
370
379
|
|
|
371
380
|
/**
|
|
372
|
-
*
|
|
373
|
-
*
|
|
381
|
+
* _SET_A* - _SET_B*
|
|
382
|
+
*
|
|
383
|
+
* @param p1
|
|
374
384
|
*/
|
|
375
|
-
|
|
376
|
-
inv<void>('
|
|
385
|
+
N_0x2EBF70E1D8C06683(p1: string | number): void {
|
|
386
|
+
inv<void>('0x2EBF70E1D8C06683', this.ped.handle, _h(p1));
|
|
377
387
|
}
|
|
378
388
|
|
|
379
389
|
/**
|
|
380
|
-
* @param
|
|
390
|
+
* @param ammoHash Refer to [enum: eAmmoType]
|
|
381
391
|
*/
|
|
382
|
-
|
|
383
|
-
inv<void>('
|
|
392
|
+
disableAmmoTypeForPed(ammoHash: eAmmoType): void {
|
|
393
|
+
inv<void>('0xAA5A52204E077883', this.ped.handle, ammoHash);
|
|
384
394
|
}
|
|
385
395
|
|
|
386
396
|
/**
|
|
387
|
-
*
|
|
388
|
-
*
|
|
389
|
-
* @
|
|
397
|
+
* Returns whether the ped has a shotgun p1: 0 or 1
|
|
398
|
+
*
|
|
399
|
+
* @param p1
|
|
400
|
+
* @returns
|
|
390
401
|
*/
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
return result;
|
|
402
|
+
doesPedHaveShotgun(p1: number): any {
|
|
403
|
+
return inv<number>('0xABC18A28BAD4B46F', this.ped.handle, p1);
|
|
394
404
|
}
|
|
395
405
|
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
*/
|
|
399
|
-
getPedLastWeaponImpactCoord(): [boolean, Vector3] {
|
|
400
|
-
const result = inv<[boolean, number[]]>('0x6C4D0409BA1A2BC2', this.ped.handle, pvv(), rai());
|
|
401
|
-
return [!!result[0], Vector3.fromArray(result[1])];
|
|
406
|
+
clearPedLastWeaponDamage(): void {
|
|
407
|
+
inv<void>('0x087D8F4BC65F68E4', this.ped.handle);
|
|
402
408
|
}
|
|
403
409
|
|
|
404
410
|
/**
|
|
405
|
-
* Returns
|
|
411
|
+
* Returns true if ped is on a horse while inside of a town
|
|
412
|
+
* Params: p1 = 0
|
|
413
|
+
* GET_L* - GET_MA*
|
|
406
414
|
*
|
|
407
|
-
* @param
|
|
415
|
+
* @param p1
|
|
408
416
|
* @returns
|
|
409
417
|
*/
|
|
410
|
-
|
|
411
|
-
return inv<number>('
|
|
418
|
+
N_0x5A695BD328586B44(p1: number): any {
|
|
419
|
+
return inv<number>('0x5A695BD328586B44', this.ped.handle, p1);
|
|
412
420
|
}
|
|
413
421
|
|
|
414
422
|
/**
|
|
415
|
-
* @param
|
|
416
|
-
* @param
|
|
417
|
-
* @param
|
|
418
|
-
* @returns weaponHash: Refer to [enum: eWeaponHash]
|
|
423
|
+
* @param weaponHash Refer to [enum: eWeaponHash]
|
|
424
|
+
* @param amount
|
|
425
|
+
* @param removeReason Refer to [enum: eRemoveItemReason]
|
|
419
426
|
*/
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
return [!!result[0], result[1]];
|
|
427
|
+
removeAmmoFromPed(weaponHash: eWeaponHash, amount: number, removeReason: eRemoveItemReason): void {
|
|
428
|
+
inv<void>('0xF4823C813CB8277D', this.ped.handle, weaponHash, amount, removeReason);
|
|
423
429
|
}
|
|
424
430
|
|
|
425
431
|
/**
|
|
426
|
-
* Returns whether the ped has a revolver p1: 0 or 1
|
|
427
|
-
*
|
|
428
432
|
* @param p1
|
|
429
|
-
* @
|
|
433
|
+
* @param p2
|
|
430
434
|
*/
|
|
431
|
-
|
|
432
|
-
|
|
435
|
+
setPedAmmoToDrop(p1: number, p2: number): void {
|
|
436
|
+
inv<void>('0xA4EFEF9440A5B0EF', this.ped.handle, p1, p2);
|
|
433
437
|
}
|
|
434
438
|
|
|
435
439
|
/**
|
|
436
|
-
* Returns
|
|
440
|
+
* Returns the current ammo type of the specified ped's specified weapon.
|
|
437
441
|
*
|
|
442
|
+
* @param weaponHash Refer to [enum: eWeaponHash]
|
|
438
443
|
* @returns
|
|
439
444
|
*/
|
|
440
|
-
|
|
441
|
-
return (inv<number>('
|
|
445
|
+
getPedAmmoTypeFromWeapon(weaponHash: eWeaponHash): number {
|
|
446
|
+
return (inv<number>('0x7FEAD38B326B9F74', this.ped.handle, weaponHash, rai())) & 0xFFFFFFFF;
|
|
442
447
|
}
|
|
443
448
|
|
|
444
449
|
/**
|
|
445
|
-
* @param
|
|
450
|
+
* @param weaponHash Refer to [enum: eWeaponHash]
|
|
451
|
+
* @returns ammo
|
|
446
452
|
*/
|
|
447
|
-
|
|
448
|
-
inv<
|
|
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]];
|
|
449
456
|
}
|
|
450
457
|
|
|
451
458
|
/**
|
|
452
459
|
* @param weaponHash Refer to [enum: eWeaponHash]
|
|
453
|
-
* @param offset
|
|
454
|
-
* @param ammoCount
|
|
455
460
|
*/
|
|
456
|
-
|
|
457
|
-
inv<void>('
|
|
461
|
+
enableAmmoTypeForPed(weaponHash: eWeaponHash): void {
|
|
462
|
+
inv<void>('0x3B7B7908B7ADFB4B', this.ped.handle, weaponHash);
|
|
458
463
|
}
|
|
459
464
|
|
|
460
465
|
/**
|
|
461
|
-
*
|
|
466
|
+
* Detaches the weapon from the ped and actually removes the ped's weapon
|
|
462
467
|
*
|
|
463
|
-
* @param
|
|
464
|
-
* @
|
|
468
|
+
* @param p1
|
|
469
|
+
* @returns
|
|
465
470
|
*/
|
|
466
|
-
|
|
467
|
-
inv<
|
|
471
|
+
getWeaponObjectFromPed(p1: boolean): Prop | null {
|
|
472
|
+
return createFromHandle<Prop>('Prop', inv<number>('0xC6A6789BB405D11C', this.ped.handle, p1, rai()));
|
|
468
473
|
}
|
|
469
474
|
|
|
470
475
|
/**
|
|
471
|
-
*
|
|
472
|
-
* However, the weapon is not visible on the horse holster, but you can reach the weapon on the weapon wheel
|
|
473
|
-
*
|
|
474
|
-
* @param weaponHash Refer to [enum: eWeaponHash]
|
|
476
|
+
* @returns
|
|
475
477
|
*/
|
|
476
|
-
|
|
477
|
-
inv<
|
|
478
|
+
isPedCurrentWeaponHolstered(): any {
|
|
479
|
+
return inv<number>('0xBDD9C235D8D1052E', this.ped.handle);
|
|
478
480
|
}
|
|
479
481
|
|
|
480
482
|
/**
|
|
481
|
-
*
|
|
482
|
-
* Returns weaponHash
|
|
483
|
-
*
|
|
484
|
-
* @param weaponGroup
|
|
485
|
-
* @param p2
|
|
486
|
-
* @param p3
|
|
487
|
-
* @returns
|
|
483
|
+
* @param toggle
|
|
488
484
|
*/
|
|
489
|
-
|
|
490
|
-
|
|
485
|
+
setInstantlyEquipWeaponPickups(toggle: boolean): void {
|
|
486
|
+
inv<void>('0x739B9C6D0E7F7F93', this.ped.handle, toggle);
|
|
491
487
|
}
|
|
492
488
|
|
|
493
489
|
/**
|
|
494
|
-
*
|
|
495
|
-
* Params: p2 = -1
|
|
490
|
+
* Hides the ped's weapon during a cutscene.
|
|
496
491
|
*
|
|
497
|
-
* @param
|
|
498
|
-
* @param p2
|
|
492
|
+
* @param toggle
|
|
499
493
|
*/
|
|
500
|
-
|
|
501
|
-
inv<void>('
|
|
494
|
+
hidePedWeaponForScriptedCutscene(toggle: boolean): void {
|
|
495
|
+
inv<void>('0x6F6981D2253C208F', this.ped.handle, toggle);
|
|
502
496
|
}
|
|
503
497
|
|
|
504
498
|
/**
|
|
505
|
-
* @
|
|
506
|
-
* @param ammoHash Refer to [enum: eAmmoType]
|
|
499
|
+
* @returns guidPrimary; guidSecondary
|
|
507
500
|
*/
|
|
508
|
-
|
|
509
|
-
inv<
|
|
501
|
+
setPlayerPedQuickSwapWeaponByGuid(): [number, number] {
|
|
502
|
+
const result = inv<[number, number]>('0xEC1F85DA51D3D6C4', this.ped.handle, pvi(), pvi());
|
|
503
|
+
return [result[0], result[1]];
|
|
510
504
|
}
|
|
511
505
|
|
|
512
506
|
/**
|
|
513
|
-
* @returns
|
|
507
|
+
* @returns Returns the total ammo in the ped weapon from it's guid, or `0`.; guid
|
|
514
508
|
*/
|
|
515
|
-
|
|
516
|
-
const result = inv<[
|
|
517
|
-
return [
|
|
509
|
+
getAmmoInPedWeaponFromGuid(): [number, number] {
|
|
510
|
+
const result = inv<[number, number]>('0x4823F13A21F51964', this.ped.handle, pvi(), rai());
|
|
511
|
+
return [result[0], result[1]];
|
|
518
512
|
}
|
|
519
513
|
|
|
520
514
|
/**
|
|
521
|
-
* @
|
|
515
|
+
* @param p1
|
|
516
|
+
* @param p2
|
|
522
517
|
*/
|
|
523
|
-
|
|
524
|
-
|
|
518
|
+
removeAllPedWeapons(p1: boolean, p2: boolean): void {
|
|
519
|
+
inv<void>('0xF25DF915FA38C5F3', this.ped.handle, p1, p2);
|
|
525
520
|
}
|
|
526
521
|
|
|
527
522
|
/**
|
|
528
|
-
*
|
|
523
|
+
* Returns ammoHash from weaponObject (Returned by 0x6CA484C9A7377E4F)
|
|
524
|
+
*
|
|
525
|
+
* @param weaponObject
|
|
526
|
+
* @returns
|
|
529
527
|
*/
|
|
530
|
-
|
|
531
|
-
inv<
|
|
528
|
+
getCurrentPedWeaponAmmoType(weaponObject: Prop): number {
|
|
529
|
+
return (inv<number>('0x7E7B19A4355FEE13', this.ped.handle, weaponObject.handle, rai())) & 0xFFFFFFFF;
|
|
532
530
|
}
|
|
533
531
|
|
|
534
532
|
/**
|
|
535
|
-
* @param
|
|
533
|
+
* @param p1
|
|
534
|
+
* @param p2
|
|
535
|
+
* @param p3
|
|
536
|
+
* @returns
|
|
536
537
|
*/
|
|
537
|
-
|
|
538
|
-
inv<
|
|
538
|
+
getPedWorstWeapon(p1: boolean, p2: boolean, p3: boolean): number {
|
|
539
|
+
return (inv<number>('0xDA37A053C1522F5D', this.ped.handle, p1, p2, p3, rai())) & 0xFFFFFFFF;
|
|
539
540
|
}
|
|
540
541
|
|
|
541
542
|
/**
|
|
542
|
-
* @param
|
|
543
|
-
* @param ammo
|
|
544
|
-
* @returns
|
|
543
|
+
* @param toggle
|
|
545
544
|
*/
|
|
546
|
-
|
|
547
|
-
|
|
545
|
+
setPedDropsWeaponsWhenDead(toggle: boolean): void {
|
|
546
|
+
inv<void>('0x476AE72C1D19D1A8', this.ped.handle, toggle);
|
|
548
547
|
}
|
|
549
548
|
|
|
550
549
|
/**
|
|
551
|
-
*
|
|
550
|
+
* Returns ammoHash
|
|
552
551
|
*
|
|
553
|
-
* @
|
|
554
|
-
* @returns
|
|
552
|
+
* @returns Returns the [enum: eAmmoType]; weaponGuid
|
|
555
553
|
*/
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
/**
|
|
561
|
-
* slotHash is usually just the weaponHash name, but WEAPON_* is replaced with SLOT_*
|
|
562
|
-
*
|
|
563
|
-
* @param slotHash
|
|
564
|
-
* @returns
|
|
565
|
-
*/
|
|
566
|
-
getPedWeaponInSlot(slotHash: string | number): string | number {
|
|
567
|
-
return (inv<number>('0xDBC4B552B2AE9A83', this.ped.handle, _h(slotHash), rai())) & 0xFFFFFFFF;
|
|
554
|
+
getCurrentAmmoTypeFromGuid(): [number, number] {
|
|
555
|
+
const result = inv<[number, number]>('0xAF9D167A5656D6A6', this.ped.handle, pvi(), rai());
|
|
556
|
+
return [result[0] & 0xFFFFFFFF, result[1]];
|
|
568
557
|
}
|
|
569
558
|
|
|
570
559
|
/**
|
|
571
|
-
*
|
|
572
|
-
*
|
|
573
|
-
* @returns guidPrimary; guidSecondary
|
|
560
|
+
* @param toggle
|
|
574
561
|
*/
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
return [result[0], result[1]];
|
|
562
|
+
setPedInfiniteAmmoClip(toggle: boolean): void {
|
|
563
|
+
inv<void>('0xFBAA1E06B6BCA741', this.ped.handle, toggle);
|
|
578
564
|
}
|
|
579
565
|
|
|
580
566
|
/**
|
|
581
|
-
*
|
|
567
|
+
* returns the amount of peds that were restrained with the weapon thrown bolas
|
|
582
568
|
*
|
|
583
569
|
* @returns
|
|
584
570
|
*/
|
|
585
|
-
|
|
586
|
-
return inv<
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
/**
|
|
590
|
-
* @param ammoHash Refer to [enum: eAmmoType]
|
|
591
|
-
* @returns
|
|
592
|
-
*/
|
|
593
|
-
N_0x44C8F4908F1B2622(ammoHash: eAmmoType): boolean {
|
|
594
|
-
return inv<boolean>('0x44C8F4908F1B2622', this.ped.handle, ammoHash, rai());
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
/**
|
|
598
|
-
* @param p2
|
|
599
|
-
* @returns clipInventoryUid
|
|
600
|
-
*/
|
|
601
|
-
refillAmmoInClip(p2: number): [any, number] {
|
|
602
|
-
const result = inv<[number, number]>('0xDF4A3404D022ADDE', this.ped.handle, pvi(), p2);
|
|
603
|
-
return [result[0], result[1]];
|
|
571
|
+
getNumPedsRestrainedFromWeaponBolas(): any {
|
|
572
|
+
return inv<number>('0x46D42883E873C1D7', this.ped.handle);
|
|
604
573
|
}
|
|
605
574
|
|
|
606
575
|
/**
|
|
607
|
-
*
|
|
576
|
+
* emote hashes: KIT_EMOTE_TWIRL_GUN, KIT_EMOTE_TWIRL_GUN_LEFT_HOLSTER, KIT_EMOTE_TWIRL_GUN_DUAL, 0 (to unequip)
|
|
608
577
|
*
|
|
609
|
-
* @param
|
|
610
|
-
*/
|
|
611
|
-
N_0x2EBF70E1D8C06683(p1: string | number): void {
|
|
612
|
-
inv<void>('0x2EBF70E1D8C06683', this.ped.handle, _h(p1));
|
|
613
|
-
}
|
|
614
|
-
|
|
615
|
-
/**
|
|
616
|
-
* @returns
|
|
617
|
-
*/
|
|
618
|
-
isPedWeaponReadyToShoot(): boolean {
|
|
619
|
-
return inv<boolean>('0xB80CA294F2F26749', this.ped.handle, rai());
|
|
620
|
-
}
|
|
621
|
-
|
|
622
|
-
/**
|
|
623
|
-
* @param ammoType
|
|
624
|
-
* @returns
|
|
578
|
+
* @param emote
|
|
625
579
|
*/
|
|
626
|
-
|
|
627
|
-
|
|
580
|
+
setActiveGunSpinningEquipKitEmoteTwirl(emote: string | number): void {
|
|
581
|
+
inv<void>('0xCBCFFF805F1B4596', this.ped.handle, _h(emote));
|
|
628
582
|
}
|
|
629
583
|
|
|
630
584
|
/**
|
|
631
|
-
*
|
|
585
|
+
* Stores longarms to your horse on dismount
|
|
586
|
+
* Params: p2 = 0
|
|
587
|
+
* SET_[I - M]*
|
|
588
|
+
*
|
|
589
|
+
* @param storeLongarms
|
|
632
590
|
* @param p2
|
|
633
|
-
* @returns
|
|
634
591
|
*/
|
|
635
|
-
|
|
636
|
-
|
|
592
|
+
setInstantlyStoreLongarmsOnDismount(storeLongarms: boolean, p2: number): void {
|
|
593
|
+
inv<void>('0xB832F1A686B9B810', this.ped.handle, storeLongarms, p2);
|
|
637
594
|
}
|
|
638
595
|
|
|
639
596
|
/**
|
|
640
|
-
* @param
|
|
641
|
-
* @
|
|
597
|
+
* @param removeReason Refer to [enum: eRemoveItemReason]
|
|
598
|
+
* @returns weaponGuid
|
|
642
599
|
*/
|
|
643
|
-
|
|
644
|
-
inv<
|
|
600
|
+
removeWeaponFromPedByGuid(removeReason: eRemoveItemReason): number {
|
|
601
|
+
const result = inv<number>('0x51C3B71591811485', this.ped.handle, pvi(), removeReason);
|
|
602
|
+
return result;
|
|
645
603
|
}
|
|
646
604
|
|
|
647
605
|
/**
|
|
606
|
+
* attachPoint:
|
|
607
|
+
*
|
|
648
608
|
* @param weaponHash Refer to [enum: eWeaponHash]
|
|
649
|
-
* @param
|
|
609
|
+
* @param equipNow
|
|
610
|
+
* @param attachPoint Refer to [enum: eWeaponAttachPoint]
|
|
611
|
+
* @param p4
|
|
612
|
+
* @param p5
|
|
650
613
|
*/
|
|
651
|
-
|
|
652
|
-
inv<void>('
|
|
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);
|
|
653
616
|
}
|
|
654
617
|
|
|
655
618
|
/**
|
|
656
|
-
*
|
|
619
|
+
* Equips a weapon from a weaponItem, similar to GIVE_WEAPON_TO_PED
|
|
657
620
|
*
|
|
658
|
-
* @
|
|
621
|
+
* @param p2
|
|
622
|
+
* @param p3
|
|
623
|
+
* @param p4
|
|
624
|
+
* @param p5
|
|
625
|
+
* @returns weaponUid
|
|
659
626
|
*/
|
|
660
|
-
|
|
661
|
-
const result = inv<
|
|
662
|
-
return
|
|
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;
|
|
663
630
|
}
|
|
664
631
|
|
|
665
632
|
/**
|
|
633
|
+
* @param componentHash
|
|
666
634
|
* @param weaponHash Refer to [enum: eWeaponHash]
|
|
667
635
|
* @returns
|
|
668
636
|
*/
|
|
669
|
-
|
|
670
|
-
return inv<
|
|
671
|
-
}
|
|
672
|
-
|
|
673
|
-
/**
|
|
674
|
-
* Returns whether the ped has a rifle p1: 0 or 1
|
|
675
|
-
*
|
|
676
|
-
* @param p1
|
|
677
|
-
* @returns
|
|
678
|
-
*/
|
|
679
|
-
doesPedHaveRifle(p1: number): any {
|
|
680
|
-
return inv<number>('0x95CA12E2C68043E5', this.ped.handle, p1);
|
|
637
|
+
hasPedGotWeaponComponent(componentHash: string | number, weaponHash: eWeaponHash): any {
|
|
638
|
+
return inv<number>('0xBBC67A6F965C688A', this.ped.handle, _h(componentHash), weaponHash);
|
|
681
639
|
}
|
|
682
640
|
|
|
683
641
|
/**
|
|
684
|
-
* 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
|
|
685
|
-
* _A* or _B*
|
|
686
|
-
*
|
|
687
642
|
* @param weaponHash Refer to [enum: eWeaponHash]
|
|
688
|
-
* @param ped
|
|
643
|
+
* @param amount The amount of ped to add to the ammo
|
|
644
|
+
* @param addReason Refer to [enum: eAddItemReason]
|
|
689
645
|
*/
|
|
690
|
-
|
|
691
|
-
inv<void>('
|
|
646
|
+
addAmmoToPed(weaponHash: eWeaponHash, amount: number, addReason: eAddItemReason): void {
|
|
647
|
+
inv<void>('0xB190BCA3F4042F95', this.ped.handle, weaponHash, amount, addReason);
|
|
692
648
|
}
|
|
693
649
|
|
|
694
650
|
/**
|
|
695
|
-
*
|
|
696
|
-
*
|
|
697
|
-
* @param
|
|
698
|
-
* @returns
|
|
651
|
+
* @param ammoType
|
|
652
|
+
* @param amount
|
|
653
|
+
* @param addReason Refer to [enum: eAddItemReason]
|
|
699
654
|
*/
|
|
700
|
-
|
|
701
|
-
|
|
655
|
+
addAmmoToPedByType(ammoType: string | number, amount: number, addReason: eAddItemReason): void {
|
|
656
|
+
inv<void>('0x106A811C6D3035F3', this.ped.handle, _h(ammoType), amount, addReason);
|
|
702
657
|
}
|
|
703
658
|
|
|
704
659
|
/**
|
|
705
|
-
*
|
|
706
|
-
*
|
|
707
|
-
* @param p1
|
|
660
|
+
* @param targetPed
|
|
708
661
|
* @returns
|
|
709
662
|
*/
|
|
710
|
-
|
|
711
|
-
return inv<
|
|
663
|
+
isTargetPedConstrainedByPedUsingBolas(targetPed: Ped): boolean {
|
|
664
|
+
return inv<boolean>('0x8D50F43298AB9545', this.ped.handle, targetPed.handle, rai());
|
|
712
665
|
}
|
|
713
666
|
|
|
714
667
|
/**
|
|
715
|
-
* @param
|
|
668
|
+
* @param p1
|
|
669
|
+
* @returns guidPrimary
|
|
716
670
|
*/
|
|
717
|
-
|
|
718
|
-
inv<
|
|
671
|
+
getBestPedWeaponInInventory(p1: any): [any, number] {
|
|
672
|
+
const result = inv<[number, number]>('0x7B98500614C8E8B8', this.ped.handle, p1, pvi());
|
|
673
|
+
return [result[0], result[1]];
|
|
719
674
|
}
|
|
720
675
|
|
|
721
676
|
/**
|
|
@@ -765,7 +720,7 @@ export class Weapon {
|
|
|
765
720
|
* @param p1
|
|
766
721
|
* @returns
|
|
767
722
|
*/
|
|
768
|
-
getPedBackupWeapon(p1: boolean):
|
|
723
|
+
getPedBackupWeapon(p1: boolean): number {
|
|
769
724
|
return (inv<number>('0xC71FE230A513C30F', this.ped.handle, p1, rai())) & 0xFFFFFFFF;
|
|
770
725
|
}
|
|
771
726
|
|
|
@@ -777,287 +732,332 @@ export class Weapon {
|
|
|
777
732
|
}
|
|
778
733
|
|
|
779
734
|
/**
|
|
780
|
-
* @
|
|
781
|
-
* @returns ammo
|
|
735
|
+
* @returns
|
|
782
736
|
*/
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
return [!!result[0], result[1]];
|
|
737
|
+
enableWeaponRestore(): any {
|
|
738
|
+
return inv<number>('0xC395355843BE134B', this.ped.handle);
|
|
786
739
|
}
|
|
787
740
|
|
|
788
741
|
/**
|
|
789
|
-
* Returns whether the ped
|
|
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
|
|
790
745
|
*
|
|
791
|
-
* @param
|
|
746
|
+
* @param weapon
|
|
792
747
|
* @returns
|
|
793
748
|
*/
|
|
794
|
-
|
|
795
|
-
return inv<
|
|
749
|
+
isPedHoldingWeapon(weapon: string | number): boolean {
|
|
750
|
+
return inv<boolean>('0x07E1C35F0078C3F9', this.ped.handle, _h(weapon), rai());
|
|
796
751
|
}
|
|
797
752
|
|
|
798
753
|
/**
|
|
799
|
-
* *
|
|
754
|
+
* _GET_D* - _GET_L*
|
|
800
755
|
*
|
|
801
|
-
* @
|
|
756
|
+
* @returns
|
|
802
757
|
*/
|
|
803
|
-
|
|
804
|
-
inv<
|
|
758
|
+
N_0x0DE0944ECCB3DF5D(): boolean {
|
|
759
|
+
return inv<boolean>('0x0DE0944ECCB3DF5D', this.ped.handle, rai());
|
|
805
760
|
}
|
|
806
761
|
|
|
807
762
|
/**
|
|
808
|
-
* @
|
|
763
|
+
* @param flags
|
|
764
|
+
* @returns
|
|
809
765
|
*/
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
return [!!result[0], result[1]];
|
|
766
|
+
isPedArmed(flags: number): any {
|
|
767
|
+
return inv<number>('0xCB690F680A3EA971', this.ped.handle, flags);
|
|
813
768
|
}
|
|
814
769
|
|
|
815
770
|
/**
|
|
816
|
-
*
|
|
817
|
-
*
|
|
771
|
+
* Returns whether the ped has a sniper p1: 0 or 1
|
|
772
|
+
*
|
|
773
|
+
* @param p1
|
|
774
|
+
* @returns
|
|
818
775
|
*/
|
|
819
|
-
|
|
820
|
-
inv<
|
|
776
|
+
doesPedHaveSniper(p1: number): any {
|
|
777
|
+
return inv<number>('0x80BB243789008A82', this.ped.handle, p1);
|
|
821
778
|
}
|
|
822
779
|
|
|
823
780
|
/**
|
|
824
|
-
*
|
|
825
|
-
*
|
|
826
|
-
*
|
|
827
|
-
* @
|
|
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
|
|
828
785
|
*/
|
|
829
|
-
|
|
830
|
-
inv<
|
|
786
|
+
getDefaultUnarmedWeaponHash(): number {
|
|
787
|
+
return (inv<number>('0x08FF1099ED2E6E21', this.ped.handle, rai())) & 0xFFFFFFFF;
|
|
831
788
|
}
|
|
832
789
|
|
|
833
790
|
/**
|
|
834
|
-
* onlyCheckPlayerInventory: If true, it will only check the players current inventory. If false, it also checks your horse inventory
|
|
835
|
-
*
|
|
836
791
|
* @param weaponHash Refer to [enum: eWeaponHash]
|
|
837
792
|
* @param p2
|
|
838
|
-
* @param onlyCheckPlayerInventory
|
|
839
793
|
* @returns
|
|
840
794
|
*/
|
|
841
|
-
|
|
842
|
-
return inv<
|
|
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
|
|
802
|
+
*/
|
|
803
|
+
getCurrentPedWeaponEntityIndex(attachPoint: number): Entity | null {
|
|
804
|
+
return createFromHandle<Entity>('Entity', inv<number>('0x3B390A939AF0B5FC', this.ped.handle, attachPoint, rai()));
|
|
843
805
|
}
|
|
844
806
|
|
|
845
807
|
/**
|
|
808
|
+
* @param ammoType
|
|
846
809
|
* @returns
|
|
847
810
|
*/
|
|
848
|
-
|
|
849
|
-
return inv<number>('
|
|
811
|
+
getPedAmmoByType(ammoType: string | number): number {
|
|
812
|
+
return inv<number>('0x39D22031557946C1', this.ped.handle, _h(ammoType), rai());
|
|
850
813
|
}
|
|
851
814
|
|
|
852
815
|
/**
|
|
853
|
-
*
|
|
854
|
-
* Params: p2 = 0
|
|
855
|
-
* SET_[I - M]*
|
|
856
|
-
*
|
|
857
|
-
* @param storeLongarms
|
|
816
|
+
* @param p1
|
|
858
817
|
* @param p2
|
|
818
|
+
* @returns
|
|
859
819
|
*/
|
|
860
|
-
|
|
861
|
-
inv<
|
|
820
|
+
getBestPedWeapon(p1: boolean, p2: boolean): number {
|
|
821
|
+
return (inv<number>('0x8483E98E8B888AE2', this.ped.handle, p1, p2, rai())) & 0xFFFFFFFF;
|
|
862
822
|
}
|
|
863
823
|
|
|
864
824
|
/**
|
|
865
|
-
* @param
|
|
866
|
-
* @
|
|
825
|
+
* @param toggle
|
|
826
|
+
* @param weaponHash Refer to [enum: eWeaponHash]
|
|
867
827
|
*/
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
return result;
|
|
828
|
+
setPedInfiniteAmmo(toggle: boolean, weaponHash: eWeaponHash): void {
|
|
829
|
+
inv<void>('0x3EDCB0505123623B', this.ped.handle, toggle, weaponHash);
|
|
871
830
|
}
|
|
872
831
|
|
|
873
832
|
/**
|
|
874
|
-
* attachPoint:
|
|
875
|
-
*
|
|
876
833
|
* @param weaponHash Refer to [enum: eWeaponHash]
|
|
877
|
-
* @param
|
|
878
|
-
* @param attachPoint Refer to [enum: eWeaponAttachPoint]
|
|
879
|
-
* @param p4
|
|
880
|
-
* @param p5
|
|
834
|
+
* @param ammoHash Refer to [enum: eAmmoType]
|
|
881
835
|
*/
|
|
882
|
-
|
|
883
|
-
inv<void>('
|
|
836
|
+
setAmmoTypeForPedWeapon(weaponHash: eWeaponHash, ammoHash: eAmmoType): void {
|
|
837
|
+
inv<void>('0xCC9C4393523833E2', this.ped.handle, weaponHash, ammoHash);
|
|
884
838
|
}
|
|
885
839
|
|
|
886
840
|
/**
|
|
887
|
-
*
|
|
841
|
+
* *GET_BEST** - *GET_CLOSEST**
|
|
888
842
|
*
|
|
889
|
-
* @
|
|
890
|
-
* @param p3
|
|
891
|
-
* @param p4
|
|
892
|
-
* @param p5
|
|
893
|
-
* @returns weaponUid
|
|
843
|
+
* @returns weaponGuid
|
|
894
844
|
*/
|
|
895
|
-
|
|
896
|
-
const result = inv<number>('
|
|
897
|
-
return result;
|
|
845
|
+
getCorrectKitEmoteTwirlGun(): [boolean, number] {
|
|
846
|
+
const result = inv<[boolean, number]>('0xCD356B42C57BFE01', this.ped.handle, pvi(), rai());
|
|
847
|
+
return [!!result[0], result[1]];
|
|
898
848
|
}
|
|
899
849
|
|
|
900
850
|
/**
|
|
901
|
-
* @param componentHash
|
|
902
851
|
* @param weaponHash Refer to [enum: eWeaponHash]
|
|
903
852
|
* @returns
|
|
904
853
|
*/
|
|
905
|
-
|
|
906
|
-
return inv<
|
|
854
|
+
setCurrentPedVehicleWeapon(weaponHash: eWeaponHash): boolean {
|
|
855
|
+
return inv<boolean>('0x75C55983C2C39DAA', this.ped.handle, weaponHash, rai());
|
|
907
856
|
}
|
|
908
857
|
|
|
909
858
|
/**
|
|
910
|
-
*
|
|
911
|
-
*
|
|
912
|
-
* @param
|
|
859
|
+
* Returns whether the ped has a rifle p1: 0 or 1
|
|
860
|
+
*
|
|
861
|
+
* @param p1
|
|
862
|
+
* @returns
|
|
913
863
|
*/
|
|
914
|
-
|
|
915
|
-
inv<
|
|
864
|
+
doesPedHaveRifle(p1: number): any {
|
|
865
|
+
return inv<number>('0x95CA12E2C68043E5', this.ped.handle, p1);
|
|
916
866
|
}
|
|
917
867
|
|
|
918
868
|
/**
|
|
919
|
-
*
|
|
920
|
-
*
|
|
921
|
-
*
|
|
869
|
+
* 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
|
|
870
|
+
* _A* or _B*
|
|
871
|
+
*
|
|
872
|
+
* @param weaponHash Refer to [enum: eWeaponHash]
|
|
873
|
+
* @param ped
|
|
922
874
|
*/
|
|
923
|
-
|
|
924
|
-
inv<void>('
|
|
875
|
+
N_0x14FF0C2545527F9B(weaponHash: eWeaponHash, ped: Ped): void {
|
|
876
|
+
inv<void>('0x14FF0C2545527F9B', this.ped.handle, weaponHash, ped.handle);
|
|
925
877
|
}
|
|
926
878
|
|
|
927
879
|
/**
|
|
928
|
-
*
|
|
880
|
+
* Returns iSpinHash / iVariationSpin
|
|
881
|
+
*
|
|
882
|
+
* @param weaponEmoteVariation
|
|
929
883
|
* @returns
|
|
930
884
|
*/
|
|
931
|
-
|
|
932
|
-
return inv<
|
|
885
|
+
getPedGunSpinningHashFromWeaponEmoteVariation(weaponEmoteVariation: number): number {
|
|
886
|
+
return (inv<number>('0xF3B1620B920D1708', this.ped.handle, weaponEmoteVariation, rai())) & 0xFFFFFFFF;
|
|
933
887
|
}
|
|
934
888
|
|
|
935
889
|
/**
|
|
890
|
+
* Returns whether the ped has a repeater p1: 0 or 1
|
|
891
|
+
*
|
|
936
892
|
* @param p1
|
|
937
|
-
* @returns
|
|
893
|
+
* @returns
|
|
938
894
|
*/
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
895
|
+
doesPedHaveRepeater(p1: number): any {
|
|
896
|
+
return inv<number>('0x495A04CAEC263AF8', this.ped.handle, p1);
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
/**
|
|
900
|
+
* @param weaponCollection
|
|
901
|
+
*/
|
|
902
|
+
giveWeaponCollectionToPed(weaponCollection: string | number): void {
|
|
903
|
+
inv<void>('0x899A04AFCC725D04', this.ped.handle, _h(weaponCollection));
|
|
942
904
|
}
|
|
943
905
|
|
|
944
906
|
/**
|
|
945
|
-
* Returns whether the ped has a shotgun p1: 0 or 1
|
|
946
|
-
*
|
|
947
|
-
* @param p1
|
|
948
907
|
* @returns
|
|
949
908
|
*/
|
|
950
|
-
|
|
951
|
-
return inv<
|
|
909
|
+
isPedWeaponReadyToShoot(): boolean {
|
|
910
|
+
return inv<boolean>('0xB80CA294F2F26749', this.ped.handle, rai());
|
|
952
911
|
}
|
|
953
912
|
|
|
954
|
-
|
|
955
|
-
|
|
913
|
+
/**
|
|
914
|
+
* @param componentHash
|
|
915
|
+
* @param weaponHash Refer to [enum: eWeaponHash]
|
|
916
|
+
*/
|
|
917
|
+
removeWeaponComponentFromPed(componentHash: string | number, weaponHash: eWeaponHash): void {
|
|
918
|
+
inv<void>('0x19F70C4D80494FF8', this.ped.handle, _h(componentHash), weaponHash);
|
|
956
919
|
}
|
|
957
920
|
|
|
958
921
|
/**
|
|
959
|
-
*
|
|
960
|
-
*
|
|
961
|
-
*
|
|
922
|
+
* @param visible
|
|
923
|
+
* @param deselectWeapon
|
|
924
|
+
* @param p3
|
|
925
|
+
* @param p4
|
|
926
|
+
*/
|
|
927
|
+
setPedCurrentWeaponVisible(visible: boolean, deselectWeapon: boolean, p3: boolean, p4: boolean): void {
|
|
928
|
+
inv<void>('0x0725A4CCFDED9A70', this.ped.handle, visible, deselectWeapon, p3, p4);
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
/**
|
|
932
|
+
* Old name: _DROP_CURRENT_PED_WEAPON
|
|
962
933
|
*
|
|
963
934
|
* @param p1
|
|
935
|
+
* @param attachPoint Refer to [enum: eWeaponAttachPoint]
|
|
936
|
+
* @param p3
|
|
937
|
+
* @param p4
|
|
964
938
|
* @returns
|
|
965
939
|
*/
|
|
966
|
-
|
|
967
|
-
return inv<number>('
|
|
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()));
|
|
968
942
|
}
|
|
969
943
|
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
* @param amount
|
|
973
|
-
* @param removeReason Refer to [enum: eRemoveItemReason]
|
|
974
|
-
*/
|
|
975
|
-
removeAmmoFromPed(weaponHash: eWeaponHash, amount: number, removeReason: eRemoveItemReason): void {
|
|
976
|
-
inv<void>('0xF4823C813CB8277D', this.ped.handle, weaponHash, amount, removeReason);
|
|
944
|
+
removeAllPedAmmo(): void {
|
|
945
|
+
inv<void>('0x1B83C0DEEBCBB214', this.ped.handle);
|
|
977
946
|
}
|
|
978
947
|
|
|
979
948
|
/**
|
|
980
|
-
* @param
|
|
981
|
-
* @param p2
|
|
949
|
+
* @param allow
|
|
982
950
|
*/
|
|
983
|
-
|
|
984
|
-
inv<void>('
|
|
951
|
+
setAllowDualWield(allow: boolean): void {
|
|
952
|
+
inv<void>('0x83B8D50EB9446BBA', this.ped.handle, allow);
|
|
985
953
|
}
|
|
986
954
|
|
|
987
955
|
/**
|
|
988
|
-
* Returns
|
|
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
|
|
989
964
|
*
|
|
990
|
-
* @param
|
|
965
|
+
* @param variation
|
|
991
966
|
* @returns
|
|
992
967
|
*/
|
|
993
|
-
|
|
994
|
-
return
|
|
968
|
+
getWeaponEmoteVariation(variation: number): number {
|
|
969
|
+
return inv<number>('0x86147D05FA831D3A', this.ped.handle, variation, rai());
|
|
995
970
|
}
|
|
996
971
|
|
|
997
972
|
/**
|
|
998
973
|
* @param weaponHash Refer to [enum: eWeaponHash]
|
|
999
|
-
* @returns
|
|
974
|
+
* @returns
|
|
1000
975
|
*/
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
return [!!result[0], result[1]];
|
|
976
|
+
isPedCarryingWeapon(weaponHash: eWeaponHash): any {
|
|
977
|
+
return inv<number>('0xF29A186ED428B552', this.ped.handle, weaponHash);
|
|
1004
978
|
}
|
|
1005
979
|
|
|
1006
980
|
/**
|
|
1007
|
-
* @
|
|
1008
|
-
* @param ammo
|
|
981
|
+
* @returns
|
|
1009
982
|
*/
|
|
1010
|
-
|
|
1011
|
-
inv<
|
|
983
|
+
refillAmmoInCurrentPedWeapon(): any {
|
|
984
|
+
return inv<number>('0x0A2AB7B7ABC055F4', this.ped.handle);
|
|
1012
985
|
}
|
|
1013
986
|
|
|
1014
987
|
/**
|
|
1015
|
-
*
|
|
1016
|
-
*
|
|
1017
|
-
*
|
|
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
|
|
1018
991
|
*
|
|
1019
|
-
* @param
|
|
1020
|
-
* @param
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
* @param addReason Refer to [enum: eAddItemReason]
|
|
1028
|
-
* @param bIgnoreUnlocks
|
|
1029
|
-
* @param permanentDegradation
|
|
1030
|
-
* @param p12
|
|
992
|
+
* @param p0
|
|
993
|
+
* @param immediately
|
|
994
|
+
*/
|
|
995
|
+
hidePedWeapons(p0: number, immediately: boolean): void {
|
|
996
|
+
inv<void>('0xFCCC886EDE3C63EC', this.ped.handle, p0, immediately);
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
/**
|
|
1031
1000
|
* @returns
|
|
1032
1001
|
*/
|
|
1033
|
-
|
|
1034
|
-
return (inv<number>('
|
|
1002
|
+
getPedHogtieWeapon(): number {
|
|
1003
|
+
return (inv<number>('0x90EB1CB189923587', this.ped.handle, rai())) & 0xFFFFFFFF;
|
|
1035
1004
|
}
|
|
1036
1005
|
|
|
1037
1006
|
/**
|
|
1038
|
-
*
|
|
1007
|
+
* Returns whether the ped has a pistol p1: 0 or 1
|
|
1008
|
+
*
|
|
1009
|
+
* @param p1
|
|
1039
1010
|
* @returns
|
|
1040
1011
|
*/
|
|
1041
|
-
|
|
1042
|
-
return inv<number>('
|
|
1012
|
+
doesPedHavePistol(p1: number): any {
|
|
1013
|
+
return inv<number>('0xBFCA7AFABF9D7967', this.ped.handle, p1);
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
/**
|
|
1017
|
+
* *STOP** - *TEST**
|
|
1018
|
+
*
|
|
1019
|
+
* @param emoteType
|
|
1020
|
+
*/
|
|
1021
|
+
setGunSpinningInventorySlotIdActivate(emoteType: number): void {
|
|
1022
|
+
inv<void>('0x408CF580C5E96D49', this.ped.handle, emoteType);
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
/**
|
|
1026
|
+
* @returns weaponHash: Refer to [enum: eWeaponHash]
|
|
1027
|
+
*/
|
|
1028
|
+
getCurrentPedVehicleWeapon(): [boolean, number] {
|
|
1029
|
+
const result = inv<[boolean, number]>('0x1017582BCD3832DC', this.ped.handle, pvi(), rai());
|
|
1030
|
+
return [!!result[0], result[1]];
|
|
1043
1031
|
}
|
|
1044
1032
|
|
|
1045
1033
|
/**
|
|
1046
1034
|
* @param attachPoint Refer to [enum: eWeaponAttachPoint]
|
|
1047
|
-
* @
|
|
1035
|
+
* @param visible
|
|
1048
1036
|
*/
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
return [result[0], result[1]];
|
|
1037
|
+
setPedWeaponAttachPointVisibility(attachPoint: number, visible: boolean): void {
|
|
1038
|
+
inv<void>('0x67E21ACC5C0C970C', this.ped.handle, attachPoint, visible);
|
|
1052
1039
|
}
|
|
1053
1040
|
|
|
1054
1041
|
/**
|
|
1055
|
-
*
|
|
1042
|
+
* @param p1
|
|
1043
|
+
* @param p2
|
|
1044
|
+
* @param p3
|
|
1045
|
+
* @param immediately
|
|
1046
|
+
*/
|
|
1047
|
+
holsterPedWeapons(p1: boolean, p2: boolean, p3: boolean, immediately: boolean): void {
|
|
1048
|
+
inv<void>('0x94A3C1B804D291EC', this.ped.handle, p1, p2, p3, immediately);
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
/**
|
|
1052
|
+
* onlyCheckPlayerInventory: If true, it will only check the players current inventory. If false, it also checks your horse inventory
|
|
1056
1053
|
*
|
|
1057
|
-
* @param
|
|
1054
|
+
* @param weaponHash Refer to [enum: eWeaponHash]
|
|
1055
|
+
* @param p2
|
|
1056
|
+
* @param onlyCheckPlayerInventory
|
|
1057
|
+
* @returns
|
|
1058
1058
|
*/
|
|
1059
|
-
|
|
1060
|
-
inv<
|
|
1059
|
+
hasPedGotWeapon(weaponHash: eWeaponHash, p2: number, onlyCheckPlayerInventory: boolean): boolean {
|
|
1060
|
+
return inv<boolean>('0x8DECB02F88F428BC', this.ped.handle, weaponHash, p2, onlyCheckPlayerInventory, rai());
|
|
1061
1061
|
}
|
|
1062
1062
|
|
|
1063
1063
|
}
|