@nativewrappers/redm-codegen 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/classes/AnimScene.d.ts +101 -101
- package/dist/classes/AnimScene.d.ts.map +1 -1
- package/dist/classes/AnimScene.js +147 -147
- package/dist/classes/BaseModel.d.ts +12 -12
- package/dist/classes/BaseModel.d.ts.map +1 -1
- package/dist/classes/BaseModel.js +18 -18
- package/dist/classes/BaseTask.d.ts +22 -22
- package/dist/classes/BaseTask.d.ts.map +1 -1
- package/dist/classes/BaseTask.js +29 -29
- package/dist/classes/Cam.d.ts +86 -86
- package/dist/classes/Cam.d.ts.map +1 -1
- package/dist/classes/Cam.js +116 -116
- package/dist/classes/Entity.d.ts +426 -425
- package/dist/classes/Entity.d.ts.map +1 -1
- package/dist/classes/Entity.js +594 -589
- package/dist/classes/Interior.d.ts +1 -1
- package/dist/classes/Interior.d.ts.map +1 -1
- package/dist/classes/Ped.d.ts +13 -12
- package/dist/classes/Ped.d.ts.map +1 -1
- package/dist/classes/Ped.js +5 -0
- package/dist/classes/PedTask.d.ts +729 -729
- package/dist/classes/PedTask.d.ts.map +1 -1
- package/dist/classes/PedTask.js +951 -951
- package/dist/classes/PersChar.d.ts +11 -11
- package/dist/classes/PersChar.d.ts.map +1 -1
- package/dist/classes/PersChar.js +17 -17
- package/dist/classes/Pickup.d.ts +3 -3
- package/dist/classes/Pickup.d.ts.map +1 -1
- package/dist/classes/Pickup.js +7 -7
- package/dist/classes/Player.d.ts +164 -164
- package/dist/classes/Player.d.ts.map +1 -1
- package/dist/classes/Player.js +218 -218
- package/dist/classes/Prop.d.ts +87 -86
- package/dist/classes/Prop.d.ts.map +1 -1
- package/dist/classes/Prop.js +131 -126
- package/dist/classes/PropSet.d.ts +18 -18
- package/dist/classes/PropSet.d.ts.map +1 -1
- package/dist/classes/PropSet.js +25 -25
- 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 +18 -18
- package/dist/classes/VehicleTask.d.ts.map +1 -1
- package/dist/classes/VehicleTask.js +26 -26
- package/dist/classes/Volume.d.ts +1 -1
- package/dist/classes/Volume.d.ts.map +1 -1
- package/dist/classes/Weapon.d.ts +277 -277
- package/dist/classes/Weapon.d.ts.map +1 -1
- package/dist/classes/Weapon.js +398 -398
- 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 +51 -51
- package/dist/namespaces/Animscene.d.ts.map +1 -1
- package/dist/namespaces/Animscene.js +69 -69
- package/dist/namespaces/Audio.d.ts +2 -2
- package/dist/namespaces/Audio.d.ts.map +1 -1
- package/dist/namespaces/Bounty.d.ts +57 -57
- package/dist/namespaces/Bounty.d.ts.map +1 -1
- package/dist/namespaces/Bounty.js +90 -90
- 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 +317 -317
- package/dist/namespaces/CamStatics.d.ts.map +1 -1
- package/dist/namespaces/CamStatics.js +449 -449
- package/dist/namespaces/Collection.d.ts +13 -13
- package/dist/namespaces/Collection.d.ts.map +1 -1
- package/dist/namespaces/Collection.js +8 -8
- 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 +60 -60
- package/dist/namespaces/Compendium.d.ts.map +1 -1
- package/dist/namespaces/Compendium.js +80 -80
- package/dist/namespaces/Crashlog.d.ts +10 -10
- package/dist/namespaces/Crashlog.d.ts.map +1 -1
- package/dist/namespaces/Crashlog.js +14 -14
- package/dist/namespaces/Databinding.d.ts +173 -173
- package/dist/namespaces/Databinding.d.ts.map +1 -1
- package/dist/namespaces/Databinding.js +263 -263
- 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 +178 -178
- package/dist/namespaces/EntityStatics.d.ts.map +1 -1
- package/dist/namespaces/EntityStatics.js +242 -242
- 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 +797 -797
- package/dist/namespaces/Graphics.d.ts.map +1 -1
- package/dist/namespaces/Graphics.js +1095 -1095
- package/dist/namespaces/Hud.d.ts +477 -477
- package/dist/namespaces/Hud.d.ts.map +1 -1
- package/dist/namespaces/Hud.js +721 -721
- package/dist/namespaces/InteriorStatics.d.ts +2 -2
- package/dist/namespaces/InteriorStatics.d.ts.map +1 -1
- package/dist/namespaces/Inventory.d.ts +216 -216
- package/dist/namespaces/Inventory.d.ts.map +1 -1
- package/dist/namespaces/Inventory.js +301 -301
- package/dist/namespaces/Itemdatabase.d.ts +8 -8
- package/dist/namespaces/Itemdatabase.d.ts.map +1 -1
- package/dist/namespaces/Itemdatabase.js +7 -7
- package/dist/namespaces/Law.d.ts +2 -2
- package/dist/namespaces/Law.d.ts.map +1 -1
- package/dist/namespaces/Map.d.ts +65 -65
- package/dist/namespaces/Map.d.ts.map +1 -1
- package/dist/namespaces/Map.js +91 -91
- package/dist/namespaces/Minigame.d.ts +17 -17
- package/dist/namespaces/Minigame.d.ts.map +1 -1
- package/dist/namespaces/Minigame.js +25 -25
- 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 +1302 -1310
- package/dist/namespaces/Network.d.ts.map +1 -1
- package/dist/namespaces/Network.js +1910 -1918
- package/dist/namespaces/Object.d.ts +170 -170
- package/dist/namespaces/Object.d.ts.map +1 -1
- package/dist/namespaces/Object.js +232 -232
- package/dist/namespaces/Pad.d.ts +103 -103
- package/dist/namespaces/Pad.d.ts.map +1 -1
- package/dist/namespaces/Pad.js +134 -134
- package/dist/namespaces/PedStatics.d.ts +3 -3
- package/dist/namespaces/PedStatics.d.ts.map +1 -1
- package/dist/namespaces/Perschar.d.ts +71 -71
- package/dist/namespaces/Perschar.d.ts.map +1 -1
- package/dist/namespaces/Perschar.js +106 -106
- 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/PlayerStatics.d.ts +52 -52
- package/dist/namespaces/PlayerStatics.d.ts.map +1 -1
- package/dist/namespaces/PlayerStatics.js +71 -71
- package/dist/namespaces/Population.d.ts +3 -3
- package/dist/namespaces/Population.d.ts.map +1 -1
- package/dist/namespaces/Posse.d.ts +28 -28
- package/dist/namespaces/Posse.d.ts.map +1 -1
- package/dist/namespaces/Posse.js +44 -44
- package/dist/namespaces/Propset.d.ts +59 -59
- package/dist/namespaces/Propset.d.ts.map +1 -1
- package/dist/namespaces/Propset.js +81 -81
- package/dist/namespaces/Scripts.d.ts +3 -3
- package/dist/namespaces/Scripts.d.ts.map +1 -1
- package/dist/namespaces/Socialclub.d.ts +1 -1
- package/dist/namespaces/Socialclub.d.ts.map +1 -1
- package/dist/namespaces/Stats.d.ts +85 -85
- package/dist/namespaces/Stats.d.ts.map +1 -1
- package/dist/namespaces/Stats.js +113 -113
- package/dist/namespaces/Streaming.d.ts +35 -35
- package/dist/namespaces/Streaming.d.ts.map +1 -1
- package/dist/namespaces/Streaming.js +53 -53
- package/dist/namespaces/Task.d.ts +367 -367
- package/dist/namespaces/Task.d.ts.map +1 -1
- package/dist/namespaces/Task.js +508 -508
- package/dist/namespaces/Telemetry.d.ts +198 -198
- package/dist/namespaces/Telemetry.d.ts.map +1 -1
- package/dist/namespaces/Telemetry.js +274 -274
- 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/Water.d.ts +27 -27
- package/dist/namespaces/Water.d.ts.map +1 -1
- package/dist/namespaces/Water.js +41 -41
- package/dist/namespaces/WeaponStatics.d.ts +250 -250
- package/dist/namespaces/WeaponStatics.d.ts.map +1 -1
- package/dist/namespaces/WeaponStatics.js +372 -372
- package/dist/namespaces/Zone.d.ts +8 -8
- package/dist/namespaces/Zone.d.ts.map +1 -1
- package/dist/namespaces/Zone.js +9 -9
- package/package.json +1 -1
- package/src/classes/AnimScene.ts +170 -170
- package/src/classes/BaseModel.ts +21 -21
- package/src/classes/BaseTask.ts +31 -31
- package/src/classes/Cam.ts +124 -124
- package/src/classes/Entity.ts +619 -614
- package/src/classes/Interior.ts +1 -1
- package/src/classes/Ped.ts +17 -12
- package/src/classes/PedTask.ts +1011 -1011
- package/src/classes/PersChar.ts +19 -19
- package/src/classes/Pickup.ts +8 -8
- package/src/classes/Player.ts +227 -227
- package/src/classes/Prop.ts +146 -141
- package/src/classes/PropSet.ts +29 -29
- package/src/classes/Vehicle.ts +5 -0
- package/src/classes/VehicleTask.ts +30 -30
- package/src/classes/Volume.ts +1 -1
- package/src/classes/Weapon.ts +414 -414
- package/src/namespaces/Aitransport.ts +102 -102
- package/src/namespaces/Animscene.ts +78 -78
- package/src/namespaces/Audio.ts +2 -2
- package/src/namespaces/Bounty.ts +102 -102
- package/src/namespaces/Brain.ts +22 -22
- package/src/namespaces/CamStatics.ts +501 -501
- package/src/namespaces/Collection.ts +16 -16
- package/src/namespaces/Companion.ts +34 -34
- package/src/namespaces/Compendium.ts +93 -93
- package/src/namespaces/Crashlog.ts +16 -16
- package/src/namespaces/Databinding.ts +280 -280
- package/src/namespaces/Dlc.ts +9 -9
- package/src/namespaces/EntityStatics.ts +249 -249
- package/src/namespaces/Event.ts +92 -92
- package/src/namespaces/Fire.ts +10 -10
- package/src/namespaces/Graphics.ts +1155 -1155
- package/src/namespaces/Hud.ts +763 -763
- package/src/namespaces/InteriorStatics.ts +2 -2
- package/src/namespaces/Inventory.ts +321 -321
- package/src/namespaces/Itemdatabase.ts +11 -11
- package/src/namespaces/Law.ts +2 -2
- package/src/namespaces/Map.ts +104 -104
- package/src/namespaces/Minigame.ts +29 -29
- 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 +1921 -1929
- package/src/namespaces/Object.ts +237 -237
- package/src/namespaces/Pad.ts +151 -151
- package/src/namespaces/PedStatics.ts +3 -3
- package/src/namespaces/Perschar.ts +116 -116
- package/src/namespaces/Persistence.ts +48 -48
- package/src/namespaces/PlayerStatics.ts +75 -75
- package/src/namespaces/Population.ts +3 -3
- package/src/namespaces/Posse.ts +47 -47
- package/src/namespaces/Propset.ts +92 -92
- package/src/namespaces/Scripts.ts +3 -3
- package/src/namespaces/Socialclub.ts +1 -1
- package/src/namespaces/Stats.ts +129 -129
- package/src/namespaces/Streaming.ts +62 -62
- package/src/namespaces/Task.ts +538 -538
- package/src/namespaces/Telemetry.ts +295 -295
- package/src/namespaces/Uiapps.ts +39 -39
- package/src/namespaces/Uistickyfeed.ts +23 -23
- package/src/namespaces/VehicleStatics.ts +2 -2
- package/src/namespaces/Water.ts +47 -47
- package/src/namespaces/WeaponStatics.ts +394 -394
- package/src/namespaces/Zone.ts +11 -11
package/src/classes/Entity.ts
CHANGED
|
@@ -19,286 +19,345 @@ export class Entity implements IHandle {
|
|
|
19
19
|
return handle === 0 ? null : new Entity(handle);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
static fromNetworkId(netId: number): Entity | null {
|
|
23
|
+
if (!inv<number>('0x38CE16C96BD11F2C', netId, rai())) return null;
|
|
24
|
+
return Entity.fromHandle(inv<number>('0x5B912C3F653822E6', netId, rai()));
|
|
25
|
+
}
|
|
26
|
+
|
|
22
27
|
/**
|
|
23
|
-
* @param targetEntity
|
|
24
28
|
* @returns
|
|
25
29
|
*/
|
|
26
|
-
|
|
27
|
-
return inv<
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
deleteCarriable(): void {
|
|
31
|
-
inv<void>('0x0D0DB2B6AF19A987', this.handle);
|
|
30
|
+
getIsBird(): any {
|
|
31
|
+
return inv<number>('0xC346A546612C49A9', this.handle);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
35
|
+
* Gets the entity's forward vector in YX(Z) eulers. Similar to GET_ENTITY_FORWARD_VECTOR
|
|
36
36
|
*
|
|
37
|
-
* @param animDict
|
|
38
|
-
* @param animName
|
|
39
37
|
* @returns
|
|
40
38
|
*/
|
|
41
|
-
|
|
42
|
-
return inv<number>('
|
|
39
|
+
getForwardVectorYx(): Vector3 {
|
|
40
|
+
return Vector3.fromArray(inv<number[]>('0x935A30AA88FB1014', this.handle, rav()));
|
|
43
41
|
}
|
|
44
42
|
|
|
45
43
|
/**
|
|
46
|
-
* @param
|
|
47
|
-
* @param
|
|
44
|
+
* @param pos
|
|
45
|
+
* @param xAxis
|
|
46
|
+
* @param yAxis
|
|
47
|
+
* @param zAxis
|
|
48
|
+
* @param clearArea
|
|
48
49
|
*/
|
|
49
|
-
|
|
50
|
-
inv<void>('
|
|
50
|
+
setCoords(pos: Vector3, xAxis: boolean, yAxis: boolean, zAxis: boolean, clearArea: boolean): void {
|
|
51
|
+
inv<void>('0x06843DA7060A026B', this.handle, f(pos.x), f(pos.y), f(pos.z), xAxis, yAxis, zAxis, clearArea);
|
|
51
52
|
}
|
|
52
53
|
|
|
53
54
|
/**
|
|
54
|
-
*
|
|
55
|
-
*
|
|
55
|
+
* @param boneName
|
|
56
56
|
* @returns
|
|
57
57
|
*/
|
|
58
|
-
|
|
59
|
-
return inv<number>('
|
|
58
|
+
getBoneIndexByName(boneName: string | null): number {
|
|
59
|
+
return inv<number>('0xBACA8FE9C76C124E', this.handle, boneName, rai());
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
/**
|
|
63
|
-
* @param
|
|
63
|
+
* @param pause
|
|
64
64
|
*/
|
|
65
|
-
|
|
66
|
-
inv<void>('
|
|
65
|
+
pauseTracking(pause: boolean): void {
|
|
66
|
+
inv<void>('0x36EB4D34D4A092C5', this.handle, pause);
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
/**
|
|
70
|
-
* @
|
|
70
|
+
* @param toggle
|
|
71
71
|
*/
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
setLoadCollisionFlag(toggle: boolean): void {
|
|
73
|
+
inv<void>('0x9B9EE31AED48072E', this.handle, toggle);
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
/**
|
|
77
|
-
*
|
|
78
|
-
*
|
|
77
|
+
* Changes type and quality of skins
|
|
78
|
+
* type hashes: https://pastebin.com/C1WvQjCy
|
|
79
|
+
*
|
|
80
|
+
* @param type
|
|
79
81
|
*/
|
|
80
|
-
|
|
81
|
-
inv<void>('
|
|
82
|
+
setCarcassType(type: string | number): void {
|
|
83
|
+
inv<void>('0x399657ED871B3A6C', this.handle, _h(type));
|
|
82
84
|
}
|
|
83
85
|
|
|
84
86
|
/**
|
|
85
|
-
* @
|
|
87
|
+
* @param toggle
|
|
86
88
|
*/
|
|
87
|
-
|
|
88
|
-
|
|
89
|
+
setHasGravity(toggle: boolean): void {
|
|
90
|
+
inv<void>('0x0CEDB728A1083FA7', this.handle, toggle);
|
|
89
91
|
}
|
|
90
92
|
|
|
91
93
|
/**
|
|
92
|
-
* @param
|
|
93
|
-
* @param traceType
|
|
94
|
+
* @param relative
|
|
94
95
|
* @returns
|
|
95
96
|
*/
|
|
96
|
-
|
|
97
|
-
return inv<
|
|
97
|
+
getSpeedVector(relative: boolean): Vector3 {
|
|
98
|
+
return Vector3.fromArray(inv<number[]>('0xF2DB09816A419DC5', this.handle, relative, rav()));
|
|
98
99
|
}
|
|
99
100
|
|
|
100
101
|
/**
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
* @param animDict
|
|
105
|
-
* @param animClip
|
|
102
|
+
* @param entity2
|
|
103
|
+
* @param p2
|
|
104
|
+
* @param p3
|
|
106
105
|
* @returns
|
|
107
106
|
*/
|
|
108
|
-
|
|
109
|
-
return inv<
|
|
107
|
+
hasBeenDamagedByEntity(entity2: Entity, p2: boolean, p3: boolean): boolean {
|
|
108
|
+
return inv<boolean>('0x7B6E7BEC1143AC86', this.handle, entity2.handle, p2, p3, rai());
|
|
110
109
|
}
|
|
111
110
|
|
|
112
111
|
/**
|
|
113
|
-
* @param playerPedToIgnore
|
|
114
|
-
* @param flags
|
|
115
112
|
* @returns
|
|
116
113
|
*/
|
|
117
|
-
|
|
118
|
-
return
|
|
114
|
+
isFullyLooted(): any {
|
|
115
|
+
return inv<number>('0x8DE41E9902E85756', this.handle);
|
|
119
116
|
}
|
|
120
117
|
|
|
121
118
|
/**
|
|
122
|
-
* Gets the Y-component of the entity's forward vector.
|
|
123
|
-
*
|
|
124
119
|
* @returns
|
|
125
120
|
*/
|
|
126
|
-
|
|
127
|
-
return inv<
|
|
121
|
+
isOccluded(): boolean {
|
|
122
|
+
return inv<boolean>('0x140188E884645624', this.handle, rai());
|
|
128
123
|
}
|
|
129
124
|
|
|
130
125
|
/**
|
|
131
|
-
* @param
|
|
132
|
-
* @param roll
|
|
133
|
-
* @param yaw
|
|
134
|
-
* @param rotationOrder
|
|
135
|
-
* @param p5
|
|
126
|
+
* @param toggle
|
|
136
127
|
*/
|
|
137
|
-
|
|
138
|
-
inv<void>('
|
|
128
|
+
setCanBeDamaged(toggle: boolean): void {
|
|
129
|
+
inv<void>('0x0D06D522B90E861F', this.handle, toggle);
|
|
139
130
|
}
|
|
140
131
|
|
|
141
132
|
/**
|
|
142
|
-
* @param
|
|
143
|
-
* @param
|
|
133
|
+
* @param forceFlags
|
|
134
|
+
* @param pos
|
|
135
|
+
* @param offset
|
|
136
|
+
* @param boneIndex
|
|
137
|
+
* @param isDirectionRel
|
|
138
|
+
* @param ignoreUpVec
|
|
139
|
+
* @param isForceRel
|
|
140
|
+
* @param p12
|
|
141
|
+
* @param p13
|
|
144
142
|
*/
|
|
145
|
-
|
|
146
|
-
inv<void>('
|
|
143
|
+
applyForceToEntity(forceFlags: number, pos: Vector3, offset: Vector3, boneIndex: number, isDirectionRel: boolean, ignoreUpVec: boolean, isForceRel: boolean, p12: boolean, p13: boolean): void {
|
|
144
|
+
inv<void>('0xF15E8F5D333F09C4', this.handle, forceFlags, f(pos.x), f(pos.y), f(pos.z), f(offset.x), f(offset.y), f(offset.z), boneIndex, isDirectionRel, ignoreUpVec, isForceRel, p12, p13);
|
|
147
145
|
}
|
|
148
146
|
|
|
149
147
|
/**
|
|
150
|
-
*
|
|
151
|
-
* BOOL p2: handles an additional special proofs flag, so it simply indicates whether it should be enabled or disabled, not sure what exactly it proofs the entity from though
|
|
152
|
-
*
|
|
153
|
-
* @param proofsBitset
|
|
154
|
-
* @param specialFlag
|
|
148
|
+
* @returns
|
|
155
149
|
*/
|
|
156
|
-
|
|
157
|
-
inv<
|
|
150
|
+
isDead(): boolean {
|
|
151
|
+
return inv<boolean>('0x7D5B1F88E7504BBA', this.handle, rai());
|
|
158
152
|
}
|
|
159
153
|
|
|
160
154
|
/**
|
|
155
|
+
* @param pos1
|
|
156
|
+
* @param pos2
|
|
157
|
+
* @param p7
|
|
158
|
+
* @param p8
|
|
159
|
+
* @param p9
|
|
161
160
|
* @returns
|
|
162
161
|
*/
|
|
163
|
-
|
|
164
|
-
return inv<boolean>('
|
|
162
|
+
isInArea(pos1: Vector3, pos2: Vector3, p7: boolean, p8: boolean, p9: any): boolean {
|
|
163
|
+
return inv<boolean>('0x0C2634C40A16193E', this.handle, f(pos1.x), f(pos1.y), f(pos1.z), f(pos2.x), f(pos2.y), f(pos2.z), p7, p8, p9, rai());
|
|
165
164
|
}
|
|
166
165
|
|
|
167
166
|
/**
|
|
167
|
+
* Returns the coordinates of an entity-bone.
|
|
168
|
+
* https://github.com/femga/rdr3_discoveries/tree/master/boneNames
|
|
169
|
+
*
|
|
170
|
+
* @param boneIndex
|
|
168
171
|
* @returns
|
|
169
172
|
*/
|
|
170
|
-
|
|
171
|
-
return inv<number>('
|
|
173
|
+
getWorldPositionOfBone(boneIndex: number): Vector3 {
|
|
174
|
+
return Vector3.fromArray(inv<number[]>('0x82CFA50E34681CA5', this.handle, boneIndex, rav()));
|
|
172
175
|
}
|
|
173
176
|
|
|
174
177
|
/**
|
|
175
|
-
*
|
|
178
|
+
* https://github.com/femga/rdr3_discoveries/tree/master/animations
|
|
179
|
+
*
|
|
180
|
+
* @param animName
|
|
181
|
+
* @param animDict
|
|
182
|
+
* @param p3
|
|
183
|
+
* @param loop
|
|
184
|
+
* @param stayInAnim
|
|
185
|
+
* @param p6
|
|
186
|
+
* @param delta
|
|
187
|
+
* @param bitset
|
|
176
188
|
* @returns
|
|
177
189
|
*/
|
|
178
|
-
|
|
179
|
-
return
|
|
190
|
+
playAnim(animName: string | null, animDict: string | null, p3: number, loop: boolean, stayInAnim: boolean, p6: boolean, delta: number, bitset: any): boolean {
|
|
191
|
+
return inv<boolean>('0xDC6D22FAB76D4874', this.handle, animName, animDict, f(p3), loop, stayInAnim, p6, f(delta), bitset, rai());
|
|
180
192
|
}
|
|
181
193
|
|
|
182
194
|
/**
|
|
183
|
-
*
|
|
195
|
+
* Returns false if entity is not a ped or object.
|
|
196
|
+
*
|
|
197
|
+
* @returns lootTable
|
|
184
198
|
*/
|
|
185
|
-
|
|
186
|
-
inv<
|
|
199
|
+
getScriptOverrideLootTablePermanent(): [any, number] {
|
|
200
|
+
const result = inv<[number, number]>('0x1E804EA9B12030A4', this.handle, pvi());
|
|
201
|
+
return [result[0], result[1]];
|
|
187
202
|
}
|
|
188
203
|
|
|
189
204
|
/**
|
|
190
|
-
*
|
|
191
|
-
*
|
|
192
|
-
*
|
|
193
|
-
* @param lootTable
|
|
205
|
+
* @param animDict
|
|
206
|
+
* @param animName
|
|
207
|
+
* @param p3
|
|
194
208
|
* @returns
|
|
195
209
|
*/
|
|
196
|
-
|
|
197
|
-
return inv<
|
|
210
|
+
hasAnimFinished(animDict: string | null, animName: string | null, p3: number): boolean {
|
|
211
|
+
return inv<boolean>('0xAEB40615337EF1E3', this.handle, animDict, animName, p3, rai());
|
|
198
212
|
}
|
|
199
213
|
|
|
200
214
|
/**
|
|
201
|
-
* @
|
|
215
|
+
* @param bCanBeDamaged
|
|
216
|
+
* @param relGroup
|
|
202
217
|
*/
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
return [result[0] & 0xFFFFFFFF, result[1]];
|
|
218
|
+
setCanBeDamagedByRelationshipGroup(bCanBeDamaged: boolean, relGroup: string | number): void {
|
|
219
|
+
inv<void>('0x0EF1AFB18649E015', this.handle, bCanBeDamaged, _h(relGroup));
|
|
206
220
|
}
|
|
207
221
|
|
|
208
222
|
/**
|
|
209
|
-
* @param actionHash
|
|
210
223
|
* @returns
|
|
211
224
|
*/
|
|
212
|
-
|
|
213
|
-
return inv<
|
|
225
|
+
getUprightValue(): number {
|
|
226
|
+
return inv<number>('0x56398BE65160C3BE', this.handle, raf());
|
|
214
227
|
}
|
|
215
228
|
|
|
216
229
|
/**
|
|
217
|
-
* @param
|
|
230
|
+
* @param pos
|
|
231
|
+
* @param heading
|
|
232
|
+
* @param xAxis
|
|
233
|
+
* @param yAxis
|
|
234
|
+
* @param zAxis
|
|
218
235
|
*/
|
|
219
|
-
|
|
220
|
-
inv<void>('
|
|
236
|
+
setCoordsAndHeading(pos: Vector3, heading: number, xAxis: boolean, yAxis: boolean, zAxis: boolean): void {
|
|
237
|
+
inv<void>('0x203BEFFDBE12E96A', this.handle, f(pos.x), f(pos.y), f(pos.z), f(heading), xAxis, yAxis, zAxis);
|
|
221
238
|
}
|
|
222
239
|
|
|
223
240
|
/**
|
|
224
|
-
*
|
|
241
|
+
* Returns zero if the entity is not a carriable
|
|
225
242
|
*
|
|
226
243
|
* @returns
|
|
227
244
|
*/
|
|
228
|
-
|
|
229
|
-
return inv<number>('
|
|
245
|
+
getCarryConfig(): number {
|
|
246
|
+
return (inv<number>('0x0FD25587BB306C86', this.handle, rai())) & 0xFFFFFFFF;
|
|
230
247
|
}
|
|
231
248
|
|
|
232
249
|
/**
|
|
233
|
-
*
|
|
250
|
+
* tier: https://github.com/Halen84/RDR3-Native-Flags-And-Enums/tree/main/eEntityThreatTier
|
|
234
251
|
*
|
|
235
|
-
* @
|
|
252
|
+
* @param tier
|
|
253
|
+
* @param p2
|
|
236
254
|
*/
|
|
237
|
-
|
|
238
|
-
|
|
255
|
+
setThreatTier(tier: number, p2: boolean): void {
|
|
256
|
+
inv<void>('0x4B436BAC8CBE9B07', this.handle, tier, p2);
|
|
239
257
|
}
|
|
240
258
|
|
|
241
259
|
/**
|
|
260
|
+
* Returns the heading of the entity in degrees. Also know as the "Yaw" of an entity.
|
|
261
|
+
*
|
|
242
262
|
* @returns
|
|
243
263
|
*/
|
|
244
|
-
|
|
245
|
-
return inv<
|
|
264
|
+
getHeading(): number {
|
|
265
|
+
return inv<number>('0xC230DD956E2F5507', this.handle, raf());
|
|
246
266
|
}
|
|
247
267
|
|
|
248
268
|
/**
|
|
249
|
-
*
|
|
269
|
+
* Returns the LOD distance of an entity.
|
|
250
270
|
*
|
|
251
271
|
* @returns
|
|
252
272
|
*/
|
|
253
|
-
|
|
254
|
-
return inv<number>('
|
|
273
|
+
getLodDist(): number {
|
|
274
|
+
return inv<number>('0xDF240D0C2A948683', this.handle, rai());
|
|
255
275
|
}
|
|
256
276
|
|
|
257
277
|
/**
|
|
258
278
|
* @returns
|
|
259
279
|
*/
|
|
260
|
-
|
|
261
|
-
return inv<boolean>('
|
|
280
|
+
doesHaveDrawable(): boolean {
|
|
281
|
+
return inv<boolean>('0x20487F0DA9AF164A', this.handle, rai());
|
|
262
282
|
}
|
|
263
283
|
|
|
264
284
|
/**
|
|
265
|
-
* @
|
|
285
|
+
* @param xyzw
|
|
266
286
|
*/
|
|
267
|
-
|
|
268
|
-
|
|
287
|
+
setQuaternion(xyzw: Vector4): void {
|
|
288
|
+
inv<void>('0x100E7007D13E3687', this.handle, f(xyzw.x), f(xyzw.y), f(xyzw.z), f(xyzw.w));
|
|
269
289
|
}
|
|
270
290
|
|
|
271
291
|
/**
|
|
272
292
|
* @returns
|
|
273
293
|
*/
|
|
274
|
-
|
|
275
|
-
return inv<boolean>('
|
|
294
|
+
isAttachedToAnyObject(): boolean {
|
|
295
|
+
return inv<boolean>('0x306C1F6178F01AB3', this.handle, rai());
|
|
276
296
|
}
|
|
277
297
|
|
|
278
298
|
/**
|
|
279
|
-
*
|
|
299
|
+
* Sets a ped or an object totally invincible. It doesn't take any kind of damage. Peds will not ragdoll on explosions.
|
|
280
300
|
*
|
|
281
|
-
* @
|
|
301
|
+
* @param toggle
|
|
282
302
|
*/
|
|
283
|
-
|
|
284
|
-
|
|
303
|
+
setInvincible(toggle: boolean): void {
|
|
304
|
+
inv<void>('0xA5C38736C426FCB8', this.handle, toggle);
|
|
285
305
|
}
|
|
286
306
|
|
|
287
307
|
/**
|
|
288
|
-
*
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
308
|
+
* Attaches entity1 to bone (boneIndex) of entity2. boneIndex - this is different to boneID, use GET_PED_BONE_INDEX to get the index from the ID. use the index for attaching to specific bones. entity1 will be attached to entity2's centre if bone index given doesn't correspond to bone indexes for that entity type.
|
|
309
|
+
* https://github.com/femga/rdr3_discoveries/tree/master/boneNames useSoftPinning - if set to false attached entity will not detach when fixed
|
|
310
|
+
* collision - controls collision between the two entities (FALSE disables collision).
|
|
311
|
+
* isPed - pitch doesn't work when false and roll will only work on negative numbers (only peds)
|
|
312
|
+
* vertexIndex - position of vertex
|
|
313
|
+
* fixedRot - if false it ignores entity vector
|
|
314
|
+
*
|
|
315
|
+
* @param entity2
|
|
316
|
+
* @param boneIndex
|
|
317
|
+
* @param pos
|
|
318
|
+
* @param rot
|
|
319
|
+
* @param p9
|
|
320
|
+
* @param useSoftPinning
|
|
321
|
+
* @param collision
|
|
322
|
+
* @param isPed
|
|
323
|
+
* @param vertexIndex
|
|
324
|
+
* @param fixedRot
|
|
325
|
+
* @param p15
|
|
326
|
+
* @param p16
|
|
327
|
+
*/
|
|
328
|
+
attachToEntity(entity2: Entity, boneIndex: number, pos: Vector3, rot: Vector3, p9: boolean, useSoftPinning: boolean, collision: boolean, isPed: boolean, vertexIndex: number, fixedRot: boolean, p15: boolean, p16: boolean): void {
|
|
329
|
+
inv<void>('0x6B9BBD38AB0796DF', this.handle, entity2.handle, boneIndex, f(pos.x), f(pos.y), f(pos.z), f(rot.x), f(rot.y), f(rot.z), p9, useSoftPinning, collision, isPed, vertexIndex, fixedRot, p15, p16);
|
|
292
330
|
}
|
|
293
331
|
|
|
294
332
|
/**
|
|
295
|
-
* @param team
|
|
296
|
-
* @param playerPedToIgnore
|
|
297
|
-
* @param flags
|
|
298
333
|
* @returns
|
|
299
334
|
*/
|
|
300
|
-
|
|
301
|
-
return
|
|
335
|
+
getIsAnimal(): any {
|
|
336
|
+
return inv<number>('0x9A100F1CF4546629', this.handle);
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* p6/relative - makes the xyz force not relative to world coords, but to something else
|
|
341
|
+
* p7/highForce - setting false will make the force really low
|
|
342
|
+
*
|
|
343
|
+
* @param forceType
|
|
344
|
+
* @param pos
|
|
345
|
+
* @param component
|
|
346
|
+
* @param isDirectionRel
|
|
347
|
+
* @param isForceRel
|
|
348
|
+
* @param p8
|
|
349
|
+
*/
|
|
350
|
+
applyForceToCenterOfMass(forceType: number, pos: Vector3, component: number, isDirectionRel: boolean, isForceRel: boolean, p8: boolean): void {
|
|
351
|
+
inv<void>('0x31DA7CEC5334DB37', this.handle, forceType, f(pos.x), f(pos.y), f(pos.z), component, isDirectionRel, isForceRel, p8);
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* Old name: _GET_ENTITY_CAN_BE_DAMAGED
|
|
356
|
+
*
|
|
357
|
+
* @returns
|
|
358
|
+
*/
|
|
359
|
+
getCanBeDamaged(): any {
|
|
360
|
+
return inv<number>('0x75DF9E73F2F005FD', this.handle);
|
|
302
361
|
}
|
|
303
362
|
|
|
304
363
|
/**
|
|
@@ -384,123 +443,87 @@ export class Entity implements IHandle {
|
|
|
384
443
|
}
|
|
385
444
|
|
|
386
445
|
/**
|
|
387
|
-
*
|
|
388
|
-
* {
|
|
389
|
-
* CARRIABLE_STATE_NONE,
|
|
390
|
-
* CARRIABLE_STATE_TRANSITIONING_TO_HOGTIED,
|
|
391
|
-
* CARRIABLE_STATE_CARRIABLE_INTRO,
|
|
392
|
-
* CARRIABLE_STATE_CARRIABLE,
|
|
393
|
-
* CARRIABLE_STATE_BEING_PICKED_UP_FROM_GROUND,
|
|
394
|
-
* CARRIABLE_STATE_CARRIED_BY_HUMAN,
|
|
395
|
-
* CARRIABLE_STATE_BEING_PLACED_ON_GROUND,
|
|
396
|
-
* CARRIABLE_STATE_CARRIED_BY_MOUNT,
|
|
397
|
-
* CARRIABLE_STATE_BEING_PLACED_ON_MOUNT,
|
|
398
|
-
* CARRIABLE_STATE_BEING_PICKED_UP_FROM_MOUNT,
|
|
399
|
-
* CARRIABLE_STATE_BEING_CUT_FREE,
|
|
400
|
-
* CARRIABLE_STATE_BEING_PLACED_ON_GROUND_ESCAPE,
|
|
401
|
-
* CARRIABLE_STATE_BEING_PLACED_IN_VEHICLE
|
|
402
|
-
* };
|
|
403
|
-
*
|
|
404
|
-
* @returns
|
|
446
|
+
* @param p1
|
|
405
447
|
*/
|
|
406
|
-
|
|
407
|
-
|
|
448
|
+
N_0xA48E4801DEBDF7E4(p1: boolean): void {
|
|
449
|
+
inv<void>('0xA48E4801DEBDF7E4', this.handle, p1);
|
|
408
450
|
}
|
|
409
451
|
|
|
410
452
|
/**
|
|
411
|
-
* @param
|
|
453
|
+
* @param toggle
|
|
454
|
+
* @param keepPhysics
|
|
412
455
|
*/
|
|
413
|
-
|
|
414
|
-
inv<void>('
|
|
456
|
+
setCompletelyDisableCollision(toggle: boolean, keepPhysics: boolean): void {
|
|
457
|
+
inv<void>('0xE0580EC84813875A', this.handle, toggle, keepPhysics);
|
|
415
458
|
}
|
|
416
459
|
|
|
417
460
|
/**
|
|
418
|
-
* Params: p1 (probably animType) = 1, 0
|
|
419
|
-
*
|
|
420
461
|
* @param p1
|
|
421
|
-
* @returns
|
|
422
|
-
*/
|
|
423
|
-
isPlayingAnyAnim(p1: number): boolean {
|
|
424
|
-
return inv<boolean>('0x0B7CB1300CBFE19C', this.handle, p1, rai());
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
/**
|
|
428
|
-
* @param enabled
|
|
429
462
|
*/
|
|
430
|
-
|
|
431
|
-
inv<void>('
|
|
463
|
+
N_0xCDB682BB47C02F0A(p1: string | number): void {
|
|
464
|
+
inv<void>('0xCDB682BB47C02F0A', this.handle, _h(p1));
|
|
432
465
|
}
|
|
433
466
|
|
|
434
467
|
/**
|
|
435
|
-
*
|
|
436
|
-
*
|
|
437
|
-
*
|
|
438
|
-
*
|
|
439
|
-
* @param offset
|
|
468
|
+
* @param volume
|
|
469
|
+
* @param p2
|
|
470
|
+
* @param p3
|
|
440
471
|
* @returns
|
|
441
472
|
*/
|
|
442
|
-
|
|
443
|
-
return
|
|
473
|
+
isInVolume(volume: number, p2: boolean, p3: number): boolean {
|
|
474
|
+
return inv<boolean>('0x5A5526BC09C06623', this.handle, volume, p2, p3, rai());
|
|
444
475
|
}
|
|
445
476
|
|
|
446
477
|
/**
|
|
447
|
-
*
|
|
448
|
-
*
|
|
449
|
-
* @param entity2
|
|
450
|
-
* @param xSize
|
|
451
|
-
* @param ySize
|
|
452
|
-
* @param zSize
|
|
453
|
-
* @param p5
|
|
454
|
-
* @param p6
|
|
455
|
-
* @param p7
|
|
456
|
-
* @returns
|
|
478
|
+
* @returns rightVector; forwardVector; upVector; position
|
|
457
479
|
*/
|
|
458
|
-
|
|
459
|
-
|
|
480
|
+
getMatrix(): [Vector3, Vector3, Vector3, Vector3] {
|
|
481
|
+
const result = inv<[number[], number[], number[], number[]]>('0x3A9B1120AF13FBF2', this.handle, pvv(), pvv(), pvv(), pvv());
|
|
482
|
+
return [Vector3.fromArray(result[0]), Vector3.fromArray(result[1]), Vector3.fromArray(result[2]), Vector3.fromArray(result[3])];
|
|
460
483
|
}
|
|
461
484
|
|
|
462
485
|
/**
|
|
463
|
-
*
|
|
486
|
+
* Called if entity is in water and submerged level is larger than 1f. If CARRYING_FLAG_FORCE_ALLOW_WARP_TO_SAFE_GROUND_LOCATION is true, it gets disabled as well.
|
|
464
487
|
*/
|
|
465
|
-
|
|
466
|
-
inv<void>('
|
|
488
|
+
N_0x371D179701D9C082(): void {
|
|
489
|
+
inv<void>('0x371D179701D9C082', this.handle);
|
|
467
490
|
}
|
|
468
491
|
|
|
469
492
|
/**
|
|
470
|
-
*
|
|
471
|
-
*
|
|
472
|
-
* @param toggle
|
|
493
|
+
* @param p1
|
|
494
|
+
* @returns
|
|
473
495
|
*/
|
|
474
|
-
|
|
475
|
-
inv<
|
|
496
|
+
getMaxHealth(p1: boolean): number {
|
|
497
|
+
return inv<number>('0x15D757606D170C3C', this.handle, p1, rai());
|
|
476
498
|
}
|
|
477
499
|
|
|
478
500
|
/**
|
|
479
|
-
*
|
|
480
|
-
*
|
|
481
|
-
*
|
|
482
|
-
* @returns
|
|
501
|
+
* @param animDict
|
|
502
|
+
* @param animName
|
|
503
|
+
* @param time
|
|
483
504
|
*/
|
|
484
|
-
|
|
485
|
-
|
|
505
|
+
setAnimCurrentTime(animDict: string | null, animName: string | null, time: number): void {
|
|
506
|
+
inv<void>('0x11CDABDC7783B2BC', this.handle, animDict, animName, f(time));
|
|
486
507
|
}
|
|
487
508
|
|
|
488
509
|
/**
|
|
489
|
-
*
|
|
490
|
-
*
|
|
510
|
+
* Gets the current coordinates for a specified entity.
|
|
511
|
+
* `entity` = The entity to get the coordinates from.
|
|
512
|
+
* `alive` = Unused by the game, potentially used by debug builds in order to assert whether or not an entity was alive. If entity is a ped and it's in a vehicle or on a mount the coords of that entity are returned. Set 'realCoords' to true when you need the true ped coords.
|
|
491
513
|
*
|
|
492
|
-
* @param
|
|
493
|
-
* @param
|
|
514
|
+
* @param alive
|
|
515
|
+
* @param realCoords
|
|
516
|
+
* @returns
|
|
494
517
|
*/
|
|
495
|
-
|
|
496
|
-
inv<
|
|
518
|
+
getCoords(alive?: boolean, realCoords?: boolean): Vector3 {
|
|
519
|
+
return Vector3.fromArray(inv<number[]>('0xA86D5F069399F44D', this.handle, alive, realCoords, rav()));
|
|
497
520
|
}
|
|
498
521
|
|
|
499
522
|
/**
|
|
500
523
|
* @returns
|
|
501
524
|
*/
|
|
502
|
-
|
|
503
|
-
return inv<
|
|
525
|
+
isAnObject(): boolean {
|
|
526
|
+
return inv<boolean>('0x0A27A546A375FDEF', this.handle, rai());
|
|
504
527
|
}
|
|
505
528
|
|
|
506
529
|
/**
|
|
@@ -523,7 +546,7 @@ export class Entity implements IHandle {
|
|
|
523
546
|
*
|
|
524
547
|
* @returns
|
|
525
548
|
*/
|
|
526
|
-
getCarriableFromEntity():
|
|
549
|
+
getCarriableFromEntity(): number {
|
|
527
550
|
return (inv<number>('0x31FEF6A20F00B963', this.handle, rai())) & 0xFFFFFFFF;
|
|
528
551
|
}
|
|
529
552
|
|
|
@@ -602,340 +625,433 @@ export class Entity implements IHandle {
|
|
|
602
625
|
return inv<number>('0x96C638784DB4C815', this.handle, raf());
|
|
603
626
|
}
|
|
604
627
|
|
|
628
|
+
/**
|
|
629
|
+
* LOD distance can be 0 to 0xFFFF (higher values will result in 0xFFFF) as it is actually stored as a 16-bit value (aka uint16_t).
|
|
630
|
+
*
|
|
631
|
+
* @param value
|
|
632
|
+
*/
|
|
633
|
+
setLodDist(value: number): void {
|
|
634
|
+
inv<void>('0x5FB407F0A7C877BF', this.handle, value);
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
/**
|
|
638
|
+
* @param toggle
|
|
639
|
+
*/
|
|
640
|
+
setDynamic(toggle: boolean): void {
|
|
641
|
+
inv<void>('0xFBFC4473F66CE344', this.handle, toggle);
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
/**
|
|
645
|
+
* @param radius
|
|
646
|
+
*/
|
|
647
|
+
setCustomPickupRadius(radius: number): void {
|
|
648
|
+
inv<void>('0x482D17E45665DA44', this.handle, f(radius));
|
|
649
|
+
}
|
|
650
|
+
|
|
605
651
|
/**
|
|
606
652
|
* @returns
|
|
607
653
|
*/
|
|
608
|
-
|
|
609
|
-
return inv<number>('
|
|
654
|
+
getPopulationType(): number {
|
|
655
|
+
return inv<number>('0xADE28862B6D7B85B', this.handle, rai());
|
|
610
656
|
}
|
|
611
657
|
|
|
612
658
|
/**
|
|
613
|
-
* Gets the entity's forward vector in YX(Z) eulers. Similar to GET_ENTITY_FORWARD_VECTOR
|
|
614
|
-
*
|
|
615
659
|
* @returns
|
|
616
660
|
*/
|
|
617
|
-
|
|
618
|
-
return
|
|
661
|
+
isAVehicle(): boolean {
|
|
662
|
+
return inv<boolean>('0xC3D96AF45FCCEC4C', this.handle, rai());
|
|
619
663
|
}
|
|
620
664
|
|
|
621
665
|
/**
|
|
622
666
|
* @param pos
|
|
623
|
-
* @param
|
|
624
|
-
* @param
|
|
625
|
-
* @
|
|
626
|
-
* @param clearArea
|
|
667
|
+
* @param atTop
|
|
668
|
+
* @param inWorldCoords
|
|
669
|
+
* @returns
|
|
627
670
|
*/
|
|
628
|
-
|
|
629
|
-
inv<
|
|
671
|
+
getHeight(pos: Vector3, atTop: boolean, inWorldCoords: boolean): number {
|
|
672
|
+
return inv<number>('0x296DEBC84474B375', this.handle, f(pos.x), f(pos.y), f(pos.z), atTop, inWorldCoords, raf());
|
|
630
673
|
}
|
|
631
674
|
|
|
632
675
|
/**
|
|
633
|
-
* @param
|
|
676
|
+
* @param pos
|
|
634
677
|
* @returns
|
|
635
678
|
*/
|
|
636
|
-
|
|
637
|
-
return inv<number>('
|
|
679
|
+
getOffsetFromGivenWorldCoords(pos: Vector3): Vector3 {
|
|
680
|
+
return Vector3.fromArray(inv<number[]>('0x497C6B1A2C9AE69C', this.handle, f(pos.x), f(pos.y), f(pos.z), rav()));
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
addTrackingTrails(): void {
|
|
684
|
+
inv<void>('0x1AD922AB5038DEF3', this.handle);
|
|
638
685
|
}
|
|
639
686
|
|
|
640
687
|
/**
|
|
641
|
-
* @param
|
|
688
|
+
* @param toggle
|
|
642
689
|
*/
|
|
643
|
-
|
|
644
|
-
inv<void>('
|
|
690
|
+
setCanClimbOnEntity(toggle: boolean): void {
|
|
691
|
+
inv<void>('0x24AED2A608F93C4C', this.handle, toggle);
|
|
645
692
|
}
|
|
646
693
|
|
|
647
694
|
/**
|
|
648
|
-
* @
|
|
695
|
+
* @returns minimum; maximum
|
|
649
696
|
*/
|
|
650
|
-
|
|
651
|
-
inv<
|
|
697
|
+
getWorldPositionOfDimensions(): [Vector3, Vector3] {
|
|
698
|
+
const result = inv<[number[], number[]]>('0xF3FDA9A617A15145', this.handle, pvv(), pvv());
|
|
699
|
+
return [Vector3.fromArray(result[0]), Vector3.fromArray(result[1])];
|
|
652
700
|
}
|
|
653
701
|
|
|
654
702
|
/**
|
|
655
|
-
*
|
|
656
|
-
*
|
|
703
|
+
* @param p1
|
|
704
|
+
* @returns
|
|
705
|
+
*/
|
|
706
|
+
isUnderwater(p1: boolean): any {
|
|
707
|
+
return inv<number>('0xD4E5C1E93C466127', this.handle, p1);
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
/**
|
|
711
|
+
* @param animation
|
|
712
|
+
* @param animGroup
|
|
713
|
+
* @param p3
|
|
714
|
+
* @returns
|
|
715
|
+
*/
|
|
716
|
+
stopAnim(animation: string | null, animGroup: string | null, p3: number): any {
|
|
717
|
+
return inv<number>('0x786591D986DE9159', this.handle, animation, animGroup, f(p3));
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
/**
|
|
721
|
+
* @returns
|
|
722
|
+
*/
|
|
723
|
+
hasCollidedWithAnything(): boolean {
|
|
724
|
+
return inv<boolean>('0xDF18751EC74F90FF', this.handle, rai());
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
/**
|
|
728
|
+
* Simply returns whatever is passed to it (Regardless of whether the handle is valid or not).
|
|
657
729
|
*
|
|
658
|
-
* @
|
|
730
|
+
* @returns
|
|
659
731
|
*/
|
|
660
|
-
|
|
661
|
-
inv<
|
|
732
|
+
getVehicleIndexFromIndex(): Vehicle | null {
|
|
733
|
+
return createFromHandle<Vehicle>('Vehicle', inv<number>('0xDF1E5AAC561AFC59', this.handle, rai()));
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
/**
|
|
737
|
+
* @returns
|
|
738
|
+
*/
|
|
739
|
+
isVisible(): boolean {
|
|
740
|
+
return inv<boolean>('0xFFC96ECB7FA404CA', this.handle, rai());
|
|
662
741
|
}
|
|
663
742
|
|
|
664
743
|
/**
|
|
744
|
+
* SET_ENTITY_LO*
|
|
745
|
+
*
|
|
665
746
|
* @param toggle
|
|
666
747
|
*/
|
|
667
|
-
|
|
668
|
-
inv<void>('
|
|
748
|
+
N_0xFF9965C47FA404DA(toggle: boolean): void {
|
|
749
|
+
inv<void>('0xFF9965C47FA404DA', this.handle, toggle);
|
|
669
750
|
}
|
|
670
751
|
|
|
671
752
|
/**
|
|
672
|
-
*
|
|
753
|
+
* Valid indices: 0 - 3
|
|
754
|
+
* Index 1 always returns a `hogtied` config, doesn't matter the entity.
|
|
755
|
+
* It's for humans only and the ped must be resurrected first if it's dead.
|
|
756
|
+
*
|
|
757
|
+
* @param index
|
|
673
758
|
* @returns
|
|
674
759
|
*/
|
|
675
|
-
|
|
676
|
-
return
|
|
760
|
+
getOptimalCarryConfig(index: number): number {
|
|
761
|
+
return (inv<number>('0x34F008A7E48C496B', this.handle, index, rai())) & 0xFFFFFFFF;
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
setFadeIn(): void {
|
|
765
|
+
inv<void>('0xA91E6CF94404E8C9', this.handle);
|
|
677
766
|
}
|
|
678
767
|
|
|
679
768
|
/**
|
|
680
|
-
* @param entity2
|
|
681
|
-
* @param p2
|
|
682
|
-
* @param p3
|
|
683
769
|
* @returns
|
|
684
770
|
*/
|
|
685
|
-
|
|
686
|
-
return inv<boolean>('
|
|
771
|
+
hasBeenDamagedByAnyPed(): boolean {
|
|
772
|
+
return inv<boolean>('0x9934E9C42D52D87E', this.handle, rai());
|
|
687
773
|
}
|
|
688
774
|
|
|
689
775
|
/**
|
|
776
|
+
* @param targetEntity
|
|
690
777
|
* @returns
|
|
691
778
|
*/
|
|
692
|
-
|
|
693
|
-
return inv<
|
|
779
|
+
isTouchingEntity(targetEntity: Entity): boolean {
|
|
780
|
+
return inv<boolean>('0x9A2304A64C3C8423', this.handle, targetEntity.handle, rai());
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
deleteCarriable(): void {
|
|
784
|
+
inv<void>('0x0D0DB2B6AF19A987', this.handle);
|
|
694
785
|
}
|
|
695
786
|
|
|
696
787
|
/**
|
|
788
|
+
* Returns a normalized value between 0.0f and 1.0f. You can get the actual anim time by multiplying this by GET_ANIM_DURATION
|
|
789
|
+
*
|
|
790
|
+
* @param animDict
|
|
791
|
+
* @param animName
|
|
697
792
|
* @returns
|
|
698
793
|
*/
|
|
699
|
-
|
|
700
|
-
return inv<
|
|
794
|
+
getAnimCurrentTime(animDict: string | null, animName: string | null): number {
|
|
795
|
+
return inv<number>('0x627520389E288A73', this.handle, animDict, animName, raf());
|
|
701
796
|
}
|
|
702
797
|
|
|
703
798
|
/**
|
|
704
|
-
* @param
|
|
799
|
+
* @param entity2
|
|
800
|
+
* @param thisFrameOnly
|
|
705
801
|
*/
|
|
706
|
-
|
|
707
|
-
inv<void>('
|
|
802
|
+
setNoCollisionEntity(entity2: Entity, thisFrameOnly: boolean): void {
|
|
803
|
+
inv<void>('0xE037BF068223C38D', this.handle, entity2.handle, thisFrameOnly);
|
|
708
804
|
}
|
|
709
805
|
|
|
710
806
|
/**
|
|
711
|
-
*
|
|
712
|
-
*
|
|
713
|
-
* @
|
|
714
|
-
* @param boneIndex
|
|
715
|
-
* @param isDirectionRel
|
|
716
|
-
* @param ignoreUpVec
|
|
717
|
-
* @param isForceRel
|
|
718
|
-
* @param p12
|
|
719
|
-
* @param p13
|
|
807
|
+
* Result is in meters per second (m/s)
|
|
808
|
+
*
|
|
809
|
+
* @returns
|
|
720
810
|
*/
|
|
721
|
-
|
|
722
|
-
inv<
|
|
811
|
+
getSpeed(): number {
|
|
812
|
+
return inv<number>('0xFB6BA510A533DF81', this.handle, raf());
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
/**
|
|
816
|
+
* @param bOnlyDamagedWhenRunningScript
|
|
817
|
+
*/
|
|
818
|
+
setCanOnlyBeDamagedByScriptParticipants(bOnlyDamagedWhenRunningScript: boolean): void {
|
|
819
|
+
inv<void>('0xFF83AF534156B399', this.handle, bOnlyDamagedWhenRunningScript);
|
|
723
820
|
}
|
|
724
821
|
|
|
725
822
|
/**
|
|
726
823
|
* @returns
|
|
727
824
|
*/
|
|
728
|
-
|
|
729
|
-
return inv<
|
|
825
|
+
isTrackedVisible(): any {
|
|
826
|
+
return inv<number>('0xC8CCDB712FBCBA92', this.handle);
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
/**
|
|
830
|
+
* @param p1
|
|
831
|
+
* @param collision
|
|
832
|
+
*/
|
|
833
|
+
detachEntity(p1: boolean, collision: boolean): void {
|
|
834
|
+
inv<void>('0x64CDE9D6BF8ECAD3', this.handle, p1, collision);
|
|
730
835
|
}
|
|
731
836
|
|
|
732
837
|
/**
|
|
733
|
-
* @param pos1
|
|
734
|
-
* @param pos2
|
|
735
|
-
* @param p7
|
|
736
|
-
* @param p8
|
|
737
|
-
* @param p9
|
|
738
838
|
* @returns
|
|
739
839
|
*/
|
|
740
|
-
|
|
741
|
-
return inv<boolean>('
|
|
840
|
+
isVisibleToScript(): boolean {
|
|
841
|
+
return inv<boolean>('0xF213C724E77F321A', this.handle, rai());
|
|
742
842
|
}
|
|
743
843
|
|
|
744
844
|
/**
|
|
745
|
-
*
|
|
746
|
-
*
|
|
747
|
-
*
|
|
748
|
-
* @param boneIndex
|
|
845
|
+
* @param entity2
|
|
846
|
+
* @param traceType
|
|
749
847
|
* @returns
|
|
750
848
|
*/
|
|
751
|
-
|
|
752
|
-
return
|
|
849
|
+
hasClearLosToEntity(entity2: Entity, traceType: number): boolean {
|
|
850
|
+
return inv<boolean>('0xFCDFF7B72D23A1AC', this.handle, entity2.handle, traceType, rai());
|
|
753
851
|
}
|
|
754
852
|
|
|
755
853
|
/**
|
|
756
|
-
*
|
|
854
|
+
* Used in Script Function GENERIC_ITEM_HAS_ANIM_COMPLETED
|
|
855
|
+
* *GET_ENTITY**
|
|
757
856
|
*
|
|
758
|
-
* @param animName
|
|
759
857
|
* @param animDict
|
|
760
|
-
* @param
|
|
761
|
-
* @param loop
|
|
762
|
-
* @param stayInAnim
|
|
763
|
-
* @param p6
|
|
764
|
-
* @param delta
|
|
765
|
-
* @param bitset
|
|
858
|
+
* @param animClip
|
|
766
859
|
* @returns
|
|
767
860
|
*/
|
|
768
|
-
|
|
769
|
-
return inv<
|
|
861
|
+
N_0x8E46E18AA828334F(animDict: string | null, animClip: string | null): number {
|
|
862
|
+
return inv<number>('0x8E46E18AA828334F', this.handle, animDict, animClip, raf());
|
|
770
863
|
}
|
|
771
864
|
|
|
772
865
|
/**
|
|
773
|
-
*
|
|
866
|
+
* @param playerPedToIgnore
|
|
867
|
+
* @param flags
|
|
868
|
+
* @returns
|
|
869
|
+
*/
|
|
870
|
+
getNearestPlayerToEntity(playerPedToIgnore: Ped, flags: number): Player | null {
|
|
871
|
+
return createFromHandle<Player>('Player', inv<number>('0x990E294FC387FB88', this.handle, playerPedToIgnore.handle, flags, rai()));
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
/**
|
|
875
|
+
* Gets the Y-component of the entity's forward vector.
|
|
774
876
|
*
|
|
775
|
-
* @returns
|
|
877
|
+
* @returns
|
|
878
|
+
*/
|
|
879
|
+
getForwardY(): number {
|
|
880
|
+
return inv<number>('0x9A5C073ECBDA7EE7', this.handle, raf());
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
/**
|
|
884
|
+
* @param pitch
|
|
885
|
+
* @param roll
|
|
886
|
+
* @param yaw
|
|
887
|
+
* @param rotationOrder
|
|
888
|
+
* @param p5
|
|
889
|
+
*/
|
|
890
|
+
setRotation(pitch: number, roll: number, yaw: number, rotationOrder: number, p5: boolean): void {
|
|
891
|
+
inv<void>('0x9CC8314DFEDE441E', this.handle, f(pitch), f(roll), f(yaw), rotationOrder, p5);
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
/**
|
|
895
|
+
* @param p1
|
|
896
|
+
* @param relationshipGroup
|
|
897
|
+
*/
|
|
898
|
+
setOnlyDamagedByRelationshipGroup(p1: boolean, relationshipGroup: string | number): void {
|
|
899
|
+
inv<void>('0x6C1F6AA2F0ADD104', this.handle, p1, _h(relationshipGroup));
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
/**
|
|
903
|
+
* https://github.com/femga/rdr3_discoveries/tree/master/AI/ENTITY_PROOFS
|
|
904
|
+
* BOOL p2: handles an additional special proofs flag, so it simply indicates whether it should be enabled or disabled, not sure what exactly it proofs the entity from though
|
|
905
|
+
*
|
|
906
|
+
* @param proofsBitset
|
|
907
|
+
* @param specialFlag
|
|
908
|
+
*/
|
|
909
|
+
setProofs(proofsBitset: number, specialFlag: boolean): void {
|
|
910
|
+
inv<void>('0xFAEE099C6F890BB8', this.handle, proofsBitset, specialFlag);
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
/**
|
|
914
|
+
* @returns
|
|
915
|
+
*/
|
|
916
|
+
hasCollisionLoadedAroundEntity(): boolean {
|
|
917
|
+
return inv<boolean>('0xBEB1600952B9CF5C', this.handle, rai());
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
/**
|
|
921
|
+
* @returns
|
|
776
922
|
*/
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
return [result[0], result[1]];
|
|
923
|
+
getIsCarriablePelt(): any {
|
|
924
|
+
return inv<number>('0x255B6DB4E3AD3C3E', this.handle);
|
|
780
925
|
}
|
|
781
926
|
|
|
782
927
|
/**
|
|
783
|
-
* @param
|
|
784
|
-
* @param animName
|
|
785
|
-
* @param p3
|
|
928
|
+
* @param p1
|
|
786
929
|
* @returns
|
|
787
930
|
*/
|
|
788
|
-
|
|
789
|
-
return inv<
|
|
931
|
+
getVelocity(p1: number): Vector3 {
|
|
932
|
+
return Vector3.fromArray(inv<number[]>('0x4805D2B1D8CF94A9', this.handle, p1, rav()));
|
|
790
933
|
}
|
|
791
934
|
|
|
792
935
|
/**
|
|
793
|
-
* @param
|
|
794
|
-
* @param relGroup
|
|
936
|
+
* @param toggle
|
|
795
937
|
*/
|
|
796
|
-
|
|
797
|
-
inv<void>('
|
|
938
|
+
setCanAutoVaultOnEntity(toggle: boolean): void {
|
|
939
|
+
inv<void>('0x80646744FA88F9D7', this.handle, toggle);
|
|
798
940
|
}
|
|
799
941
|
|
|
800
942
|
/**
|
|
943
|
+
* Sets the loot table an entity will carry. Returns true if loot table has been successfully set. Returns false if entity is not a ped or object.
|
|
944
|
+
* https://github.com/femga/rdr3_discoveries/blob/master/AI/EVENTS/loot_rewards.lua
|
|
945
|
+
*
|
|
946
|
+
* @param lootTable
|
|
801
947
|
* @returns
|
|
802
948
|
*/
|
|
803
|
-
|
|
804
|
-
return inv<number>('
|
|
949
|
+
scriptOverrideLootTablePermanent(lootTable: string | number): any {
|
|
950
|
+
return inv<number>('0x8C03CD6B5E0E85E8', this.handle, _h(lootTable));
|
|
805
951
|
}
|
|
806
952
|
|
|
807
953
|
/**
|
|
808
|
-
* @
|
|
809
|
-
* @param heading
|
|
810
|
-
* @param xAxis
|
|
811
|
-
* @param yAxis
|
|
812
|
-
* @param zAxis
|
|
954
|
+
* @returns argStruct
|
|
813
955
|
*/
|
|
814
|
-
|
|
815
|
-
inv<
|
|
956
|
+
getScript(): [number, number] {
|
|
957
|
+
const result = inv<[number, number]>('0x2A08A32B6D49906F', this.handle, pvi(), rai());
|
|
958
|
+
return [result[0] & 0xFFFFFFFF, result[1]];
|
|
816
959
|
}
|
|
817
960
|
|
|
818
961
|
/**
|
|
819
|
-
*
|
|
820
|
-
*
|
|
962
|
+
* @param actionHash
|
|
821
963
|
* @returns
|
|
822
964
|
*/
|
|
823
|
-
|
|
824
|
-
return
|
|
965
|
+
hasAnimEventFired(actionHash: string | number): boolean {
|
|
966
|
+
return inv<boolean>('0x5851CC48405F4A07', this.handle, _h(actionHash), rai());
|
|
825
967
|
}
|
|
826
968
|
|
|
827
969
|
/**
|
|
828
|
-
*
|
|
829
|
-
*
|
|
830
|
-
* @param tier
|
|
831
|
-
* @param p2
|
|
970
|
+
* @param p1
|
|
832
971
|
*/
|
|
833
|
-
|
|
834
|
-
inv<void>('
|
|
972
|
+
N_0xEF259AA1E097E0AD(p1: any): void {
|
|
973
|
+
inv<void>('0xEF259AA1E097E0AD', this.handle, p1);
|
|
835
974
|
}
|
|
836
975
|
|
|
837
976
|
/**
|
|
838
|
-
*
|
|
977
|
+
* Getter for FREEZE_ENTITY_POSITION
|
|
839
978
|
*
|
|
840
979
|
* @returns
|
|
841
980
|
*/
|
|
842
|
-
|
|
843
|
-
return inv<number>('
|
|
981
|
+
isFrozen(): any {
|
|
982
|
+
return inv<number>('0x083D497D57B7400F', this.handle);
|
|
844
983
|
}
|
|
845
984
|
|
|
846
985
|
/**
|
|
847
|
-
* Returns the
|
|
986
|
+
* Returns the entity that is looting a ped but only while the looting is active
|
|
848
987
|
*
|
|
849
988
|
* @returns
|
|
850
989
|
*/
|
|
851
|
-
|
|
852
|
-
return inv<number>('
|
|
990
|
+
getLootingPed(): Ped | null {
|
|
991
|
+
return createFromHandle<Ped>('Ped', inv<number>('0xEF2D9ED7CE684F08', this.handle, rai()));
|
|
853
992
|
}
|
|
854
993
|
|
|
855
994
|
/**
|
|
856
995
|
* @returns
|
|
857
996
|
*/
|
|
858
|
-
|
|
859
|
-
return inv<boolean>('
|
|
997
|
+
isWaitingForWorldCollision(): boolean {
|
|
998
|
+
return inv<boolean>('0x5E1CC2E8DC3111DD', this.handle, rai());
|
|
860
999
|
}
|
|
861
1000
|
|
|
862
1001
|
/**
|
|
863
|
-
*
|
|
1002
|
+
* Gets the X-component of the entity's forward vector.
|
|
1003
|
+
*
|
|
1004
|
+
* @returns
|
|
864
1005
|
*/
|
|
865
|
-
|
|
866
|
-
inv<
|
|
1006
|
+
getForwardX(): number {
|
|
1007
|
+
return inv<number>('0xDB0954E9960F6457', this.handle, raf());
|
|
867
1008
|
}
|
|
868
1009
|
|
|
869
1010
|
/**
|
|
870
1011
|
* @returns
|
|
871
1012
|
*/
|
|
872
|
-
|
|
873
|
-
return inv<boolean>('
|
|
1013
|
+
isAPed(): boolean {
|
|
1014
|
+
return inv<boolean>('0xCF8176912DDA4EA5', this.handle, rai());
|
|
874
1015
|
}
|
|
875
1016
|
|
|
876
1017
|
/**
|
|
877
|
-
*
|
|
878
|
-
*
|
|
879
|
-
* @param toggle
|
|
1018
|
+
* @returns
|
|
880
1019
|
*/
|
|
881
|
-
|
|
882
|
-
inv<
|
|
1020
|
+
getPitch(): number {
|
|
1021
|
+
return inv<number>('0xEF355ABEFF7F5005', this.handle, raf());
|
|
883
1022
|
}
|
|
884
1023
|
|
|
885
1024
|
/**
|
|
886
|
-
*
|
|
887
|
-
* https://github.com/femga/rdr3_discoveries/tree/master/boneNames useSoftPinning - if set to false attached entity will not detach when fixed
|
|
888
|
-
* collision - controls collision between the two entities (FALSE disables collision).
|
|
889
|
-
* isPed - pitch doesn't work when false and roll will only work on negative numbers (only peds)
|
|
890
|
-
* vertexIndex - position of vertex
|
|
891
|
-
* fixedRot - if false it ignores entity vector
|
|
892
|
-
*
|
|
893
|
-
* @param entity2
|
|
894
|
-
* @param boneIndex
|
|
895
|
-
* @param pos
|
|
896
|
-
* @param rot
|
|
897
|
-
* @param p9
|
|
898
|
-
* @param useSoftPinning
|
|
899
|
-
* @param collision
|
|
900
|
-
* @param isPed
|
|
901
|
-
* @param vertexIndex
|
|
902
|
-
* @param fixedRot
|
|
903
|
-
* @param p15
|
|
904
|
-
* @param p16
|
|
1025
|
+
* @returns
|
|
905
1026
|
*/
|
|
906
|
-
|
|
907
|
-
inv<
|
|
1027
|
+
isStatic(): boolean {
|
|
1028
|
+
return inv<boolean>('0x86468ADFA0F6B861', this.handle, rai());
|
|
908
1029
|
}
|
|
909
1030
|
|
|
910
1031
|
/**
|
|
1032
|
+
* Returns the model hash from the entity
|
|
1033
|
+
*
|
|
911
1034
|
* @returns
|
|
912
1035
|
*/
|
|
913
|
-
|
|
914
|
-
return inv<number>('
|
|
1036
|
+
getModel(): number {
|
|
1037
|
+
return (inv<number>('0xDA76A9F39210D365', this.handle, rai())) & 0xFFFFFFFF;
|
|
915
1038
|
}
|
|
916
1039
|
|
|
917
1040
|
/**
|
|
918
|
-
*
|
|
919
|
-
* p7/highForce - setting false will make the force really low
|
|
920
|
-
*
|
|
921
|
-
* @param forceType
|
|
922
|
-
* @param pos
|
|
923
|
-
* @param component
|
|
924
|
-
* @param isDirectionRel
|
|
925
|
-
* @param isForceRel
|
|
926
|
-
* @param p8
|
|
1041
|
+
* Deletes the specified entity, then sets the handle pointed to by the pointer to NULL.
|
|
927
1042
|
*/
|
|
928
|
-
|
|
929
|
-
inv<void>('
|
|
1043
|
+
deleteEntity(): void {
|
|
1044
|
+
inv<void>('0x4CD38C78BD19A497', this.handle);
|
|
930
1045
|
}
|
|
931
1046
|
|
|
932
1047
|
/**
|
|
933
|
-
*
|
|
934
|
-
*
|
|
1048
|
+
* @param team
|
|
1049
|
+
* @param playerPedToIgnore
|
|
1050
|
+
* @param flags
|
|
935
1051
|
* @returns
|
|
936
1052
|
*/
|
|
937
|
-
|
|
938
|
-
return inv<number>('
|
|
1053
|
+
getNearestPlayerToOnTeam(team: number, playerPedToIgnore: Ped, flags: number): Player | null {
|
|
1054
|
+
return createFromHandle<Player>('Player', inv<number>('0xB2C30C3B4AFF718C', this.handle, team, playerPedToIgnore.handle, flags, rai()));
|
|
939
1055
|
}
|
|
940
1056
|
|
|
941
1057
|
/**
|
|
@@ -1105,27 +1221,147 @@ export class Entity implements IHandle {
|
|
|
1105
1221
|
}
|
|
1106
1222
|
|
|
1107
1223
|
/**
|
|
1108
|
-
* @param pos
|
|
1109
|
-
* @param flags
|
|
1224
|
+
* @param pos
|
|
1225
|
+
* @param flags
|
|
1226
|
+
* @returns
|
|
1227
|
+
*/
|
|
1228
|
+
hasClearLosToCoord(pos: Vector3, flags: number): any {
|
|
1229
|
+
return inv<number>('0x0C9DBF48C6BA6E4C', this.handle, f(pos.x), f(pos.y), f(pos.z), flags);
|
|
1230
|
+
}
|
|
1231
|
+
|
|
1232
|
+
/**
|
|
1233
|
+
* @param flagId Refer to [enum: eCarryingFlags]
|
|
1234
|
+
* @param value
|
|
1235
|
+
*/
|
|
1236
|
+
setCarryingFlag(flagId: eCarryingFlags, value: boolean): void {
|
|
1237
|
+
inv<void>('0x18FF3110CF47115D', this.handle, flagId, value);
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
/**
|
|
1241
|
+
* @returns
|
|
1242
|
+
*/
|
|
1243
|
+
getIsPredator(): any {
|
|
1244
|
+
return inv<number>('0x5594AFE9DE0C01B7', this.handle);
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
/**
|
|
1248
|
+
* enum eCarriableState
|
|
1249
|
+
* {
|
|
1250
|
+
* CARRIABLE_STATE_NONE,
|
|
1251
|
+
* CARRIABLE_STATE_TRANSITIONING_TO_HOGTIED,
|
|
1252
|
+
* CARRIABLE_STATE_CARRIABLE_INTRO,
|
|
1253
|
+
* CARRIABLE_STATE_CARRIABLE,
|
|
1254
|
+
* CARRIABLE_STATE_BEING_PICKED_UP_FROM_GROUND,
|
|
1255
|
+
* CARRIABLE_STATE_CARRIED_BY_HUMAN,
|
|
1256
|
+
* CARRIABLE_STATE_BEING_PLACED_ON_GROUND,
|
|
1257
|
+
* CARRIABLE_STATE_CARRIED_BY_MOUNT,
|
|
1258
|
+
* CARRIABLE_STATE_BEING_PLACED_ON_MOUNT,
|
|
1259
|
+
* CARRIABLE_STATE_BEING_PICKED_UP_FROM_MOUNT,
|
|
1260
|
+
* CARRIABLE_STATE_BEING_CUT_FREE,
|
|
1261
|
+
* CARRIABLE_STATE_BEING_PLACED_ON_GROUND_ESCAPE,
|
|
1262
|
+
* CARRIABLE_STATE_BEING_PLACED_IN_VEHICLE
|
|
1263
|
+
* };
|
|
1264
|
+
*
|
|
1265
|
+
* @returns
|
|
1266
|
+
*/
|
|
1267
|
+
getCarriableState(): number {
|
|
1268
|
+
return inv<number>('0x61914209C36EFDDB', this.handle, rai());
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
/**
|
|
1272
|
+
* @param value
|
|
1273
|
+
*/
|
|
1274
|
+
setMaxHealth(value: number): void {
|
|
1275
|
+
inv<void>('0x166E7CF68597D8B5', this.handle, value);
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1278
|
+
/**
|
|
1279
|
+
* Params: p1 (probably animType) = 1, 0
|
|
1280
|
+
*
|
|
1281
|
+
* @param p1
|
|
1282
|
+
* @returns
|
|
1283
|
+
*/
|
|
1284
|
+
isPlayingAnyAnim(p1: number): boolean {
|
|
1285
|
+
return inv<boolean>('0x0B7CB1300CBFE19C', this.handle, p1, rai());
|
|
1286
|
+
}
|
|
1287
|
+
|
|
1288
|
+
/**
|
|
1289
|
+
* @param enabled
|
|
1290
|
+
*/
|
|
1291
|
+
setLightsEnabled(enabled: boolean): void {
|
|
1292
|
+
inv<void>('0xEBDC12861D079ABA', this.handle, enabled);
|
|
1293
|
+
}
|
|
1294
|
+
|
|
1295
|
+
/**
|
|
1296
|
+
* Offset values are relative to the entity. x = left/right
|
|
1297
|
+
* y = forward/backward
|
|
1298
|
+
* z = up/down
|
|
1299
|
+
*
|
|
1300
|
+
* @param offset
|
|
1301
|
+
* @returns
|
|
1302
|
+
*/
|
|
1303
|
+
getOffsetFromInWorldCoords(offset: Vector3): Vector3 {
|
|
1304
|
+
return Vector3.fromArray(inv<number[]>('0x1899F328B0E12848', this.handle, f(offset.x), f(offset.y), f(offset.z), rav()));
|
|
1305
|
+
}
|
|
1306
|
+
|
|
1307
|
+
/**
|
|
1308
|
+
* Checks if entity1 is within the box defined by x/y/zSize of entity2. Last three parameters are almost always p5 = 0, p6 = 1, p7 = 0
|
|
1309
|
+
*
|
|
1310
|
+
* @param entity2
|
|
1311
|
+
* @param xSize
|
|
1312
|
+
* @param ySize
|
|
1313
|
+
* @param zSize
|
|
1314
|
+
* @param p5
|
|
1315
|
+
* @param p6
|
|
1316
|
+
* @param p7
|
|
1317
|
+
* @returns
|
|
1318
|
+
*/
|
|
1319
|
+
isAtEntity(entity2: Entity, xSize: number, ySize: number, zSize: number, p5: boolean, p6: boolean, p7: number): boolean {
|
|
1320
|
+
return inv<boolean>('0xC057F02B837A27F6', this.handle, entity2.handle, f(xSize), f(ySize), f(zSize), p5, p6, p7, rai());
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1323
|
+
/**
|
|
1324
|
+
* @param toggle
|
|
1325
|
+
*/
|
|
1326
|
+
setVisible(toggle: boolean): void {
|
|
1327
|
+
inv<void>('0x1794B4FCC84D812F', this.handle, toggle);
|
|
1328
|
+
}
|
|
1329
|
+
|
|
1330
|
+
/**
|
|
1331
|
+
* Old name: _SET_ENTITY_CLEANUP_BY_ENGINE
|
|
1332
|
+
*
|
|
1333
|
+
* @param toggle
|
|
1334
|
+
*/
|
|
1335
|
+
setShouldFreezeWaitingOnCollision(toggle: boolean): void {
|
|
1336
|
+
inv<void>('0x740CB4F3F602C9F4', this.handle, toggle);
|
|
1337
|
+
}
|
|
1338
|
+
|
|
1339
|
+
/**
|
|
1340
|
+
* Note: this native was removed in 1232 but added back in 1311
|
|
1341
|
+
* Old name: _GET_ENTITY_PROOFS
|
|
1342
|
+
*
|
|
1110
1343
|
* @returns
|
|
1111
1344
|
*/
|
|
1112
|
-
|
|
1113
|
-
return inv<number>('
|
|
1345
|
+
getProofs(): number {
|
|
1346
|
+
return inv<number>('0x6CF0DAD7FA1088EA', this.handle, rai());
|
|
1114
1347
|
}
|
|
1115
1348
|
|
|
1116
1349
|
/**
|
|
1117
|
-
*
|
|
1118
|
-
*
|
|
1350
|
+
* skin - everything alpha except skin
|
|
1351
|
+
* Set entity alpha level. Ranging from 0 to 255 but changes occur after every 20 percent (after every 51).
|
|
1352
|
+
*
|
|
1353
|
+
* @param alphaLevel
|
|
1354
|
+
* @param skin
|
|
1119
1355
|
*/
|
|
1120
|
-
|
|
1121
|
-
inv<void>('
|
|
1356
|
+
setAlpha(alphaLevel: number, skin: boolean): void {
|
|
1357
|
+
inv<void>('0x0DF7692B1D9E7BA7', this.handle, alphaLevel, skin);
|
|
1122
1358
|
}
|
|
1123
1359
|
|
|
1124
1360
|
/**
|
|
1125
1361
|
* @returns
|
|
1126
1362
|
*/
|
|
1127
|
-
|
|
1128
|
-
return inv<number>('
|
|
1363
|
+
getThreatTier(): number {
|
|
1364
|
+
return inv<number>('0xE12F56CB25D9CE23', this.handle, rai());
|
|
1129
1365
|
}
|
|
1130
1366
|
|
|
1131
1367
|
/**
|
|
@@ -1220,90 +1456,6 @@ export class Entity implements IHandle {
|
|
|
1220
1456
|
return inv<boolean>('0x12DF6E0D2E736749', this.handle, rai());
|
|
1221
1457
|
}
|
|
1222
1458
|
|
|
1223
|
-
/**
|
|
1224
|
-
* @param p1
|
|
1225
|
-
*/
|
|
1226
|
-
N_0xA48E4801DEBDF7E4(p1: boolean): void {
|
|
1227
|
-
inv<void>('0xA48E4801DEBDF7E4', this.handle, p1);
|
|
1228
|
-
}
|
|
1229
|
-
|
|
1230
|
-
/**
|
|
1231
|
-
* @param toggle
|
|
1232
|
-
* @param keepPhysics
|
|
1233
|
-
*/
|
|
1234
|
-
setCompletelyDisableCollision(toggle: boolean, keepPhysics: boolean): void {
|
|
1235
|
-
inv<void>('0xE0580EC84813875A', this.handle, toggle, keepPhysics);
|
|
1236
|
-
}
|
|
1237
|
-
|
|
1238
|
-
/**
|
|
1239
|
-
* @param p1
|
|
1240
|
-
*/
|
|
1241
|
-
N_0xCDB682BB47C02F0A(p1: string | number): void {
|
|
1242
|
-
inv<void>('0xCDB682BB47C02F0A', this.handle, _h(p1));
|
|
1243
|
-
}
|
|
1244
|
-
|
|
1245
|
-
/**
|
|
1246
|
-
* @param volume
|
|
1247
|
-
* @param p2
|
|
1248
|
-
* @param p3
|
|
1249
|
-
* @returns
|
|
1250
|
-
*/
|
|
1251
|
-
isInVolume(volume: number, p2: boolean, p3: number): boolean {
|
|
1252
|
-
return inv<boolean>('0x5A5526BC09C06623', this.handle, volume, p2, p3, rai());
|
|
1253
|
-
}
|
|
1254
|
-
|
|
1255
|
-
/**
|
|
1256
|
-
* @returns rightVector; forwardVector; upVector; position
|
|
1257
|
-
*/
|
|
1258
|
-
getMatrix(): [Vector3, Vector3, Vector3, Vector3] {
|
|
1259
|
-
const result = inv<[number[], number[], number[], number[]]>('0x3A9B1120AF13FBF2', this.handle, pvv(), pvv(), pvv(), pvv());
|
|
1260
|
-
return [Vector3.fromArray(result[0]), Vector3.fromArray(result[1]), Vector3.fromArray(result[2]), Vector3.fromArray(result[3])];
|
|
1261
|
-
}
|
|
1262
|
-
|
|
1263
|
-
/**
|
|
1264
|
-
* Called if entity is in water and submerged level is larger than 1f. If CARRYING_FLAG_FORCE_ALLOW_WARP_TO_SAFE_GROUND_LOCATION is true, it gets disabled as well.
|
|
1265
|
-
*/
|
|
1266
|
-
N_0x371D179701D9C082(): void {
|
|
1267
|
-
inv<void>('0x371D179701D9C082', this.handle);
|
|
1268
|
-
}
|
|
1269
|
-
|
|
1270
|
-
/**
|
|
1271
|
-
* @param p1
|
|
1272
|
-
* @returns
|
|
1273
|
-
*/
|
|
1274
|
-
getMaxHealth(p1: boolean): number {
|
|
1275
|
-
return inv<number>('0x15D757606D170C3C', this.handle, p1, rai());
|
|
1276
|
-
}
|
|
1277
|
-
|
|
1278
|
-
/**
|
|
1279
|
-
* @param animDict
|
|
1280
|
-
* @param animName
|
|
1281
|
-
* @param time
|
|
1282
|
-
*/
|
|
1283
|
-
setAnimCurrentTime(animDict: string | null, animName: string | null, time: number): void {
|
|
1284
|
-
inv<void>('0x11CDABDC7783B2BC', this.handle, animDict, animName, f(time));
|
|
1285
|
-
}
|
|
1286
|
-
|
|
1287
|
-
/**
|
|
1288
|
-
* Gets the current coordinates for a specified entity.
|
|
1289
|
-
* `entity` = The entity to get the coordinates from.
|
|
1290
|
-
* `alive` = Unused by the game, potentially used by debug builds in order to assert whether or not an entity was alive. If entity is a ped and it's in a vehicle or on a mount the coords of that entity are returned. Set 'realCoords' to true when you need the true ped coords.
|
|
1291
|
-
*
|
|
1292
|
-
* @param alive
|
|
1293
|
-
* @param realCoords
|
|
1294
|
-
* @returns
|
|
1295
|
-
*/
|
|
1296
|
-
getCoords(alive: boolean, realCoords: boolean): Vector3 {
|
|
1297
|
-
return Vector3.fromArray(inv<number[]>('0xA86D5F069399F44D', this.handle, alive, realCoords, rav()));
|
|
1298
|
-
}
|
|
1299
|
-
|
|
1300
|
-
/**
|
|
1301
|
-
* @returns
|
|
1302
|
-
*/
|
|
1303
|
-
isAnObject(): boolean {
|
|
1304
|
-
return inv<boolean>('0x0A27A546A375FDEF', this.handle, rai());
|
|
1305
|
-
}
|
|
1306
|
-
|
|
1307
1459
|
/**
|
|
1308
1460
|
* Used in Script Function DUELING_DID_PLAYER_DISARM_OPPONENT
|
|
1309
1461
|
*
|
|
@@ -1395,105 +1547,6 @@ export class Entity implements IHandle {
|
|
|
1395
1547
|
return inv<boolean>('0x5E58342602E94718', this.handle, f(pos.x), f(pos.y), f(pos.z), f(xSize), f(ySize), f(zSize), p7, p8, p9, rai());
|
|
1396
1548
|
}
|
|
1397
1549
|
|
|
1398
|
-
/**
|
|
1399
|
-
* LOD distance can be 0 to 0xFFFF (higher values will result in 0xFFFF) as it is actually stored as a 16-bit value (aka uint16_t).
|
|
1400
|
-
*
|
|
1401
|
-
* @param value
|
|
1402
|
-
*/
|
|
1403
|
-
setLodDist(value: number): void {
|
|
1404
|
-
inv<void>('0x5FB407F0A7C877BF', this.handle, value);
|
|
1405
|
-
}
|
|
1406
|
-
|
|
1407
|
-
/**
|
|
1408
|
-
* @param toggle
|
|
1409
|
-
*/
|
|
1410
|
-
setDynamic(toggle: boolean): void {
|
|
1411
|
-
inv<void>('0xFBFC4473F66CE344', this.handle, toggle);
|
|
1412
|
-
}
|
|
1413
|
-
|
|
1414
|
-
/**
|
|
1415
|
-
* @param radius
|
|
1416
|
-
*/
|
|
1417
|
-
setCustomPickupRadius(radius: number): void {
|
|
1418
|
-
inv<void>('0x482D17E45665DA44', this.handle, f(radius));
|
|
1419
|
-
}
|
|
1420
|
-
|
|
1421
|
-
/**
|
|
1422
|
-
* @returns
|
|
1423
|
-
*/
|
|
1424
|
-
getPopulationType(): number {
|
|
1425
|
-
return inv<number>('0xADE28862B6D7B85B', this.handle, rai());
|
|
1426
|
-
}
|
|
1427
|
-
|
|
1428
|
-
/**
|
|
1429
|
-
* @returns
|
|
1430
|
-
*/
|
|
1431
|
-
isAVehicle(): boolean {
|
|
1432
|
-
return inv<boolean>('0xC3D96AF45FCCEC4C', this.handle, rai());
|
|
1433
|
-
}
|
|
1434
|
-
|
|
1435
|
-
/**
|
|
1436
|
-
* @param pos
|
|
1437
|
-
* @param atTop
|
|
1438
|
-
* @param inWorldCoords
|
|
1439
|
-
* @returns
|
|
1440
|
-
*/
|
|
1441
|
-
getHeight(pos: Vector3, atTop: boolean, inWorldCoords: boolean): number {
|
|
1442
|
-
return inv<number>('0x296DEBC84474B375', this.handle, f(pos.x), f(pos.y), f(pos.z), atTop, inWorldCoords, raf());
|
|
1443
|
-
}
|
|
1444
|
-
|
|
1445
|
-
/**
|
|
1446
|
-
* @param pos
|
|
1447
|
-
* @returns
|
|
1448
|
-
*/
|
|
1449
|
-
getOffsetFromGivenWorldCoords(pos: Vector3): Vector3 {
|
|
1450
|
-
return Vector3.fromArray(inv<number[]>('0x497C6B1A2C9AE69C', this.handle, f(pos.x), f(pos.y), f(pos.z), rav()));
|
|
1451
|
-
}
|
|
1452
|
-
|
|
1453
|
-
addTrackingTrails(): void {
|
|
1454
|
-
inv<void>('0x1AD922AB5038DEF3', this.handle);
|
|
1455
|
-
}
|
|
1456
|
-
|
|
1457
|
-
/**
|
|
1458
|
-
* @param toggle
|
|
1459
|
-
*/
|
|
1460
|
-
setCanClimbOnEntity(toggle: boolean): void {
|
|
1461
|
-
inv<void>('0x24AED2A608F93C4C', this.handle, toggle);
|
|
1462
|
-
}
|
|
1463
|
-
|
|
1464
|
-
/**
|
|
1465
|
-
* @returns minimum; maximum
|
|
1466
|
-
*/
|
|
1467
|
-
getWorldPositionOfDimensions(): [Vector3, Vector3] {
|
|
1468
|
-
const result = inv<[number[], number[]]>('0xF3FDA9A617A15145', this.handle, pvv(), pvv());
|
|
1469
|
-
return [Vector3.fromArray(result[0]), Vector3.fromArray(result[1])];
|
|
1470
|
-
}
|
|
1471
|
-
|
|
1472
|
-
/**
|
|
1473
|
-
* @param p1
|
|
1474
|
-
* @returns
|
|
1475
|
-
*/
|
|
1476
|
-
isUnderwater(p1: boolean): any {
|
|
1477
|
-
return inv<number>('0xD4E5C1E93C466127', this.handle, p1);
|
|
1478
|
-
}
|
|
1479
|
-
|
|
1480
|
-
/**
|
|
1481
|
-
* @param animation
|
|
1482
|
-
* @param animGroup
|
|
1483
|
-
* @param p3
|
|
1484
|
-
* @returns
|
|
1485
|
-
*/
|
|
1486
|
-
stopAnim(animation: string | null, animGroup: string | null, p3: number): any {
|
|
1487
|
-
return inv<number>('0x786591D986DE9159', this.handle, animation, animGroup, f(p3));
|
|
1488
|
-
}
|
|
1489
|
-
|
|
1490
|
-
/**
|
|
1491
|
-
* @returns
|
|
1492
|
-
*/
|
|
1493
|
-
hasCollidedWithAnything(): boolean {
|
|
1494
|
-
return inv<boolean>('0xDF18751EC74F90FF', this.handle, rai());
|
|
1495
|
-
}
|
|
1496
|
-
|
|
1497
1550
|
/**
|
|
1498
1551
|
* @param entity2
|
|
1499
1552
|
* @param p2
|
|
@@ -1628,54 +1681,6 @@ export class Entity implements IHandle {
|
|
|
1628
1681
|
return inv<boolean>('0xF6F6AFD8D4FB2658', this.handle, f(angle), rai());
|
|
1629
1682
|
}
|
|
1630
1683
|
|
|
1631
|
-
/**
|
|
1632
|
-
* Simply returns whatever is passed to it (Regardless of whether the handle is valid or not).
|
|
1633
|
-
*
|
|
1634
|
-
* @returns
|
|
1635
|
-
*/
|
|
1636
|
-
getVehicleIndexFromIndex(): Vehicle | null {
|
|
1637
|
-
return createFromHandle<Vehicle>('Vehicle', inv<number>('0xDF1E5AAC561AFC59', this.handle, rai()));
|
|
1638
|
-
}
|
|
1639
|
-
|
|
1640
|
-
/**
|
|
1641
|
-
* @returns
|
|
1642
|
-
*/
|
|
1643
|
-
isVisible(): boolean {
|
|
1644
|
-
return inv<boolean>('0xFFC96ECB7FA404CA', this.handle, rai());
|
|
1645
|
-
}
|
|
1646
|
-
|
|
1647
|
-
/**
|
|
1648
|
-
* SET_ENTITY_LO*
|
|
1649
|
-
*
|
|
1650
|
-
* @param toggle
|
|
1651
|
-
*/
|
|
1652
|
-
N_0xFF9965C47FA404DA(toggle: boolean): void {
|
|
1653
|
-
inv<void>('0xFF9965C47FA404DA', this.handle, toggle);
|
|
1654
|
-
}
|
|
1655
|
-
|
|
1656
|
-
/**
|
|
1657
|
-
* Valid indices: 0 - 3
|
|
1658
|
-
* Index 1 always returns a `hogtied` config, doesn't matter the entity.
|
|
1659
|
-
* It's for humans only and the ped must be resurrected first if it's dead.
|
|
1660
|
-
*
|
|
1661
|
-
* @param index
|
|
1662
|
-
* @returns
|
|
1663
|
-
*/
|
|
1664
|
-
getOptimalCarryConfig(index: number): string | number {
|
|
1665
|
-
return (inv<number>('0x34F008A7E48C496B', this.handle, index, rai())) & 0xFFFFFFFF;
|
|
1666
|
-
}
|
|
1667
|
-
|
|
1668
|
-
setFadeIn(): void {
|
|
1669
|
-
inv<void>('0xA91E6CF94404E8C9', this.handle);
|
|
1670
|
-
}
|
|
1671
|
-
|
|
1672
|
-
/**
|
|
1673
|
-
* @returns
|
|
1674
|
-
*/
|
|
1675
|
-
hasBeenDamagedByAnyPed(): boolean {
|
|
1676
|
-
return inv<boolean>('0x9934E9C42D52D87E', this.handle, rai());
|
|
1677
|
-
}
|
|
1678
|
-
|
|
1679
1684
|
}
|
|
1680
1685
|
|
|
1681
1686
|
registerHandle('Entity', Entity);
|