@citizenfx/client 2.0.37579-1 → 2.0.37692-1
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/natives_universal.d.ts +254 -0
- package/package.json +1 -1
package/natives_universal.d.ts
CHANGED
|
@@ -4811,6 +4811,72 @@ declare function CreateCheckpoint(_type: number, posX1: number, posY1: number, p
|
|
|
4811
4811
|
*/
|
|
4812
4812
|
declare function CreateCinematicShot(p0: number, p1: number, p2: number, entity: number): void;
|
|
4813
4813
|
|
|
4814
|
+
/**
|
|
4815
|
+
* Creates a 2D circular collision shape at the specified position.
|
|
4816
|
+
* @param x Center X coordinate.
|
|
4817
|
+
* @param y Center Y coordinate.
|
|
4818
|
+
* @param radius Circle radius.
|
|
4819
|
+
* @return The collision shape ID, or -1 on failure.
|
|
4820
|
+
*/
|
|
4821
|
+
declare function CreateColshapeCircle(x: number, y: number, radius: number): number;
|
|
4822
|
+
|
|
4823
|
+
/**
|
|
4824
|
+
* Creates an axis-aligned box collision shape at the specified 3D position.
|
|
4825
|
+
* @param x Center X coordinate.
|
|
4826
|
+
* @param y Center Y coordinate.
|
|
4827
|
+
* @param z Center Z coordinate.
|
|
4828
|
+
* @param width Total width.
|
|
4829
|
+
* @param depth Total depth.
|
|
4830
|
+
* @param height Total height.
|
|
4831
|
+
* @return The collision shape ID, or -1 on failure.
|
|
4832
|
+
*/
|
|
4833
|
+
declare function CreateColshapeCuboid(x: number, y: number, z: number, width: number, depth: number, height: number): number;
|
|
4834
|
+
|
|
4835
|
+
/**
|
|
4836
|
+
* Creates a vertical cylinder collision shape at the specified 3D position.
|
|
4837
|
+
* @param x Center X coordinate.
|
|
4838
|
+
* @param y Center Y coordinate.
|
|
4839
|
+
* @param z Center Z coordinate.
|
|
4840
|
+
* @param radius Cylinder radius.
|
|
4841
|
+
* @param height Total height.
|
|
4842
|
+
* @return The collision shape ID, or -1 on failure.
|
|
4843
|
+
*/
|
|
4844
|
+
declare function CreateColshapeCylinder(x: number, y: number, z: number, radius: number, height: number): number;
|
|
4845
|
+
|
|
4846
|
+
/**
|
|
4847
|
+
* Creates a polygon collision shape defined by a set of 2D points extruded between `minZ` and `maxZ`. Requires at least 3 points.
|
|
4848
|
+
* When an entity enters or leaves a collision shape, the `onColshapeEnter` and `onColshapeExit` events are triggered. Both events are called with the entity handle that triggered them and the collision shape ID.
|
|
4849
|
+
* @param minZ Minimum Z height of the polygon.
|
|
4850
|
+
* @param maxZ Maximum Z height of the polygon.
|
|
4851
|
+
* @param points An array of interleaved x, y point pairs (e.g., `{x1, y1, x2, y2, x3, y3, ...}`). Must contain at least 3 pairs.
|
|
4852
|
+
* @return The collision shape ID, or -1 on failure.
|
|
4853
|
+
*/
|
|
4854
|
+
declare function CreateColshapePolygon(minZ: number, maxZ: number, points: any): number;
|
|
4855
|
+
|
|
4856
|
+
/**
|
|
4857
|
+
* Creates a rotated rectangle collision shape at the specified 3D position.
|
|
4858
|
+
* When an entity enters or leaves a collision shape, the `onColshapeEnter` and `onColshapeExit` events are triggered. Both events are called with the entity handle that triggered them and the collision shape ID.
|
|
4859
|
+
* @param x Center X coordinate.
|
|
4860
|
+
* @param y Center Y coordinate.
|
|
4861
|
+
* @param z Center Z coordinate.
|
|
4862
|
+
* @param width Total width.
|
|
4863
|
+
* @param depth Total depth.
|
|
4864
|
+
* @param heading Rotation heading in radians.
|
|
4865
|
+
* @return The collision shape ID, or -1 on failure.
|
|
4866
|
+
*/
|
|
4867
|
+
declare function CreateColshapeRectangle(x: number, y: number, z: number, width: number, depth: number, heading: number): number;
|
|
4868
|
+
|
|
4869
|
+
/**
|
|
4870
|
+
* Creates a spherical collision shape at the specified 3D position.
|
|
4871
|
+
* When an entity enters or leaves a collision shape, the `onColshapeEnter` and `onColshapeExit` events are triggered. Both events are called with the entity handle that triggered them and the collision shape ID.
|
|
4872
|
+
* @param x Center X coordinate.
|
|
4873
|
+
* @param y Center Y coordinate.
|
|
4874
|
+
* @param z Center Z coordinate.
|
|
4875
|
+
* @param radius Sphere radius.
|
|
4876
|
+
* @return The collision shape ID, or -1 on failure.
|
|
4877
|
+
*/
|
|
4878
|
+
declare function CreateColshapeSphere(x: number, y: number, z: number, radius: number): number;
|
|
4879
|
+
|
|
4814
4880
|
/**
|
|
4815
4881
|
* Creates a volume where water effects do not apply.
|
|
4816
4882
|
* Useful for preventing water collisions from flooding areas underneath them.
|
|
@@ -5996,6 +6062,12 @@ declare function DeleteCheckpoint(checkpoint: number): void;
|
|
|
5996
6062
|
*/
|
|
5997
6063
|
declare function DeleteChildRope(ropeId: number): void;
|
|
5998
6064
|
|
|
6065
|
+
/**
|
|
6066
|
+
* Deletes the collision shape with the given ID.
|
|
6067
|
+
* @param colShapeId The collision shape ID.
|
|
6068
|
+
*/
|
|
6069
|
+
declare function DeleteColshape(colShapeId: number): void;
|
|
6070
|
+
|
|
5999
6071
|
/**
|
|
6000
6072
|
* Delete the specified entity, and invalidate the passed handle (i.e., the in/out argument).
|
|
6001
6073
|
* You might want to check if the entity exists before with [DOES_ENTITY_EXIST](#\_0x7239B21A38F536BA).
|
|
@@ -6779,6 +6851,13 @@ declare function IsCargobobMagnetActive(cargobob: number): boolean;
|
|
|
6779
6851
|
*/
|
|
6780
6852
|
declare function DoesCargobobHavePickupMagnet(cargobob: number): boolean;
|
|
6781
6853
|
|
|
6854
|
+
/**
|
|
6855
|
+
* Returns whether a collision shape with the given ID exists.
|
|
6856
|
+
* @param colShapeId The collision shape ID.
|
|
6857
|
+
* @return Returns true if the collision shape exists, false otherwise.
|
|
6858
|
+
*/
|
|
6859
|
+
declare function DoesColshapeExist(colShapeId: number): boolean;
|
|
6860
|
+
|
|
6782
6861
|
/**
|
|
6783
6862
|
* Checks if the context exists for the ped, searching through the voices in its PedVoiceGroup.
|
|
6784
6863
|
* The final argument can be set to true to allow searching in backup PVGs
|
|
@@ -11038,6 +11117,74 @@ declare function N_0xf12e6cd06c73d69e(): string;
|
|
|
11038
11117
|
*/
|
|
11039
11118
|
declare function GetCollisionNormalOfLastHitForEntity(entity: number): number[];
|
|
11040
11119
|
|
|
11120
|
+
/**
|
|
11121
|
+
* Gets the data of a circle collision shape.
|
|
11122
|
+
* @param colShapeId The collision shape ID.
|
|
11123
|
+
* @param x Center X coordinate output.
|
|
11124
|
+
* @param y Center Y coordinate output.
|
|
11125
|
+
* @param radius Circle radius output.
|
|
11126
|
+
* @return Returns true if the data was retrieved successfully. Returns false if the ID is invalid or the shape is of a different type.
|
|
11127
|
+
*/
|
|
11128
|
+
declare function GetColshapeCircleData(colShapeId: number): [boolean, number, number, number];
|
|
11129
|
+
|
|
11130
|
+
/**
|
|
11131
|
+
* Gets the data of a cuboid collision shape.
|
|
11132
|
+
* @param colShapeId The collision shape ID.
|
|
11133
|
+
* @param x Center X coordinate output.
|
|
11134
|
+
* @param y Center Y coordinate output.
|
|
11135
|
+
* @param z Center Z coordinate output.
|
|
11136
|
+
* @param width Width output.
|
|
11137
|
+
* @param depth Depth output.
|
|
11138
|
+
* @param height Height output.
|
|
11139
|
+
* @return Returns true if the data was retrieved successfully. Returns false if the ID is invalid or the shape is of a different type.
|
|
11140
|
+
*/
|
|
11141
|
+
declare function GetColshapeCuboidData(colShapeId: number): [boolean, number, number, number, number, number, number];
|
|
11142
|
+
|
|
11143
|
+
/**
|
|
11144
|
+
* Gets the data of a cylinder collision shape.
|
|
11145
|
+
* @param colShapeId The collision shape ID.
|
|
11146
|
+
* @param x Center X coordinate output.
|
|
11147
|
+
* @param y Center Y coordinate output.
|
|
11148
|
+
* @param z Center Z coordinate output.
|
|
11149
|
+
* @param radius Cylinder radius output.
|
|
11150
|
+
* @param height Height output.
|
|
11151
|
+
* @return Returns true if the data was retrieved successfully. Returns false if the ID is invalid or the shape is of a different type.
|
|
11152
|
+
*/
|
|
11153
|
+
declare function GetColshapeCylinderData(colShapeId: number): [boolean, number, number, number, number, number];
|
|
11154
|
+
|
|
11155
|
+
/**
|
|
11156
|
+
* Gets the vertical bounds of a polygon collision shape.
|
|
11157
|
+
* @param colShapeId The collision shape ID.
|
|
11158
|
+
* @param minZ Lower Z bound output.
|
|
11159
|
+
* @param maxZ Upper Z bound output.
|
|
11160
|
+
* @return Returns true if the data was retrieved successfully. Returns false if the ID is invalid or the shape is of a different type.
|
|
11161
|
+
*/
|
|
11162
|
+
declare function GetColshapePolygonData(colShapeId: number): [boolean, number, number];
|
|
11163
|
+
|
|
11164
|
+
/**
|
|
11165
|
+
* Gets the data of a rectangle collision shape.
|
|
11166
|
+
* @param colShapeId The collision shape ID.
|
|
11167
|
+
* @param x Center X coordinate output.
|
|
11168
|
+
* @param y Center Y coordinate output.
|
|
11169
|
+
* @param z Center Z coordinate output.
|
|
11170
|
+
* @param width Width output.
|
|
11171
|
+
* @param depth Depth output.
|
|
11172
|
+
* @param heading Heading output in radians.
|
|
11173
|
+
* @return Returns true if the data was retrieved successfully. Returns false if the ID is invalid or the shape is of a different type.
|
|
11174
|
+
*/
|
|
11175
|
+
declare function GetColshapeRectangleData(colShapeId: number): [boolean, number, number, number, number, number, number];
|
|
11176
|
+
|
|
11177
|
+
/**
|
|
11178
|
+
* Gets the data of a sphere collision shape.
|
|
11179
|
+
* @param colShapeId The collision shape ID.
|
|
11180
|
+
* @param x Center X coordinate output.
|
|
11181
|
+
* @param y Center Y coordinate output.
|
|
11182
|
+
* @param z Center Z coordinate output.
|
|
11183
|
+
* @param radius Sphere radius output.
|
|
11184
|
+
* @return Returns true if the data was retrieved successfully. Returns false if the ID is invalid or the shape is of a different type.
|
|
11185
|
+
*/
|
|
11186
|
+
declare function GetColshapeSphereData(colShapeId: number): [boolean, number, number, number, number];
|
|
11187
|
+
|
|
11041
11188
|
/**
|
|
11042
11189
|
* p0: Ped Handle
|
|
11043
11190
|
* p1: int i | 0 <= i <= 27
|
|
@@ -22509,6 +22656,56 @@ declare function N_0xeea5ac2eda7c33e8(x: number, y: number, z: number): boolean;
|
|
|
22509
22656
|
*/
|
|
22510
22657
|
declare function AreCoordsCollidingWithExterior(x: number, y: number, z: number): boolean;
|
|
22511
22658
|
|
|
22659
|
+
/**
|
|
22660
|
+
* Returns whether the collision shape with the given ID is a circle.
|
|
22661
|
+
* @param colShapeId The collision shape ID.
|
|
22662
|
+
* @return Returns true if the collision shape exists and is a circle, false otherwise.
|
|
22663
|
+
*/
|
|
22664
|
+
declare function IsColshapeCircle(colShapeId: number): boolean;
|
|
22665
|
+
|
|
22666
|
+
/**
|
|
22667
|
+
* Returns whether the collision shape with the given ID is a cuboid.
|
|
22668
|
+
* @param colShapeId The collision shape ID.
|
|
22669
|
+
* @return Returns true if the collision shape exists and is a cuboid, false otherwise.
|
|
22670
|
+
*/
|
|
22671
|
+
declare function IsColshapeCuboid(colShapeId: number): boolean;
|
|
22672
|
+
|
|
22673
|
+
/**
|
|
22674
|
+
* Returns whether the collision shape with the given ID is a cylinder.
|
|
22675
|
+
* @param colShapeId The collision shape ID.
|
|
22676
|
+
* @return Returns true if the collision shape exists and is a cylinder, false otherwise.
|
|
22677
|
+
*/
|
|
22678
|
+
declare function IsColshapeCylinder(colShapeId: number): boolean;
|
|
22679
|
+
|
|
22680
|
+
/**
|
|
22681
|
+
* Returns whether the collision shape is set to detect the given entity type. Every type is enabled by default; a type reads as disabled only after `SET_COLSHAPE_ENTITY_TYPE(colShapeId, entityType, false)`.
|
|
22682
|
+
* @param colShapeId The collision shape ID.
|
|
22683
|
+
* @param entityType The sync (network) entity type index (e.g. GTA5: automobile `0`, object `5`, ped `6`, player `11`). See `SET_COLSHAPE_ENTITY_TYPE` for the full per-game tables.
|
|
22684
|
+
* @return Returns true if the entity type is detected by the collision shape, false otherwise.
|
|
22685
|
+
*/
|
|
22686
|
+
declare function IsColshapeEntityTypeSet(colShapeId: number, entityType: number): boolean;
|
|
22687
|
+
|
|
22688
|
+
/**
|
|
22689
|
+
* Returns whether the collision shape with the given ID is a polygon.
|
|
22690
|
+
* @param colShapeId The collision shape ID.
|
|
22691
|
+
* @return Returns true if the collision shape exists and is a polygon, false otherwise.
|
|
22692
|
+
*/
|
|
22693
|
+
declare function IsColshapePolygon(colShapeId: number): boolean;
|
|
22694
|
+
|
|
22695
|
+
/**
|
|
22696
|
+
* Returns whether the collision shape with the given ID is a rectangle.
|
|
22697
|
+
* @param colShapeId The collision shape ID.
|
|
22698
|
+
* @return Returns true if the collision shape exists and is a rectangle, false otherwise.
|
|
22699
|
+
*/
|
|
22700
|
+
declare function IsColshapeRectangle(colShapeId: number): boolean;
|
|
22701
|
+
|
|
22702
|
+
/**
|
|
22703
|
+
* Returns whether the collision shape with the given ID is a sphere.
|
|
22704
|
+
* @param colShapeId The collision shape ID.
|
|
22705
|
+
* @return Returns true if the collision shape exists and is a sphere, false otherwise.
|
|
22706
|
+
*/
|
|
22707
|
+
declare function IsColshapeSphere(colShapeId: number): boolean;
|
|
22708
|
+
|
|
22512
22709
|
/**
|
|
22513
22710
|
* Returns true if command line option '-benchmark' is set.
|
|
22514
22711
|
*/
|
|
@@ -24795,6 +24992,16 @@ declare function IsPlaylistUnk(tvChannel: number, p1: number): boolean;
|
|
|
24795
24992
|
*/
|
|
24796
24993
|
declare function IsPointInAngledArea(xPos: number, yPos: number, zPos: number, x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, width: number, p10: boolean, includez: boolean): boolean;
|
|
24797
24994
|
|
|
24995
|
+
/**
|
|
24996
|
+
* Returns whether the given 3D point is inside the collision shape.
|
|
24997
|
+
* @param colShapeId The collision shape ID.
|
|
24998
|
+
* @param x Point X coordinate.
|
|
24999
|
+
* @param y Point Y coordinate.
|
|
25000
|
+
* @param z Point Z coordinate.
|
|
25001
|
+
* @return Returns true if the point is inside the collision shape, false otherwise.
|
|
25002
|
+
*/
|
|
25003
|
+
declare function IsPointInsideColshape(colShapeId: number, x: number, y: number, z: number): boolean;
|
|
25004
|
+
|
|
24798
25005
|
/**
|
|
24799
25006
|
* IS_POINT_OBSCURED_BY_A_MISSION_ENTITY
|
|
24800
25007
|
*/
|
|
@@ -45774,6 +45981,53 @@ declare function N_0x39bbf623fc803eac(hudColor: number): void;
|
|
|
45774
45981
|
*/
|
|
45775
45982
|
declare function SetNotificationColorNext(hudColor: number): void;
|
|
45776
45983
|
|
|
45984
|
+
/**
|
|
45985
|
+
* Sets whether the collision shape should detect a specific entity type.
|
|
45986
|
+
* By default every entity type is enabled, so a fresh collision shape detects all entities. Setting a type to `false` excludes only that type from detection; every other type stays as it was. To detect a single type (e.g. automobiles only) disable every other type.
|
|
45987
|
+
* The entity type is the sync (network) entity type index (tables below), not the `GET_ENTITY_TYPE` classification.
|
|
45988
|
+
* ### GTA5 sync entity types
|
|
45989
|
+
* | Index | Type |
|
|
45990
|
+
* | --- | --- |
|
|
45991
|
+
* | 0 | automobile |
|
|
45992
|
+
* | 1 | bike |
|
|
45993
|
+
* | 2 | boat |
|
|
45994
|
+
* | 3 | door |
|
|
45995
|
+
* | 4 | heli |
|
|
45996
|
+
* | 5 | object |
|
|
45997
|
+
* | 6 | ped |
|
|
45998
|
+
* | 7 | pickup |
|
|
45999
|
+
* | 8 | pickup placement |
|
|
46000
|
+
* | 9 | plane |
|
|
46001
|
+
* | 10 | submarine |
|
|
46002
|
+
* | 11 | player |
|
|
46003
|
+
* | 12 | trailer |
|
|
46004
|
+
* | 13 | train |
|
|
46005
|
+
* ### RedM sync entity types
|
|
46006
|
+
* | Index | Type |
|
|
46007
|
+
* | --- | --- |
|
|
46008
|
+
* | 0 | animal |
|
|
46009
|
+
* | 1 | automobile |
|
|
46010
|
+
* | 2 | bike |
|
|
46011
|
+
* | 3 | boat |
|
|
46012
|
+
* | 4 | door |
|
|
46013
|
+
* | 5 | heli |
|
|
46014
|
+
* | 6 | object |
|
|
46015
|
+
* | 7 | ped |
|
|
46016
|
+
* | 8 | pickup |
|
|
46017
|
+
* | 9 | pickup placement |
|
|
46018
|
+
* | 10 | plane |
|
|
46019
|
+
* | 11 | submarine |
|
|
46020
|
+
* | 12 | player |
|
|
46021
|
+
* | 13 | trailer |
|
|
46022
|
+
* | 14 | train |
|
|
46023
|
+
* | 15 | draft vehicle |
|
|
46024
|
+
* | 21 | horse |
|
|
46025
|
+
* @param colShapeId The collision shape ID.
|
|
46026
|
+
* @param entityType The sync entity type index (see the tables above).
|
|
46027
|
+
* @param value `true` to include this entity type in detection, `false` to exclude it.
|
|
46028
|
+
*/
|
|
46029
|
+
declare function SetColshapeEntityType(colShapeId: number, entityType: number, value: boolean): void;
|
|
46030
|
+
|
|
45777
46031
|
/**
|
|
45778
46032
|
* SET_COMBAT_FLOAT
|
|
45779
46033
|
* @param combatType A value between 0-14, See [`GET_COMBAT_FLOAT`](#\_0x52DFF8A10508090A) for a list of possible parameters.
|