@citizenfx/server 2.0.7998-1 → 2.0.8040-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_server.d.ts +62 -8
- package/package.json +1 -1
package/natives_server.d.ts
CHANGED
|
@@ -2557,11 +2557,10 @@ declare function SetPlayerControl(player: string, bHasControl: boolean, flags: n
|
|
|
2557
2557
|
declare function SetPlayerCullingRadius(playerSrc: string, radius: number): void;
|
|
2558
2558
|
|
|
2559
2559
|
/**
|
|
2560
|
-
*
|
|
2561
|
-
*
|
|
2562
|
-
* *(DWORD *)(playerPedAddress + 0x188) |= (1 << 9);
|
|
2560
|
+
* Make the player impervious to all forms of damage.
|
|
2561
|
+
* @param player The player index.
|
|
2563
2562
|
*/
|
|
2564
|
-
declare function SetPlayerInvincible(player: string,
|
|
2563
|
+
declare function SetPlayerInvincible(player: string, bInvincible: boolean): void;
|
|
2565
2564
|
|
|
2566
2565
|
/**
|
|
2567
2566
|
* Set the model for a specific Player. Note that this will destroy the current Ped for the Player and create a new one, any reference to the old ped will be invalid after calling this.
|
|
@@ -2793,10 +2792,65 @@ declare function TaskEveryoneLeaveVehicle(vehicle: number): void;
|
|
|
2793
2792
|
declare function TaskGoStraightToCoord(ped: number, x: number, y: number, z: number, speed: number, timeout: number, targetHeading: number, distanceToSlide: number): void;
|
|
2794
2793
|
|
|
2795
2794
|
/**
|
|
2796
|
-
*
|
|
2797
|
-
*
|
|
2798
|
-
|
|
2799
|
-
|
|
2795
|
+
* Tells a ped to go to a coord by any means.
|
|
2796
|
+
* ```cpp
|
|
2797
|
+
* enum eDrivingMode {
|
|
2798
|
+
* DF_StopForCars = 1,
|
|
2799
|
+
* DF_StopForPeds = 2,
|
|
2800
|
+
* DF_SwerveAroundAllCars = 4,
|
|
2801
|
+
* DF_SteerAroundStationaryCars = 8,
|
|
2802
|
+
* DF_SteerAroundPeds = 16,
|
|
2803
|
+
* DF_SteerAroundObjects = 32,
|
|
2804
|
+
* DF_DontSteerAroundPlayerPed = 64,
|
|
2805
|
+
* DF_StopAtLights = 128,
|
|
2806
|
+
* DF_GoOffRoadWhenAvoiding = 256,
|
|
2807
|
+
* DF_DriveIntoOncomingTraffic = 512,
|
|
2808
|
+
* DF_DriveInReverse = 1024,
|
|
2809
|
+
* // If pathfinding fails, cruise randomly instead of going on a straight line
|
|
2810
|
+
* DF_UseWanderFallbackInsteadOfStraightLine = 2048,
|
|
2811
|
+
* DF_AvoidRestrictedAreas = 4096,
|
|
2812
|
+
* // These only work on MISSION_CRUISE
|
|
2813
|
+
* DF_PreventBackgroundPathfinding = 8192,
|
|
2814
|
+
* DF_AdjustCruiseSpeedBasedOnRoadSpeed = 16384,
|
|
2815
|
+
* DF_UseShortCutLinks = 262144,
|
|
2816
|
+
* DF_ChangeLanesAroundObstructions = 524288,
|
|
2817
|
+
* DF_UseSwitchedOffNodes = 2097152, // cruise tasks ignore this anyway--only used for goto's
|
|
2818
|
+
* DF_PreferNavmeshRoute = 4194304, // if you're going to be primarily driving off road
|
|
2819
|
+
* // Only works for planes using MISSION_GOTO, will cause them to drive along the ground instead of fly
|
|
2820
|
+
* DF_PlaneTaxiMode = 8388608,
|
|
2821
|
+
* DF_ForceStraightLine = 16777216,
|
|
2822
|
+
* DF_UseStringPullingAtJunctions = 33554432,
|
|
2823
|
+
* DF_AvoidHighways = 536870912,
|
|
2824
|
+
* DF_ForceJoinInRoadDirection = 1073741824,
|
|
2825
|
+
* // Standard driving mode. stops for cars, peds, and lights, goes around stationary obstructions
|
|
2826
|
+
* DRIVINGMODE_STOPFORCARS = 786603, // DF_StopForCars|DF_StopForPeds|DF_SteerAroundObjects|DF_SteerAroundStationaryCars|DF_StopAtLights|DF_UseShortCutLinks|DF_ChangeLanesAroundObstructions, // Obey lights too
|
|
2827
|
+
* // Like the above, but doesn't steer around anything in its way - will only wait instead.
|
|
2828
|
+
* DRIVINGMODE_STOPFORCARS_STRICT = 262275, // DF_StopForCars|DF_StopForPeds|DF_StopAtLights|DF_UseShortCutLinks, // Doesn't deviate an inch.
|
|
2829
|
+
* // Default "alerted" driving mode. drives around everything, doesn't obey lights
|
|
2830
|
+
* DRIVINGMODE_AVOIDCARS = 786469, // DF_SwerveAroundAllCars|DF_SteerAroundObjects|DF_UseShortCutLinks|DF_ChangeLanesAroundObstructions|DF_StopForCars,
|
|
2831
|
+
* // Very erratic driving. difference between this and AvoidCars is that it doesn't use the brakes at ALL to help with steering
|
|
2832
|
+
* DRIVINGMODE_AVOIDCARS_RECKLESS = 786468, // DF_SwerveAroundAllCars|DF_SteerAroundObjects|DF_UseShortCutLinks|DF_ChangeLanesAroundObstructions,
|
|
2833
|
+
* // Smashes through everything
|
|
2834
|
+
* DRIVINGMODE_PLOUGHTHROUGH = 262144, // DF_UseShortCutLinks
|
|
2835
|
+
* // Drives normally except for the fact that it ignores lights
|
|
2836
|
+
* DRIVINGMODE_STOPFORCARS_IGNORELIGHTS = 786475, // DF_StopForCars|DF_SteerAroundStationaryCars|DF_StopForPeds|DF_SteerAroundObjects|DF_UseShortCutLinks|DF_ChangeLanesAroundObstructions
|
|
2837
|
+
* // Try to swerve around everything, but stop for lights if necessary
|
|
2838
|
+
* DRIVINGMODE_AVOIDCARS_OBEYLIGHTS = 786597, // DF_SwerveAroundAllCars|DF_StopAtLights|DF_SteerAroundObjects|DF_UseShortCutLinks|DF_ChangeLanesAroundObstructions|DF_StopForCars
|
|
2839
|
+
* // Swerve around cars, be careful around peds, and stop for lights
|
|
2840
|
+
* DRIVINGMODE_AVOIDCARS_STOPFORPEDS_OBEYLIGHTS = 786599 // DF_SwerveAroundAllCars|DF_StopAtLights|DF_StopForPeds|DF_SteerAroundObjects|DF_UseShortCutLinks|DF_ChangeLanesAroundObstructions|DF_StopForCars
|
|
2841
|
+
* };
|
|
2842
|
+
* ```
|
|
2843
|
+
* @param ped The `Ped` Handle.
|
|
2844
|
+
* @param x The goto target coordinate.
|
|
2845
|
+
* @param y The goto target coordinate.
|
|
2846
|
+
* @param z The goto target coordinate.
|
|
2847
|
+
* @param fMoveBlendRatio 0.0 = still, 1.0 = walk, 2.0 = run, 3.0 = sprint.
|
|
2848
|
+
* @param vehicle If defined, the pedestrian will only move if said vehicle exists. If you don't want any sort of association, just set it to `0`.
|
|
2849
|
+
* @param bUseLongRangeVehiclePathing Setting to `true` tells the vehicle to use longrange vehicle pathing.
|
|
2850
|
+
* @param drivingFlags See `eDrivingMode` enum.
|
|
2851
|
+
* @param fMaxRangeToShootTargets Determines the maximum distance at which the `Ped` will engage in combat with threatening targets.
|
|
2852
|
+
*/
|
|
2853
|
+
declare function TaskGoToCoordAnyMeans(ped: number, x: number, y: number, z: number, fMoveBlendRatio: number, vehicle: number, bUseLongRangeVehiclePathing: boolean, drivingFlags: number, fMaxRangeToShootTargets: number): void;
|
|
2800
2854
|
|
|
2801
2855
|
/**
|
|
2802
2856
|
* The entity will move towards the target until time is over (duration) or get in target's range (distance). p5 and p6 are unknown, but you could leave p5 = 1073741824 or 100 or even 0 (didn't see any difference but on the decompiled scripts, they use 1073741824 mostly) and p6 = 0
|