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