@citizenfx/client 2.0.12949-1 → 2.0.12966-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.
@@ -10708,6 +10708,14 @@ declare function GetClosestPed(x: number, y: number, z: number, radius: number,
10708
10708
  */
10709
10709
  declare function GetClosestRoad(x: number, y: number, z: number, minimumEdgeLength: number, minimumLaneCount: number, onlyMajorRoads: boolean): [boolean, number[], number[], number, number, number];
10710
10710
 
10711
+ /**
10712
+ * Get all track nodes and their track ids within the radius of the specified coordinates.
10713
+ * @param position Get track nodes at position
10714
+ * @param radius Get track nodes within radius
10715
+ * @return Returns a list of tracks and node entries: a trackNode and a trackIdThe data returned adheres to the following layout: [{trackNode1, trackId1}, ..., {trackNodeN, trackIdN}]
10716
+ */
10717
+ declare function GetClosestTrackNodes(radius: number): any;
10718
+
10711
10719
  /**
10712
10720
  * Example usage
10713
10721
  * VEHICLE::GET_CLOSEST_VEHICLE(x, y, z, radius, hash, unknown leave at 70)
@@ -15340,24 +15348,24 @@ declare function GetPedEventData(ped: number, eventType: number, outData?: numbe
15340
15348
  declare function GetPedExtractedDisplacement(ped: number, worldSpace: boolean): number[];
15341
15349
 
15342
15350
  /**
15343
- * A getter for [\_SET_PED_EYE_COLOR](#\_0x50B56988B170AFDF). Returns -1 if fails to get.
15351
+ * A getter for [`_SET_PED_EYE_COLOR`](#\_0x50B56988B170AFDF).
15344
15352
  * @param ped The target ped
15345
15353
  * @return Returns ped's eye colour, or -1 if fails to get.
15346
15354
  */
15347
15355
  declare function GetPedEyeColor(ped: number): number;
15348
-
15349
15356
  /**
15350
15357
  * A getter for [`_SET_PED_EYE_COLOR`](#\_0x50B56988B170AFDF).
15351
15358
  * @param ped The target ped
15352
15359
  * @return Returns ped's eye colour, or -1 if fails to get.
15353
15360
  */
15354
- declare function GetPedEyeColor(ped: number): number;
15361
+ declare function N_0x76bba2cee66d47e9(ped: number): number;
15362
+
15355
15363
  /**
15356
- * A getter for [`_SET_PED_EYE_COLOR`](#\_0x50B56988B170AFDF).
15364
+ * A getter for [\_SET_PED_EYE_COLOR](#\_0x50B56988B170AFDF). Returns -1 if fails to get.
15357
15365
  * @param ped The target ped
15358
15366
  * @return Returns ped's eye colour, or -1 if fails to get.
15359
15367
  */
15360
- declare function N_0x76bba2cee66d47e9(ped: number): number;
15368
+ declare function GetPedEyeColor(ped: number): number;
15361
15369
 
15362
15370
  /**
15363
15371
  * A getter for [\_SET_PED_FACE_FEATURE](#\_0x71A5C1DBA060049E). Returns 0.0 if fails to get.
@@ -17979,6 +17987,22 @@ declare function GetTrackBrakingDistance(track: number): number;
17979
17987
  */
17980
17988
  declare function GetTrackMaxSpeed(track: number): number;
17981
17989
 
17990
+ /**
17991
+ * Gets the coordinates of a specific track node.
17992
+ * @param trackIndex The track index
17993
+ * @param trackNode The track node
17994
+ * @param coords The resulting track node coords
17995
+ * @return Returns if it succeeds in getting coords or not
17996
+ */
17997
+ declare function GetTrackNodeCoords(trackIndex: number, trackNode: number): [boolean, number[]];
17998
+
17999
+ /**
18000
+ * Gets the specified tracks node count.
18001
+ * @param trackIndex The track index
18002
+ * @return The amount of track nodes on the specified track
18003
+ */
18004
+ declare function GetTrackNodeCount(trackIndex: number): number;
18005
+
17982
18006
  /**
17983
18007
  * Corrected p1. it's basically the 'carriage/trailer number'. So if the train has 3 trailers you'd call the native once with a var or 3 times with 1, 2, 3.
17984
18008
  */
@@ -40800,6 +40824,17 @@ declare function RegisterTextLabelToSave_2(name: string): number;
40800
40824
  */
40801
40825
  declare function N_0x6f7794f28c6b2535(name: string): number;
40802
40826
 
40827
+ /**
40828
+ * Registers a track junction that when enabled will cause a train on the defined trackIndex, node and direction to change its current track index and begin traveling on the new node
40829
+ * @param trackIndex The track index a train should be on
40830
+ * @param trackNode The node a train should be on
40831
+ * @param newIndex The new track index for a train to be placed on
40832
+ * @param newNode The new track node for a train to be placed on
40833
+ * @param direction The direction a train should be traveling for this junction
40834
+ * @return The track junction's handle or -1 if invalid.
40835
+ */
40836
+ declare function RegisterTrackJunction(trackIndex: number, trackNode: number, newIndex: number, newNode: number, direction: boolean): number;
40837
+
40803
40838
  /**
40804
40839
  * REGISTER_WORLD_POINT_SCRIPT_BRAIN
40805
40840
  */
@@ -41436,6 +41471,13 @@ declare function RemoveTimecycleModifier(modifierName: string): void;
41436
41471
  */
41437
41472
  declare function RemoveTimecycleModifierVar(modifierName: string, varName: string): void;
41438
41473
 
41474
+ /**
41475
+ * Removes the specified track junction.
41476
+ * @param junctionIndex The junctions index
41477
+ * @return Returns if it succeeds in removing a junction or not
41478
+ */
41479
+ declare function RemoveTrackJunction(junctionIndex: number): boolean;
41480
+
41439
41481
  /**
41440
41482
  * REMOVE_VEHICLE_ASSET
41441
41483
  */
@@ -54298,6 +54340,14 @@ declare function SetTrackBrakingDistance(track: number, brakingDistance: number)
54298
54340
  */
54299
54341
  declare function SetTrackEnabled(track: number, enabled: boolean): void;
54300
54342
 
54343
+ /**
54344
+ * Sets the state of a track junction.
54345
+ * @param junctionIndex The junctions index
54346
+ * @param state Toggles the state of the junction
54347
+ * @return Returns if it succeeds setting the junctions state or not
54348
+ */
54349
+ declare function SetTrackJunctionActive(junctionIndex: number, state: boolean): boolean;
54350
+
54301
54351
  /**
54302
54352
  * Sets the max speed for the train tracks. Used by ambient trains and for station calculations
54303
54353
  * @param track The track id (between 0 - 27)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@citizenfx/client",
3
- "version": "2.0.12949-1",
3
+ "version": "2.0.12966-1",
4
4
  "description": "Typings for the CitizenFX client JS API.",
5
5
  "main": "index.js",
6
6
  "scripts": {