@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/Entity.js
CHANGED
|
@@ -8,84 +8,122 @@ export class Entity {
|
|
|
8
8
|
static fromHandle(handle) {
|
|
9
9
|
return handle === 0 ? null : new Entity(handle);
|
|
10
10
|
}
|
|
11
|
+
static fromNetworkId(netId) {
|
|
12
|
+
if (!inv('0x38CE16C96BD11F2C', netId, rai()))
|
|
13
|
+
return null;
|
|
14
|
+
return Entity.fromHandle(inv('0x5B912C3F653822E6', netId, rai()));
|
|
15
|
+
}
|
|
11
16
|
/**
|
|
12
|
-
* @param targetEntity
|
|
13
17
|
* @returns
|
|
14
18
|
*/
|
|
15
|
-
|
|
16
|
-
return inv('
|
|
17
|
-
}
|
|
18
|
-
deleteCarriable() {
|
|
19
|
-
inv('0x0D0DB2B6AF19A987', this.handle);
|
|
19
|
+
getIsBird() {
|
|
20
|
+
return inv('0xC346A546612C49A9', this.handle);
|
|
20
21
|
}
|
|
21
22
|
/**
|
|
22
|
-
*
|
|
23
|
+
* Gets the entity's forward vector in YX(Z) eulers. Similar to GET_ENTITY_FORWARD_VECTOR
|
|
23
24
|
*
|
|
24
|
-
* @param animDict
|
|
25
|
-
* @param animName
|
|
26
25
|
* @returns
|
|
27
26
|
*/
|
|
28
|
-
|
|
29
|
-
return inv('
|
|
27
|
+
getForwardVectorYx() {
|
|
28
|
+
return Vector3.fromArray(inv('0x935A30AA88FB1014', this.handle, rav()));
|
|
30
29
|
}
|
|
31
30
|
/**
|
|
32
|
-
* @param
|
|
33
|
-
* @param
|
|
31
|
+
* @param pos
|
|
32
|
+
* @param xAxis
|
|
33
|
+
* @param yAxis
|
|
34
|
+
* @param zAxis
|
|
35
|
+
* @param clearArea
|
|
34
36
|
*/
|
|
35
|
-
|
|
36
|
-
inv('
|
|
37
|
+
setCoords(pos, xAxis, yAxis, zAxis, clearArea) {
|
|
38
|
+
inv('0x06843DA7060A026B', this.handle, f(pos.x), f(pos.y), f(pos.z), xAxis, yAxis, zAxis, clearArea);
|
|
37
39
|
}
|
|
38
40
|
/**
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
+
* @param boneName
|
|
41
42
|
* @returns
|
|
42
43
|
*/
|
|
43
|
-
|
|
44
|
-
return inv('
|
|
44
|
+
getBoneIndexByName(boneName) {
|
|
45
|
+
return inv('0xBACA8FE9C76C124E', this.handle, boneName, rai());
|
|
45
46
|
}
|
|
46
47
|
/**
|
|
47
|
-
* @param
|
|
48
|
+
* @param pause
|
|
48
49
|
*/
|
|
49
|
-
|
|
50
|
-
inv('
|
|
50
|
+
pauseTracking(pause) {
|
|
51
|
+
inv('0x36EB4D34D4A092C5', this.handle, pause);
|
|
51
52
|
}
|
|
52
53
|
/**
|
|
53
|
-
* @
|
|
54
|
+
* @param toggle
|
|
54
55
|
*/
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
setLoadCollisionFlag(toggle) {
|
|
57
|
+
inv('0x9B9EE31AED48072E', this.handle, toggle);
|
|
57
58
|
}
|
|
58
59
|
/**
|
|
59
|
-
*
|
|
60
|
-
*
|
|
60
|
+
* Changes type and quality of skins
|
|
61
|
+
* type hashes: https://pastebin.com/C1WvQjCy
|
|
62
|
+
*
|
|
63
|
+
* @param type
|
|
61
64
|
*/
|
|
62
|
-
|
|
63
|
-
inv('
|
|
65
|
+
setCarcassType(type) {
|
|
66
|
+
inv('0x399657ED871B3A6C', this.handle, _h(type));
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* @param toggle
|
|
70
|
+
*/
|
|
71
|
+
setHasGravity(toggle) {
|
|
72
|
+
inv('0x0CEDB728A1083FA7', this.handle, toggle);
|
|
64
73
|
}
|
|
65
74
|
/**
|
|
75
|
+
* @param relative
|
|
66
76
|
* @returns
|
|
67
77
|
*/
|
|
68
|
-
|
|
69
|
-
return inv('
|
|
78
|
+
getSpeedVector(relative) {
|
|
79
|
+
return Vector3.fromArray(inv('0xF2DB09816A419DC5', this.handle, relative, rav()));
|
|
70
80
|
}
|
|
71
81
|
/**
|
|
72
82
|
* @param entity2
|
|
73
|
-
* @param
|
|
83
|
+
* @param p2
|
|
84
|
+
* @param p3
|
|
74
85
|
* @returns
|
|
75
86
|
*/
|
|
76
|
-
|
|
77
|
-
return inv('
|
|
87
|
+
hasBeenDamagedByEntity(entity2, p2, p3) {
|
|
88
|
+
return inv('0x7B6E7BEC1143AC86', this.handle, entity2.handle, p2, p3, rai());
|
|
78
89
|
}
|
|
79
90
|
/**
|
|
80
|
-
* Used in Script Function GENERIC_ITEM_HAS_ANIM_COMPLETED
|
|
81
|
-
* *GET_ENTITY**
|
|
82
|
-
*
|
|
83
|
-
* @param animDict
|
|
84
|
-
* @param animClip
|
|
85
91
|
* @returns
|
|
86
92
|
*/
|
|
87
|
-
|
|
88
|
-
return inv('
|
|
93
|
+
isFullyLooted() {
|
|
94
|
+
return inv('0x8DE41E9902E85756', this.handle);
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* @returns
|
|
98
|
+
*/
|
|
99
|
+
isOccluded() {
|
|
100
|
+
return inv('0x140188E884645624', this.handle, rai());
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* @param toggle
|
|
104
|
+
*/
|
|
105
|
+
setCanBeDamaged(toggle) {
|
|
106
|
+
inv('0x0D06D522B90E861F', this.handle, toggle);
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* @param forceFlags
|
|
110
|
+
* @param pos
|
|
111
|
+
* @param offset
|
|
112
|
+
* @param boneIndex
|
|
113
|
+
* @param isDirectionRel
|
|
114
|
+
* @param ignoreUpVec
|
|
115
|
+
* @param isForceRel
|
|
116
|
+
* @param p12
|
|
117
|
+
* @param p13
|
|
118
|
+
*/
|
|
119
|
+
applyForceToEntity(forceFlags, pos, offset, boneIndex, isDirectionRel, ignoreUpVec, isForceRel, p12, p13) {
|
|
120
|
+
inv('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);
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* @returns
|
|
124
|
+
*/
|
|
125
|
+
isDead() {
|
|
126
|
+
return inv('0x7D5B1F88E7504BBA', this.handle, rai());
|
|
89
127
|
}
|
|
90
128
|
/**
|
|
91
129
|
* @param playerPedToIgnore
|
|
@@ -256,6 +294,92 @@ export class Entity {
|
|
|
256
294
|
getNearestPlayerToOnTeam(team, playerPedToIgnore, flags) {
|
|
257
295
|
return createFromHandle('Player', inv('0xB2C30C3B4AFF718C', this.handle, team, playerPedToIgnore.handle, flags, rai()));
|
|
258
296
|
}
|
|
297
|
+
/**
|
|
298
|
+
* Returns the LOD distance of an entity.
|
|
299
|
+
*
|
|
300
|
+
* @returns
|
|
301
|
+
*/
|
|
302
|
+
getLodDist() {
|
|
303
|
+
return inv('0xDF240D0C2A948683', this.handle, rai());
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* @returns
|
|
307
|
+
*/
|
|
308
|
+
doesHaveDrawable() {
|
|
309
|
+
return inv('0x20487F0DA9AF164A', this.handle, rai());
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* @param xyzw
|
|
313
|
+
*/
|
|
314
|
+
setQuaternion(xyzw) {
|
|
315
|
+
inv('0x100E7007D13E3687', this.handle, f(xyzw.x), f(xyzw.y), f(xyzw.z), f(xyzw.w));
|
|
316
|
+
}
|
|
317
|
+
/**
|
|
318
|
+
* @returns
|
|
319
|
+
*/
|
|
320
|
+
isAttachedToAnyObject() {
|
|
321
|
+
return inv('0x306C1F6178F01AB3', this.handle, rai());
|
|
322
|
+
}
|
|
323
|
+
/**
|
|
324
|
+
* Sets a ped or an object totally invincible. It doesn't take any kind of damage. Peds will not ragdoll on explosions.
|
|
325
|
+
*
|
|
326
|
+
* @param toggle
|
|
327
|
+
*/
|
|
328
|
+
setInvincible(toggle) {
|
|
329
|
+
inv('0xA5C38736C426FCB8', this.handle, toggle);
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* 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.
|
|
333
|
+
* https://github.com/femga/rdr3_discoveries/tree/master/boneNames useSoftPinning - if set to false attached entity will not detach when fixed
|
|
334
|
+
* collision - controls collision between the two entities (FALSE disables collision).
|
|
335
|
+
* isPed - pitch doesn't work when false and roll will only work on negative numbers (only peds)
|
|
336
|
+
* vertexIndex - position of vertex
|
|
337
|
+
* fixedRot - if false it ignores entity vector
|
|
338
|
+
*
|
|
339
|
+
* @param entity2
|
|
340
|
+
* @param boneIndex
|
|
341
|
+
* @param pos
|
|
342
|
+
* @param rot
|
|
343
|
+
* @param p9
|
|
344
|
+
* @param useSoftPinning
|
|
345
|
+
* @param collision
|
|
346
|
+
* @param isPed
|
|
347
|
+
* @param vertexIndex
|
|
348
|
+
* @param fixedRot
|
|
349
|
+
* @param p15
|
|
350
|
+
* @param p16
|
|
351
|
+
*/
|
|
352
|
+
attachToEntity(entity2, boneIndex, pos, rot, p9, useSoftPinning, collision, isPed, vertexIndex, fixedRot, p15, p16) {
|
|
353
|
+
inv('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);
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* @returns
|
|
357
|
+
*/
|
|
358
|
+
getIsAnimal() {
|
|
359
|
+
return inv('0x9A100F1CF4546629', this.handle);
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* p6/relative - makes the xyz force not relative to world coords, but to something else
|
|
363
|
+
* p7/highForce - setting false will make the force really low
|
|
364
|
+
*
|
|
365
|
+
* @param forceType
|
|
366
|
+
* @param pos
|
|
367
|
+
* @param component
|
|
368
|
+
* @param isDirectionRel
|
|
369
|
+
* @param isForceRel
|
|
370
|
+
* @param p8
|
|
371
|
+
*/
|
|
372
|
+
applyForceToCenterOfMass(forceType, pos, component, isDirectionRel, isForceRel, p8) {
|
|
373
|
+
inv('0x31DA7CEC5334DB37', this.handle, forceType, f(pos.x), f(pos.y), f(pos.z), component, isDirectionRel, isForceRel, p8);
|
|
374
|
+
}
|
|
375
|
+
/**
|
|
376
|
+
* Old name: _GET_ENTITY_CAN_BE_DAMAGED
|
|
377
|
+
*
|
|
378
|
+
* @returns
|
|
379
|
+
*/
|
|
380
|
+
getCanBeDamaged() {
|
|
381
|
+
return inv('0x75DF9E73F2F005FD', this.handle);
|
|
382
|
+
}
|
|
259
383
|
/**
|
|
260
384
|
* @param p1
|
|
261
385
|
*/
|
|
@@ -329,312 +453,365 @@ export class Entity {
|
|
|
329
453
|
return createFromHandle('Player', inv('0x6888A43C35A5F630', this.handle, rai()));
|
|
330
454
|
}
|
|
331
455
|
/**
|
|
332
|
-
*
|
|
333
|
-
* {
|
|
334
|
-
* CARRIABLE_STATE_NONE,
|
|
335
|
-
* CARRIABLE_STATE_TRANSITIONING_TO_HOGTIED,
|
|
336
|
-
* CARRIABLE_STATE_CARRIABLE_INTRO,
|
|
337
|
-
* CARRIABLE_STATE_CARRIABLE,
|
|
338
|
-
* CARRIABLE_STATE_BEING_PICKED_UP_FROM_GROUND,
|
|
339
|
-
* CARRIABLE_STATE_CARRIED_BY_HUMAN,
|
|
340
|
-
* CARRIABLE_STATE_BEING_PLACED_ON_GROUND,
|
|
341
|
-
* CARRIABLE_STATE_CARRIED_BY_MOUNT,
|
|
342
|
-
* CARRIABLE_STATE_BEING_PLACED_ON_MOUNT,
|
|
343
|
-
* CARRIABLE_STATE_BEING_PICKED_UP_FROM_MOUNT,
|
|
344
|
-
* CARRIABLE_STATE_BEING_CUT_FREE,
|
|
345
|
-
* CARRIABLE_STATE_BEING_PLACED_ON_GROUND_ESCAPE,
|
|
346
|
-
* CARRIABLE_STATE_BEING_PLACED_IN_VEHICLE
|
|
347
|
-
* };
|
|
456
|
+
* Returns entityType: https://github.com/Halen84/RDR3-Native-Flags-And-Enums/tree/main/eEntityType
|
|
348
457
|
*
|
|
349
458
|
* @returns
|
|
350
459
|
*/
|
|
351
|
-
|
|
352
|
-
return inv('
|
|
460
|
+
getType() {
|
|
461
|
+
return inv('0x97F696ACA466B4E0', this.handle, rai());
|
|
353
462
|
}
|
|
354
463
|
/**
|
|
355
|
-
* @
|
|
464
|
+
* @returns
|
|
356
465
|
*/
|
|
357
|
-
|
|
358
|
-
inv('
|
|
466
|
+
isOwnedByPersistenceSystem() {
|
|
467
|
+
return inv('0xA7E51B53309EAC97', this.handle);
|
|
359
468
|
}
|
|
360
469
|
/**
|
|
361
|
-
*
|
|
362
|
-
*
|
|
363
|
-
* @param
|
|
470
|
+
* @param animDict
|
|
471
|
+
* @param animName
|
|
472
|
+
* @param animType
|
|
364
473
|
* @returns
|
|
365
474
|
*/
|
|
366
|
-
|
|
367
|
-
return inv('
|
|
475
|
+
isPlayingAnim(animDict, animName, animType) {
|
|
476
|
+
return inv('0xDEE49D5CA6C49148', this.handle, animDict, animName, animType, rai());
|
|
368
477
|
}
|
|
369
478
|
/**
|
|
370
|
-
*
|
|
479
|
+
* Marks the specified entity (ped, vehicle or object) as no longer needed, allowing the game engine to delete it whenever it sees fit.
|
|
371
480
|
*/
|
|
372
|
-
|
|
373
|
-
inv('
|
|
481
|
+
setAsNoLongerNeeded() {
|
|
482
|
+
inv('0x4971D2F8162B9674', this.handle);
|
|
374
483
|
}
|
|
375
484
|
/**
|
|
376
|
-
* Offset values are relative to the entity. x = left/right
|
|
377
|
-
* y = forward/backward
|
|
378
|
-
* z = up/down
|
|
379
|
-
*
|
|
380
|
-
* @param offset
|
|
381
485
|
* @returns
|
|
382
486
|
*/
|
|
383
|
-
|
|
384
|
-
return
|
|
487
|
+
hasBeenDamagedByAnyVehicle() {
|
|
488
|
+
return inv('0x695D7C26DE65C423', this.handle, rai());
|
|
385
489
|
}
|
|
386
490
|
/**
|
|
387
|
-
*
|
|
388
|
-
*
|
|
389
|
-
* @param
|
|
390
|
-
* @param xSize
|
|
391
|
-
* @param ySize
|
|
392
|
-
* @param zSize
|
|
393
|
-
* @param p5
|
|
394
|
-
* @param p6
|
|
395
|
-
* @param p7
|
|
396
|
-
* @returns
|
|
491
|
+
* @param animDict
|
|
492
|
+
* @param animName
|
|
493
|
+
* @param speedMultiplier
|
|
397
494
|
*/
|
|
398
|
-
|
|
399
|
-
|
|
495
|
+
setAnimSpeed(animDict, animName, speedMultiplier) {
|
|
496
|
+
inv('0xEAA885BA3CEA4E4A', this.handle, animDict, animName, f(speedMultiplier));
|
|
400
497
|
}
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
*/
|
|
404
|
-
setVisible(toggle) {
|
|
405
|
-
inv('0x1794B4FCC84D812F', this.handle, toggle);
|
|
498
|
+
unpinMapEntity() {
|
|
499
|
+
inv('0xD2B9C78537ED5759', this.handle);
|
|
406
500
|
}
|
|
407
501
|
/**
|
|
408
|
-
*
|
|
502
|
+
* Get how much of the entity is submerged. 1.0f is whole entity.
|
|
409
503
|
*
|
|
410
|
-
* @
|
|
504
|
+
* @returns
|
|
411
505
|
*/
|
|
412
|
-
|
|
413
|
-
inv('
|
|
506
|
+
getSubmergedLevel() {
|
|
507
|
+
return inv('0x4A77C3F73FD9E831', this.handle, raf());
|
|
414
508
|
}
|
|
415
509
|
/**
|
|
416
|
-
* Note: this native was removed in 1232 but added back in 1311
|
|
417
|
-
* Old name: _GET_ENTITY_PROOFS
|
|
418
|
-
*
|
|
419
510
|
* @returns
|
|
420
511
|
*/
|
|
421
|
-
|
|
422
|
-
return inv('
|
|
512
|
+
isAttached() {
|
|
513
|
+
return inv('0xEE6AD63ABF59C0B7', this.handle, rai());
|
|
423
514
|
}
|
|
424
515
|
/**
|
|
425
|
-
*
|
|
426
|
-
* Set entity alpha level. Ranging from 0 to 255 but changes occur after every 20 percent (after every 51).
|
|
516
|
+
* SET_ENTITY_A*
|
|
427
517
|
*
|
|
428
|
-
* @param
|
|
429
|
-
* @param skin
|
|
518
|
+
* @param p1
|
|
430
519
|
*/
|
|
431
|
-
|
|
432
|
-
inv('
|
|
520
|
+
N_0xC0EDEF16D90661EE(p1) {
|
|
521
|
+
inv('0xC0EDEF16D90661EE', this.handle, f(p1));
|
|
433
522
|
}
|
|
434
523
|
/**
|
|
435
|
-
* @
|
|
524
|
+
* @param looted
|
|
436
525
|
*/
|
|
437
|
-
|
|
438
|
-
|
|
526
|
+
setFullyLooted(looted) {
|
|
527
|
+
inv('0x6BCF5F3D8FFE988D', this.handle, looted);
|
|
439
528
|
}
|
|
440
529
|
/**
|
|
441
530
|
* @returns
|
|
442
531
|
*/
|
|
443
|
-
|
|
444
|
-
return inv('
|
|
532
|
+
isAttachedToAnyVehicle() {
|
|
533
|
+
return inv('0x12DF6E0D2E736749', this.handle, rai());
|
|
445
534
|
}
|
|
446
535
|
/**
|
|
447
536
|
* @param p1
|
|
448
|
-
* @returns
|
|
449
537
|
*/
|
|
450
|
-
|
|
451
|
-
|
|
538
|
+
N_0xA48E4801DEBDF7E4(p1) {
|
|
539
|
+
inv('0xA48E4801DEBDF7E4', this.handle, p1);
|
|
452
540
|
}
|
|
453
541
|
/**
|
|
454
|
-
*
|
|
455
|
-
*
|
|
542
|
+
* @param toggle
|
|
543
|
+
* @param keepPhysics
|
|
544
|
+
*/
|
|
545
|
+
setCompletelyDisableCollision(toggle, keepPhysics) {
|
|
546
|
+
inv('0xE0580EC84813875A', this.handle, toggle, keepPhysics);
|
|
547
|
+
}
|
|
548
|
+
/**
|
|
549
|
+
* @param p1
|
|
550
|
+
*/
|
|
551
|
+
N_0xCDB682BB47C02F0A(p1) {
|
|
552
|
+
inv('0xCDB682BB47C02F0A', this.handle, _h(p1));
|
|
553
|
+
}
|
|
554
|
+
/**
|
|
555
|
+
* @param volume
|
|
556
|
+
* @param p2
|
|
557
|
+
* @param p3
|
|
456
558
|
* @returns
|
|
457
559
|
*/
|
|
458
|
-
|
|
459
|
-
return
|
|
560
|
+
isInVolume(volume, p2, p3) {
|
|
561
|
+
return inv('0x5A5526BC09C06623', this.handle, volume, p2, p3, rai());
|
|
460
562
|
}
|
|
461
563
|
/**
|
|
462
|
-
* @
|
|
463
|
-
* @param keepPhysics
|
|
564
|
+
* @returns rightVector; forwardVector; upVector; position
|
|
464
565
|
*/
|
|
465
|
-
|
|
466
|
-
inv('
|
|
566
|
+
getMatrix() {
|
|
567
|
+
const result = inv('0x3A9B1120AF13FBF2', this.handle, pvv(), pvv(), pvv(), pvv());
|
|
568
|
+
return [Vector3.fromArray(result[0]), Vector3.fromArray(result[1]), Vector3.fromArray(result[2]), Vector3.fromArray(result[3])];
|
|
569
|
+
}
|
|
570
|
+
/**
|
|
571
|
+
* 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.
|
|
572
|
+
*/
|
|
573
|
+
N_0x371D179701D9C082() {
|
|
574
|
+
inv('0x371D179701D9C082', this.handle);
|
|
467
575
|
}
|
|
468
576
|
/**
|
|
469
577
|
* @param p1
|
|
470
578
|
* @returns
|
|
471
579
|
*/
|
|
472
|
-
|
|
473
|
-
return inv('
|
|
580
|
+
getMaxHealth(p1) {
|
|
581
|
+
return inv('0x15D757606D170C3C', this.handle, p1, rai());
|
|
474
582
|
}
|
|
475
583
|
/**
|
|
476
|
-
* @
|
|
584
|
+
* @param animDict
|
|
585
|
+
* @param animName
|
|
586
|
+
* @param time
|
|
477
587
|
*/
|
|
478
|
-
|
|
479
|
-
|
|
588
|
+
setAnimCurrentTime(animDict, animName, time) {
|
|
589
|
+
inv('0x11CDABDC7783B2BC', this.handle, animDict, animName, f(time));
|
|
480
590
|
}
|
|
481
591
|
/**
|
|
482
|
-
*
|
|
592
|
+
* Gets the current coordinates for a specified entity.
|
|
593
|
+
* `entity` = The entity to get the coordinates from.
|
|
594
|
+
* `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.
|
|
595
|
+
*
|
|
596
|
+
* @param alive
|
|
597
|
+
* @param realCoords
|
|
598
|
+
* @returns
|
|
483
599
|
*/
|
|
484
|
-
|
|
485
|
-
return inv('
|
|
600
|
+
getCoords(alive, realCoords) {
|
|
601
|
+
return Vector3.fromArray(inv('0xA86D5F069399F44D', this.handle, alive, realCoords, rav()));
|
|
486
602
|
}
|
|
487
603
|
/**
|
|
488
604
|
* @returns
|
|
489
605
|
*/
|
|
490
|
-
|
|
491
|
-
return inv('
|
|
606
|
+
isAnObject() {
|
|
607
|
+
return inv('0x0A27A546A375FDEF', this.handle, rai());
|
|
492
608
|
}
|
|
493
609
|
/**
|
|
494
|
-
*
|
|
610
|
+
* 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).
|
|
495
611
|
*
|
|
496
|
-
* @param
|
|
612
|
+
* @param value
|
|
613
|
+
*/
|
|
614
|
+
setLodDist(value) {
|
|
615
|
+
inv('0x5FB407F0A7C877BF', this.handle, value);
|
|
616
|
+
}
|
|
617
|
+
/**
|
|
618
|
+
* @param toggle
|
|
619
|
+
*/
|
|
620
|
+
setDynamic(toggle) {
|
|
621
|
+
inv('0xFBFC4473F66CE344', this.handle, toggle);
|
|
622
|
+
}
|
|
623
|
+
/**
|
|
624
|
+
* @param radius
|
|
625
|
+
*/
|
|
626
|
+
setCustomPickupRadius(radius) {
|
|
627
|
+
inv('0x482D17E45665DA44', this.handle, f(radius));
|
|
628
|
+
}
|
|
629
|
+
/**
|
|
497
630
|
* @returns
|
|
498
631
|
*/
|
|
499
|
-
|
|
500
|
-
return inv('
|
|
632
|
+
getPopulationType() {
|
|
633
|
+
return inv('0xADE28862B6D7B85B', this.handle, rai());
|
|
501
634
|
}
|
|
502
635
|
/**
|
|
503
|
-
* @
|
|
636
|
+
* @returns
|
|
504
637
|
*/
|
|
505
|
-
|
|
506
|
-
inv('
|
|
638
|
+
isAVehicle() {
|
|
639
|
+
return inv('0xC3D96AF45FCCEC4C', this.handle, rai());
|
|
507
640
|
}
|
|
508
641
|
/**
|
|
509
|
-
* Axis - Invert Axis Flags
|
|
510
|
-
*
|
|
511
642
|
* @param pos
|
|
512
|
-
* @param
|
|
513
|
-
* @param
|
|
514
|
-
* @
|
|
643
|
+
* @param atTop
|
|
644
|
+
* @param inWorldCoords
|
|
645
|
+
* @returns
|
|
515
646
|
*/
|
|
516
|
-
|
|
517
|
-
inv('
|
|
647
|
+
getHeight(pos, atTop, inWorldCoords) {
|
|
648
|
+
return inv('0x296DEBC84474B375', this.handle, f(pos.x), f(pos.y), f(pos.z), atTop, inWorldCoords, raf());
|
|
518
649
|
}
|
|
519
650
|
/**
|
|
520
|
-
*
|
|
521
|
-
*
|
|
651
|
+
* @param pos
|
|
522
652
|
* @returns
|
|
523
653
|
*/
|
|
524
|
-
|
|
525
|
-
return inv('
|
|
654
|
+
getOffsetFromGivenWorldCoords(pos) {
|
|
655
|
+
return Vector3.fromArray(inv('0x497C6B1A2C9AE69C', this.handle, f(pos.x), f(pos.y), f(pos.z), rav()));
|
|
656
|
+
}
|
|
657
|
+
addTrackingTrails() {
|
|
658
|
+
inv('0x1AD922AB5038DEF3', this.handle);
|
|
659
|
+
}
|
|
660
|
+
/**
|
|
661
|
+
* @param toggle
|
|
662
|
+
*/
|
|
663
|
+
setCanClimbOnEntity(toggle) {
|
|
664
|
+
inv('0x24AED2A608F93C4C', this.handle, toggle);
|
|
665
|
+
}
|
|
666
|
+
/**
|
|
667
|
+
* @returns minimum; maximum
|
|
668
|
+
*/
|
|
669
|
+
getWorldPositionOfDimensions() {
|
|
670
|
+
const result = inv('0xF3FDA9A617A15145', this.handle, pvv(), pvv());
|
|
671
|
+
return [Vector3.fromArray(result[0]), Vector3.fromArray(result[1])];
|
|
526
672
|
}
|
|
527
673
|
/**
|
|
674
|
+
* @param p1
|
|
528
675
|
* @returns
|
|
529
676
|
*/
|
|
530
|
-
|
|
531
|
-
return inv('
|
|
677
|
+
isUnderwater(p1) {
|
|
678
|
+
return inv('0xD4E5C1E93C466127', this.handle, p1);
|
|
532
679
|
}
|
|
533
680
|
/**
|
|
534
|
-
*
|
|
535
|
-
*
|
|
681
|
+
* @param animation
|
|
682
|
+
* @param animGroup
|
|
683
|
+
* @param p3
|
|
536
684
|
* @returns
|
|
537
685
|
*/
|
|
538
|
-
|
|
539
|
-
return
|
|
686
|
+
stopAnim(animation, animGroup, p3) {
|
|
687
|
+
return inv('0x786591D986DE9159', this.handle, animation, animGroup, f(p3));
|
|
540
688
|
}
|
|
541
689
|
/**
|
|
542
|
-
* @
|
|
543
|
-
* @param xAxis
|
|
544
|
-
* @param yAxis
|
|
545
|
-
* @param zAxis
|
|
546
|
-
* @param clearArea
|
|
690
|
+
* @returns
|
|
547
691
|
*/
|
|
548
|
-
|
|
549
|
-
inv('
|
|
692
|
+
hasCollidedWithAnything() {
|
|
693
|
+
return inv('0xDF18751EC74F90FF', this.handle, rai());
|
|
550
694
|
}
|
|
551
695
|
/**
|
|
552
|
-
*
|
|
696
|
+
* Simply returns whatever is passed to it (Regardless of whether the handle is valid or not).
|
|
697
|
+
*
|
|
553
698
|
* @returns
|
|
554
699
|
*/
|
|
555
|
-
|
|
556
|
-
return inv('
|
|
700
|
+
getVehicleIndexFromIndex() {
|
|
701
|
+
return createFromHandle('Vehicle', inv('0xDF1E5AAC561AFC59', this.handle, rai()));
|
|
557
702
|
}
|
|
558
703
|
/**
|
|
559
|
-
* @
|
|
704
|
+
* @returns
|
|
560
705
|
*/
|
|
561
|
-
|
|
562
|
-
inv('
|
|
706
|
+
isVisible() {
|
|
707
|
+
return inv('0xFFC96ECB7FA404CA', this.handle, rai());
|
|
563
708
|
}
|
|
564
709
|
/**
|
|
710
|
+
* SET_ENTITY_LO*
|
|
711
|
+
*
|
|
565
712
|
* @param toggle
|
|
566
713
|
*/
|
|
567
|
-
|
|
568
|
-
inv('
|
|
714
|
+
N_0xFF9965C47FA404DA(toggle) {
|
|
715
|
+
inv('0xFF9965C47FA404DA', this.handle, toggle);
|
|
569
716
|
}
|
|
570
717
|
/**
|
|
571
|
-
*
|
|
572
|
-
*
|
|
718
|
+
* Valid indices: 0 - 3
|
|
719
|
+
* Index 1 always returns a `hogtied` config, doesn't matter the entity.
|
|
720
|
+
* It's for humans only and the ped must be resurrected first if it's dead.
|
|
573
721
|
*
|
|
574
|
-
* @param
|
|
722
|
+
* @param index
|
|
723
|
+
* @returns
|
|
575
724
|
*/
|
|
576
|
-
|
|
577
|
-
inv('
|
|
725
|
+
getOptimalCarryConfig(index) {
|
|
726
|
+
return (inv('0x34F008A7E48C496B', this.handle, index, rai())) & 0xFFFFFFFF;
|
|
727
|
+
}
|
|
728
|
+
setFadeIn() {
|
|
729
|
+
inv('0xA91E6CF94404E8C9', this.handle);
|
|
578
730
|
}
|
|
579
731
|
/**
|
|
580
|
-
* @
|
|
732
|
+
* @returns
|
|
581
733
|
*/
|
|
582
|
-
|
|
583
|
-
inv('
|
|
734
|
+
hasBeenDamagedByAnyPed() {
|
|
735
|
+
return inv('0x9934E9C42D52D87E', this.handle, rai());
|
|
584
736
|
}
|
|
585
737
|
/**
|
|
586
|
-
* @param
|
|
738
|
+
* @param targetEntity
|
|
587
739
|
* @returns
|
|
588
740
|
*/
|
|
589
|
-
|
|
590
|
-
return
|
|
741
|
+
isTouchingEntity(targetEntity) {
|
|
742
|
+
return inv('0x9A2304A64C3C8423', this.handle, targetEntity.handle, rai());
|
|
743
|
+
}
|
|
744
|
+
deleteCarriable() {
|
|
745
|
+
inv('0x0D0DB2B6AF19A987', this.handle);
|
|
591
746
|
}
|
|
592
747
|
/**
|
|
593
|
-
*
|
|
594
|
-
*
|
|
595
|
-
* @param
|
|
748
|
+
* Returns a normalized value between 0.0f and 1.0f. You can get the actual anim time by multiplying this by GET_ANIM_DURATION
|
|
749
|
+
*
|
|
750
|
+
* @param animDict
|
|
751
|
+
* @param animName
|
|
596
752
|
* @returns
|
|
597
753
|
*/
|
|
598
|
-
|
|
599
|
-
return inv('
|
|
754
|
+
getAnimCurrentTime(animDict, animName) {
|
|
755
|
+
return inv('0x627520389E288A73', this.handle, animDict, animName, raf());
|
|
756
|
+
}
|
|
757
|
+
/**
|
|
758
|
+
* @param entity2
|
|
759
|
+
* @param thisFrameOnly
|
|
760
|
+
*/
|
|
761
|
+
setNoCollisionEntity(entity2, thisFrameOnly) {
|
|
762
|
+
inv('0xE037BF068223C38D', this.handle, entity2.handle, thisFrameOnly);
|
|
600
763
|
}
|
|
601
764
|
/**
|
|
765
|
+
* Result is in meters per second (m/s)
|
|
766
|
+
*
|
|
602
767
|
* @returns
|
|
603
768
|
*/
|
|
604
|
-
|
|
605
|
-
return inv('
|
|
769
|
+
getSpeed() {
|
|
770
|
+
return inv('0xFB6BA510A533DF81', this.handle, raf());
|
|
771
|
+
}
|
|
772
|
+
/**
|
|
773
|
+
* @param bOnlyDamagedWhenRunningScript
|
|
774
|
+
*/
|
|
775
|
+
setCanOnlyBeDamagedByScriptParticipants(bOnlyDamagedWhenRunningScript) {
|
|
776
|
+
inv('0xFF83AF534156B399', this.handle, bOnlyDamagedWhenRunningScript);
|
|
606
777
|
}
|
|
607
778
|
/**
|
|
608
779
|
* @returns
|
|
609
780
|
*/
|
|
610
|
-
|
|
611
|
-
return inv('
|
|
781
|
+
isTrackedVisible() {
|
|
782
|
+
return inv('0xC8CCDB712FBCBA92', this.handle);
|
|
612
783
|
}
|
|
613
784
|
/**
|
|
614
|
-
* @param
|
|
785
|
+
* @param p1
|
|
786
|
+
* @param collision
|
|
615
787
|
*/
|
|
616
|
-
|
|
617
|
-
inv('
|
|
788
|
+
detachEntity(p1, collision) {
|
|
789
|
+
inv('0x64CDE9D6BF8ECAD3', this.handle, p1, collision);
|
|
618
790
|
}
|
|
619
791
|
/**
|
|
620
|
-
* @
|
|
621
|
-
* @param pos
|
|
622
|
-
* @param offset
|
|
623
|
-
* @param boneIndex
|
|
624
|
-
* @param isDirectionRel
|
|
625
|
-
* @param ignoreUpVec
|
|
626
|
-
* @param isForceRel
|
|
627
|
-
* @param p12
|
|
628
|
-
* @param p13
|
|
792
|
+
* @returns
|
|
629
793
|
*/
|
|
630
|
-
|
|
631
|
-
inv('
|
|
794
|
+
isVisibleToScript() {
|
|
795
|
+
return inv('0xF213C724E77F321A', this.handle, rai());
|
|
632
796
|
}
|
|
633
797
|
/**
|
|
798
|
+
* @param entity2
|
|
799
|
+
* @param traceType
|
|
634
800
|
* @returns
|
|
635
801
|
*/
|
|
636
|
-
|
|
637
|
-
return inv('
|
|
802
|
+
hasClearLosToEntity(entity2, traceType) {
|
|
803
|
+
return inv('0xFCDFF7B72D23A1AC', this.handle, entity2.handle, traceType, rai());
|
|
804
|
+
}
|
|
805
|
+
/**
|
|
806
|
+
* Used in Script Function GENERIC_ITEM_HAS_ANIM_COMPLETED
|
|
807
|
+
* *GET_ENTITY**
|
|
808
|
+
*
|
|
809
|
+
* @param animDict
|
|
810
|
+
* @param animClip
|
|
811
|
+
* @returns
|
|
812
|
+
*/
|
|
813
|
+
N_0x8E46E18AA828334F(animDict, animClip) {
|
|
814
|
+
return inv('0x8E46E18AA828334F', this.handle, animDict, animClip, raf());
|
|
638
815
|
}
|
|
639
816
|
/**
|
|
640
817
|
* @param pos1
|
|
@@ -739,92 +916,6 @@ export class Entity {
|
|
|
739
916
|
getHeading() {
|
|
740
917
|
return inv('0xC230DD956E2F5507', this.handle, raf());
|
|
741
918
|
}
|
|
742
|
-
/**
|
|
743
|
-
* Returns the LOD distance of an entity.
|
|
744
|
-
*
|
|
745
|
-
* @returns
|
|
746
|
-
*/
|
|
747
|
-
getLodDist() {
|
|
748
|
-
return inv('0xDF240D0C2A948683', this.handle, rai());
|
|
749
|
-
}
|
|
750
|
-
/**
|
|
751
|
-
* @returns
|
|
752
|
-
*/
|
|
753
|
-
doesHaveDrawable() {
|
|
754
|
-
return inv('0x20487F0DA9AF164A', this.handle, rai());
|
|
755
|
-
}
|
|
756
|
-
/**
|
|
757
|
-
* @param xyzw
|
|
758
|
-
*/
|
|
759
|
-
setQuaternion(xyzw) {
|
|
760
|
-
inv('0x100E7007D13E3687', this.handle, f(xyzw.x), f(xyzw.y), f(xyzw.z), f(xyzw.w));
|
|
761
|
-
}
|
|
762
|
-
/**
|
|
763
|
-
* @returns
|
|
764
|
-
*/
|
|
765
|
-
isAttachedToAnyObject() {
|
|
766
|
-
return inv('0x306C1F6178F01AB3', this.handle, rai());
|
|
767
|
-
}
|
|
768
|
-
/**
|
|
769
|
-
* Sets a ped or an object totally invincible. It doesn't take any kind of damage. Peds will not ragdoll on explosions.
|
|
770
|
-
*
|
|
771
|
-
* @param toggle
|
|
772
|
-
*/
|
|
773
|
-
setInvincible(toggle) {
|
|
774
|
-
inv('0xA5C38736C426FCB8', this.handle, toggle);
|
|
775
|
-
}
|
|
776
|
-
/**
|
|
777
|
-
* 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.
|
|
778
|
-
* https://github.com/femga/rdr3_discoveries/tree/master/boneNames useSoftPinning - if set to false attached entity will not detach when fixed
|
|
779
|
-
* collision - controls collision between the two entities (FALSE disables collision).
|
|
780
|
-
* isPed - pitch doesn't work when false and roll will only work on negative numbers (only peds)
|
|
781
|
-
* vertexIndex - position of vertex
|
|
782
|
-
* fixedRot - if false it ignores entity vector
|
|
783
|
-
*
|
|
784
|
-
* @param entity2
|
|
785
|
-
* @param boneIndex
|
|
786
|
-
* @param pos
|
|
787
|
-
* @param rot
|
|
788
|
-
* @param p9
|
|
789
|
-
* @param useSoftPinning
|
|
790
|
-
* @param collision
|
|
791
|
-
* @param isPed
|
|
792
|
-
* @param vertexIndex
|
|
793
|
-
* @param fixedRot
|
|
794
|
-
* @param p15
|
|
795
|
-
* @param p16
|
|
796
|
-
*/
|
|
797
|
-
attachToEntity(entity2, boneIndex, pos, rot, p9, useSoftPinning, collision, isPed, vertexIndex, fixedRot, p15, p16) {
|
|
798
|
-
inv('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);
|
|
799
|
-
}
|
|
800
|
-
/**
|
|
801
|
-
* @returns
|
|
802
|
-
*/
|
|
803
|
-
getIsAnimal() {
|
|
804
|
-
return inv('0x9A100F1CF4546629', this.handle);
|
|
805
|
-
}
|
|
806
|
-
/**
|
|
807
|
-
* p6/relative - makes the xyz force not relative to world coords, but to something else
|
|
808
|
-
* p7/highForce - setting false will make the force really low
|
|
809
|
-
*
|
|
810
|
-
* @param forceType
|
|
811
|
-
* @param pos
|
|
812
|
-
* @param component
|
|
813
|
-
* @param isDirectionRel
|
|
814
|
-
* @param isForceRel
|
|
815
|
-
* @param p8
|
|
816
|
-
*/
|
|
817
|
-
applyForceToCenterOfMass(forceType, pos, component, isDirectionRel, isForceRel, p8) {
|
|
818
|
-
inv('0x31DA7CEC5334DB37', this.handle, forceType, f(pos.x), f(pos.y), f(pos.z), component, isDirectionRel, isForceRel, p8);
|
|
819
|
-
}
|
|
820
|
-
/**
|
|
821
|
-
* Old name: _GET_ENTITY_CAN_BE_DAMAGED
|
|
822
|
-
*
|
|
823
|
-
* @returns
|
|
824
|
-
*/
|
|
825
|
-
getCanBeDamaged() {
|
|
826
|
-
return inv('0x75DF9E73F2F005FD', this.handle);
|
|
827
|
-
}
|
|
828
919
|
/**
|
|
829
920
|
* Seems to return true if entity is burned / scorched
|
|
830
921
|
* *GET_ENTITY**
|
|
@@ -988,164 +1079,119 @@ export class Entity {
|
|
|
988
1079
|
inv('0x18FF3110CF47115D', this.handle, flagId, value);
|
|
989
1080
|
}
|
|
990
1081
|
/**
|
|
991
|
-
* @returns
|
|
992
|
-
*/
|
|
993
|
-
getIsPredator() {
|
|
994
|
-
return inv('0x5594AFE9DE0C01B7', this.handle);
|
|
995
|
-
}
|
|
996
|
-
/**
|
|
997
|
-
* Returns entityType: https://github.com/Halen84/RDR3-Native-Flags-And-Enums/tree/main/eEntityType
|
|
998
|
-
*
|
|
999
|
-
* @returns
|
|
1000
|
-
*/
|
|
1001
|
-
getType() {
|
|
1002
|
-
return inv('0x97F696ACA466B4E0', this.handle, rai());
|
|
1003
|
-
}
|
|
1004
|
-
/**
|
|
1005
|
-
* @returns
|
|
1006
|
-
*/
|
|
1007
|
-
isOwnedByPersistenceSystem() {
|
|
1008
|
-
return inv('0xA7E51B53309EAC97', this.handle);
|
|
1009
|
-
}
|
|
1010
|
-
/**
|
|
1011
|
-
* @param animDict
|
|
1012
|
-
* @param animName
|
|
1013
|
-
* @param animType
|
|
1014
|
-
* @returns
|
|
1015
|
-
*/
|
|
1016
|
-
isPlayingAnim(animDict, animName, animType) {
|
|
1017
|
-
return inv('0xDEE49D5CA6C49148', this.handle, animDict, animName, animType, rai());
|
|
1018
|
-
}
|
|
1019
|
-
/**
|
|
1020
|
-
* Marks the specified entity (ped, vehicle or object) as no longer needed, allowing the game engine to delete it whenever it sees fit.
|
|
1021
|
-
*/
|
|
1022
|
-
setAsNoLongerNeeded() {
|
|
1023
|
-
inv('0x4971D2F8162B9674', this.handle);
|
|
1024
|
-
}
|
|
1025
|
-
/**
|
|
1026
|
-
* @returns
|
|
1027
|
-
*/
|
|
1028
|
-
hasBeenDamagedByAnyVehicle() {
|
|
1029
|
-
return inv('0x695D7C26DE65C423', this.handle, rai());
|
|
1030
|
-
}
|
|
1031
|
-
/**
|
|
1032
|
-
* @param animDict
|
|
1033
|
-
* @param animName
|
|
1034
|
-
* @param speedMultiplier
|
|
1035
|
-
*/
|
|
1036
|
-
setAnimSpeed(animDict, animName, speedMultiplier) {
|
|
1037
|
-
inv('0xEAA885BA3CEA4E4A', this.handle, animDict, animName, f(speedMultiplier));
|
|
1038
|
-
}
|
|
1039
|
-
unpinMapEntity() {
|
|
1040
|
-
inv('0xD2B9C78537ED5759', this.handle);
|
|
1041
|
-
}
|
|
1042
|
-
/**
|
|
1043
|
-
* Get how much of the entity is submerged. 1.0f is whole entity.
|
|
1044
|
-
*
|
|
1045
|
-
* @returns
|
|
1046
|
-
*/
|
|
1047
|
-
getSubmergedLevel() {
|
|
1048
|
-
return inv('0x4A77C3F73FD9E831', this.handle, raf());
|
|
1049
|
-
}
|
|
1050
|
-
/**
|
|
1051
|
-
* @returns
|
|
1052
|
-
*/
|
|
1053
|
-
isAttached() {
|
|
1054
|
-
return inv('0xEE6AD63ABF59C0B7', this.handle, rai());
|
|
1055
|
-
}
|
|
1056
|
-
/**
|
|
1057
|
-
* SET_ENTITY_A*
|
|
1058
|
-
*
|
|
1059
|
-
* @param p1
|
|
1060
|
-
*/
|
|
1061
|
-
N_0xC0EDEF16D90661EE(p1) {
|
|
1062
|
-
inv('0xC0EDEF16D90661EE', this.handle, f(p1));
|
|
1063
|
-
}
|
|
1064
|
-
/**
|
|
1065
|
-
* @param looted
|
|
1082
|
+
* @returns
|
|
1066
1083
|
*/
|
|
1067
|
-
|
|
1068
|
-
inv('
|
|
1084
|
+
getIsPredator() {
|
|
1085
|
+
return inv('0x5594AFE9DE0C01B7', this.handle);
|
|
1069
1086
|
}
|
|
1070
1087
|
/**
|
|
1088
|
+
* enum eCarriableState
|
|
1089
|
+
* {
|
|
1090
|
+
* CARRIABLE_STATE_NONE,
|
|
1091
|
+
* CARRIABLE_STATE_TRANSITIONING_TO_HOGTIED,
|
|
1092
|
+
* CARRIABLE_STATE_CARRIABLE_INTRO,
|
|
1093
|
+
* CARRIABLE_STATE_CARRIABLE,
|
|
1094
|
+
* CARRIABLE_STATE_BEING_PICKED_UP_FROM_GROUND,
|
|
1095
|
+
* CARRIABLE_STATE_CARRIED_BY_HUMAN,
|
|
1096
|
+
* CARRIABLE_STATE_BEING_PLACED_ON_GROUND,
|
|
1097
|
+
* CARRIABLE_STATE_CARRIED_BY_MOUNT,
|
|
1098
|
+
* CARRIABLE_STATE_BEING_PLACED_ON_MOUNT,
|
|
1099
|
+
* CARRIABLE_STATE_BEING_PICKED_UP_FROM_MOUNT,
|
|
1100
|
+
* CARRIABLE_STATE_BEING_CUT_FREE,
|
|
1101
|
+
* CARRIABLE_STATE_BEING_PLACED_ON_GROUND_ESCAPE,
|
|
1102
|
+
* CARRIABLE_STATE_BEING_PLACED_IN_VEHICLE
|
|
1103
|
+
* };
|
|
1104
|
+
*
|
|
1071
1105
|
* @returns
|
|
1072
1106
|
*/
|
|
1073
|
-
|
|
1074
|
-
return inv('
|
|
1107
|
+
getCarriableState() {
|
|
1108
|
+
return inv('0x61914209C36EFDDB', this.handle, rai());
|
|
1075
1109
|
}
|
|
1076
1110
|
/**
|
|
1077
|
-
* @param
|
|
1111
|
+
* @param value
|
|
1078
1112
|
*/
|
|
1079
|
-
|
|
1080
|
-
inv('
|
|
1113
|
+
setMaxHealth(value) {
|
|
1114
|
+
inv('0x166E7CF68597D8B5', this.handle, value);
|
|
1081
1115
|
}
|
|
1082
1116
|
/**
|
|
1083
|
-
*
|
|
1084
|
-
*
|
|
1117
|
+
* Params: p1 (probably animType) = 1, 0
|
|
1118
|
+
*
|
|
1119
|
+
* @param p1
|
|
1120
|
+
* @returns
|
|
1085
1121
|
*/
|
|
1086
|
-
|
|
1087
|
-
inv('
|
|
1122
|
+
isPlayingAnyAnim(p1) {
|
|
1123
|
+
return inv('0x0B7CB1300CBFE19C', this.handle, p1, rai());
|
|
1088
1124
|
}
|
|
1089
1125
|
/**
|
|
1090
|
-
* @param
|
|
1126
|
+
* @param enabled
|
|
1091
1127
|
*/
|
|
1092
|
-
|
|
1093
|
-
inv('
|
|
1128
|
+
setLightsEnabled(enabled) {
|
|
1129
|
+
inv('0xEBDC12861D079ABA', this.handle, enabled);
|
|
1094
1130
|
}
|
|
1095
1131
|
/**
|
|
1096
|
-
*
|
|
1097
|
-
*
|
|
1098
|
-
*
|
|
1132
|
+
* Offset values are relative to the entity. x = left/right
|
|
1133
|
+
* y = forward/backward
|
|
1134
|
+
* z = up/down
|
|
1135
|
+
*
|
|
1136
|
+
* @param offset
|
|
1099
1137
|
* @returns
|
|
1100
1138
|
*/
|
|
1101
|
-
|
|
1102
|
-
return inv('
|
|
1139
|
+
getOffsetFromInWorldCoords(offset) {
|
|
1140
|
+
return Vector3.fromArray(inv('0x1899F328B0E12848', this.handle, f(offset.x), f(offset.y), f(offset.z), rav()));
|
|
1103
1141
|
}
|
|
1104
1142
|
/**
|
|
1105
|
-
*
|
|
1143
|
+
* 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
|
|
1144
|
+
*
|
|
1145
|
+
* @param entity2
|
|
1146
|
+
* @param xSize
|
|
1147
|
+
* @param ySize
|
|
1148
|
+
* @param zSize
|
|
1149
|
+
* @param p5
|
|
1150
|
+
* @param p6
|
|
1151
|
+
* @param p7
|
|
1152
|
+
* @returns
|
|
1106
1153
|
*/
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
return [Vector3.fromArray(result[0]), Vector3.fromArray(result[1]), Vector3.fromArray(result[2]), Vector3.fromArray(result[3])];
|
|
1154
|
+
isAtEntity(entity2, xSize, ySize, zSize, p5, p6, p7) {
|
|
1155
|
+
return inv('0xC057F02B837A27F6', this.handle, entity2.handle, f(xSize), f(ySize), f(zSize), p5, p6, p7, rai());
|
|
1110
1156
|
}
|
|
1111
1157
|
/**
|
|
1112
|
-
*
|
|
1158
|
+
* @param toggle
|
|
1113
1159
|
*/
|
|
1114
|
-
|
|
1115
|
-
inv('
|
|
1160
|
+
setVisible(toggle) {
|
|
1161
|
+
inv('0x1794B4FCC84D812F', this.handle, toggle);
|
|
1116
1162
|
}
|
|
1117
1163
|
/**
|
|
1118
|
-
*
|
|
1119
|
-
*
|
|
1164
|
+
* Old name: _SET_ENTITY_CLEANUP_BY_ENGINE
|
|
1165
|
+
*
|
|
1166
|
+
* @param toggle
|
|
1120
1167
|
*/
|
|
1121
|
-
|
|
1122
|
-
|
|
1168
|
+
setShouldFreezeWaitingOnCollision(toggle) {
|
|
1169
|
+
inv('0x740CB4F3F602C9F4', this.handle, toggle);
|
|
1123
1170
|
}
|
|
1124
1171
|
/**
|
|
1125
|
-
*
|
|
1126
|
-
*
|
|
1127
|
-
*
|
|
1172
|
+
* Note: this native was removed in 1232 but added back in 1311
|
|
1173
|
+
* Old name: _GET_ENTITY_PROOFS
|
|
1174
|
+
*
|
|
1175
|
+
* @returns
|
|
1128
1176
|
*/
|
|
1129
|
-
|
|
1130
|
-
inv('
|
|
1177
|
+
getProofs() {
|
|
1178
|
+
return inv('0x6CF0DAD7FA1088EA', this.handle, rai());
|
|
1131
1179
|
}
|
|
1132
1180
|
/**
|
|
1133
|
-
*
|
|
1134
|
-
*
|
|
1135
|
-
* `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.
|
|
1181
|
+
* skin - everything alpha except skin
|
|
1182
|
+
* Set entity alpha level. Ranging from 0 to 255 but changes occur after every 20 percent (after every 51).
|
|
1136
1183
|
*
|
|
1137
|
-
* @param
|
|
1138
|
-
* @param
|
|
1139
|
-
* @returns
|
|
1184
|
+
* @param alphaLevel
|
|
1185
|
+
* @param skin
|
|
1140
1186
|
*/
|
|
1141
|
-
|
|
1142
|
-
|
|
1187
|
+
setAlpha(alphaLevel, skin) {
|
|
1188
|
+
inv('0x0DF7692B1D9E7BA7', this.handle, alphaLevel, skin);
|
|
1143
1189
|
}
|
|
1144
1190
|
/**
|
|
1145
1191
|
* @returns
|
|
1146
1192
|
*/
|
|
1147
|
-
|
|
1148
|
-
return inv('
|
|
1193
|
+
getThreatTier() {
|
|
1194
|
+
return inv('0xE12F56CB25D9CE23', this.handle, rai());
|
|
1149
1195
|
}
|
|
1150
1196
|
/**
|
|
1151
1197
|
* Used in Script Function DUELING_DID_PLAYER_DISARM_OPPONENT
|
|
@@ -1228,90 +1274,91 @@ export class Entity {
|
|
|
1228
1274
|
return inv('0x5E58342602E94718', this.handle, f(pos.x), f(pos.y), f(pos.z), f(xSize), f(ySize), f(zSize), p7, p8, p9, rai());
|
|
1229
1275
|
}
|
|
1230
1276
|
/**
|
|
1231
|
-
*
|
|
1232
|
-
*
|
|
1233
|
-
* @param value
|
|
1277
|
+
* @returns
|
|
1234
1278
|
*/
|
|
1235
|
-
|
|
1236
|
-
inv('
|
|
1279
|
+
isUpsidedown() {
|
|
1280
|
+
return inv('0x109DE3DA41AAD94A', this.handle, rai());
|
|
1237
1281
|
}
|
|
1238
1282
|
/**
|
|
1239
|
-
* @param
|
|
1283
|
+
* @param p1
|
|
1284
|
+
* @returns
|
|
1240
1285
|
*/
|
|
1241
|
-
|
|
1242
|
-
inv('
|
|
1286
|
+
doesBelongToThisScript(p1) {
|
|
1287
|
+
return inv('0x622B1980CBE13332', this.handle, p1, rai());
|
|
1243
1288
|
}
|
|
1244
1289
|
/**
|
|
1245
|
-
*
|
|
1290
|
+
* Returns a hash of an entity's name. (Alternative Name: _GET_ENTITY_PROMPT_NAME_HASH)
|
|
1291
|
+
*
|
|
1292
|
+
* @returns
|
|
1246
1293
|
*/
|
|
1247
|
-
|
|
1248
|
-
inv('
|
|
1294
|
+
getCarriableFromEntity() {
|
|
1295
|
+
return (inv('0x31FEF6A20F00B963', this.handle, rai())) & 0xFFFFFFFF;
|
|
1249
1296
|
}
|
|
1250
1297
|
/**
|
|
1251
|
-
* @
|
|
1298
|
+
* @param toggle
|
|
1299
|
+
* @param keepPhysics
|
|
1252
1300
|
*/
|
|
1253
|
-
|
|
1254
|
-
|
|
1301
|
+
setCollision(toggle, keepPhysics) {
|
|
1302
|
+
inv('0xF66F820909453B8C', this.handle, toggle, keepPhysics);
|
|
1255
1303
|
}
|
|
1256
1304
|
/**
|
|
1305
|
+
* @param p1
|
|
1257
1306
|
* @returns
|
|
1258
1307
|
*/
|
|
1259
|
-
|
|
1260
|
-
return inv('
|
|
1308
|
+
placeOnGroundProperly(p1) {
|
|
1309
|
+
return inv('0x9587913B9E772D29', this.handle, p1);
|
|
1261
1310
|
}
|
|
1262
1311
|
/**
|
|
1263
|
-
* @param pos
|
|
1264
|
-
* @param atTop
|
|
1265
|
-
* @param inWorldCoords
|
|
1266
1312
|
* @returns
|
|
1267
1313
|
*/
|
|
1268
|
-
|
|
1269
|
-
return inv('
|
|
1314
|
+
isInWater() {
|
|
1315
|
+
return inv('0xDDE5C125AC446723', this.handle, rai());
|
|
1270
1316
|
}
|
|
1271
1317
|
/**
|
|
1272
|
-
* @
|
|
1273
|
-
* @returns
|
|
1318
|
+
* @returns Returns `true` if the entity exists
|
|
1274
1319
|
*/
|
|
1275
|
-
|
|
1276
|
-
return
|
|
1277
|
-
}
|
|
1278
|
-
addTrackingTrails() {
|
|
1279
|
-
inv('0x1AD922AB5038DEF3', this.handle);
|
|
1320
|
+
doesExist() {
|
|
1321
|
+
return inv('0xD42BD6EB2E0F1677', this.handle, rai());
|
|
1280
1322
|
}
|
|
1281
1323
|
/**
|
|
1282
|
-
* @
|
|
1324
|
+
* @returns
|
|
1283
1325
|
*/
|
|
1284
|
-
|
|
1285
|
-
inv('
|
|
1326
|
+
getAlpha() {
|
|
1327
|
+
return inv('0x1BB501624FAF2BEA', this.handle, rai());
|
|
1286
1328
|
}
|
|
1287
1329
|
/**
|
|
1288
|
-
*
|
|
1330
|
+
* This native only works on `Ped` and `Object` entity types
|
|
1331
|
+
*
|
|
1332
|
+
* @param flagId Refer to [enum: eCarryingFlags]
|
|
1333
|
+
* @returns
|
|
1289
1334
|
*/
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
return [Vector3.fromArray(result[0]), Vector3.fromArray(result[1])];
|
|
1335
|
+
getCarryingFlag(flagId) {
|
|
1336
|
+
return inv('0x808077647856DE62', this.handle, flagId, rai());
|
|
1293
1337
|
}
|
|
1294
1338
|
/**
|
|
1295
1339
|
* @param p1
|
|
1296
|
-
* @returns
|
|
1297
1340
|
*/
|
|
1298
|
-
|
|
1299
|
-
|
|
1341
|
+
forceAiAndAnimationUpdate(p1) {
|
|
1342
|
+
inv('0x4C9E96473D4F1A88', this.handle, p1);
|
|
1300
1343
|
}
|
|
1301
1344
|
/**
|
|
1302
|
-
*
|
|
1303
|
-
*
|
|
1304
|
-
* @param
|
|
1305
|
-
* @
|
|
1345
|
+
* Axis - Invert Axis Flags
|
|
1346
|
+
*
|
|
1347
|
+
* @param pos
|
|
1348
|
+
* @param xAxis
|
|
1349
|
+
* @param yAxis
|
|
1350
|
+
* @param zAxis
|
|
1306
1351
|
*/
|
|
1307
|
-
|
|
1308
|
-
|
|
1352
|
+
setCoordsNoOffset(pos, xAxis, yAxis, zAxis) {
|
|
1353
|
+
inv('0x239A3351AC1DA385', this.handle, f(pos.x), f(pos.y), f(pos.z), xAxis, yAxis, zAxis);
|
|
1309
1354
|
}
|
|
1310
1355
|
/**
|
|
1356
|
+
* Returns (CUR_HEALTH / MAX_HEALTH)
|
|
1357
|
+
*
|
|
1311
1358
|
* @returns
|
|
1312
1359
|
*/
|
|
1313
|
-
|
|
1314
|
-
return inv('
|
|
1360
|
+
getHealthFloat() {
|
|
1361
|
+
return inv('0x96C638784DB4C815', this.handle, raf());
|
|
1315
1362
|
}
|
|
1316
1363
|
/**
|
|
1317
1364
|
* @param entity2
|
|
@@ -1434,47 +1481,5 @@ export class Entity {
|
|
|
1434
1481
|
isUpright(angle) {
|
|
1435
1482
|
return inv('0xF6F6AFD8D4FB2658', this.handle, f(angle), rai());
|
|
1436
1483
|
}
|
|
1437
|
-
/**
|
|
1438
|
-
* Simply returns whatever is passed to it (Regardless of whether the handle is valid or not).
|
|
1439
|
-
*
|
|
1440
|
-
* @returns
|
|
1441
|
-
*/
|
|
1442
|
-
getVehicleIndexFromIndex() {
|
|
1443
|
-
return createFromHandle('Vehicle', inv('0xDF1E5AAC561AFC59', this.handle, rai()));
|
|
1444
|
-
}
|
|
1445
|
-
/**
|
|
1446
|
-
* @returns
|
|
1447
|
-
*/
|
|
1448
|
-
isVisible() {
|
|
1449
|
-
return inv('0xFFC96ECB7FA404CA', this.handle, rai());
|
|
1450
|
-
}
|
|
1451
|
-
/**
|
|
1452
|
-
* SET_ENTITY_LO*
|
|
1453
|
-
*
|
|
1454
|
-
* @param toggle
|
|
1455
|
-
*/
|
|
1456
|
-
N_0xFF9965C47FA404DA(toggle) {
|
|
1457
|
-
inv('0xFF9965C47FA404DA', this.handle, toggle);
|
|
1458
|
-
}
|
|
1459
|
-
/**
|
|
1460
|
-
* Valid indices: 0 - 3
|
|
1461
|
-
* Index 1 always returns a `hogtied` config, doesn't matter the entity.
|
|
1462
|
-
* It's for humans only and the ped must be resurrected first if it's dead.
|
|
1463
|
-
*
|
|
1464
|
-
* @param index
|
|
1465
|
-
* @returns
|
|
1466
|
-
*/
|
|
1467
|
-
getOptimalCarryConfig(index) {
|
|
1468
|
-
return (inv('0x34F008A7E48C496B', this.handle, index, rai())) & 0xFFFFFFFF;
|
|
1469
|
-
}
|
|
1470
|
-
setFadeIn() {
|
|
1471
|
-
inv('0xA91E6CF94404E8C9', this.handle);
|
|
1472
|
-
}
|
|
1473
|
-
/**
|
|
1474
|
-
* @returns
|
|
1475
|
-
*/
|
|
1476
|
-
hasBeenDamagedByAnyPed() {
|
|
1477
|
-
return inv('0x9934E9C42D52D87E', this.handle, rai());
|
|
1478
|
-
}
|
|
1479
1484
|
}
|
|
1480
1485
|
registerHandle('Entity', Entity);
|