@citizenfx/server 2.0.9481-1 → 2.0.9517-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 +159 -2
- package/package.json +1 -1
package/natives_server.d.ts
CHANGED
|
@@ -697,6 +697,41 @@ declare function GetGameTimer(): number;
|
|
|
697
697
|
*/
|
|
698
698
|
declare function GetHashKey(model: string): number;
|
|
699
699
|
|
|
700
|
+
/**
|
|
701
|
+
* **Note** This native will always return `1000.0` unless [SET_VEHICLE_BODY_HEALTH](#\_0xB77D05AC8C78AADB), [SET_VEHICLE_ENGINE_HEALTH](#\_0x45F6D8EEF34ABEF1), or [SET_VEHICLE_PETROL_TANK_HEALTH](#\_0x70DB57649FA8D0D8) have been called with a value greater than `1000.0`.
|
|
702
|
+
* @param heli The helicopter to check
|
|
703
|
+
* @return Returns the current health of the helicopter's body.
|
|
704
|
+
*/
|
|
705
|
+
declare function GetHeliBodyHealth(heli: number): number;
|
|
706
|
+
|
|
707
|
+
/**
|
|
708
|
+
* This is a getter for [SET_DISABLE_HELI_EXPLODE_FROM_BODY_DAMAGE](#\_0xEDBC8405B3895CC9)
|
|
709
|
+
* @param heli The helicopter to check
|
|
710
|
+
* @return Returns `true` if the helicopter is set to be protected from exploding due to minor body damage, `false` otherwise.
|
|
711
|
+
*/
|
|
712
|
+
declare function GetHeliDisableExplodeFromBodyDamage(heli: number): boolean;
|
|
713
|
+
|
|
714
|
+
/**
|
|
715
|
+
* **Note** This native will always return `1000.0` unless [SET_VEHICLE_BODY_HEALTH](#\_0xB77D05AC8C78AADB), [SET_VEHICLE_ENGINE_HEALTH](#\_0x45F6D8EEF34ABEF1), or [SET_VEHICLE_PETROL_TANK_HEALTH](#\_0x70DB57649FA8D0D8) have been called with a value greater than `1000.0`.
|
|
716
|
+
* @param heli The helicopter to check
|
|
717
|
+
* @return Returns the current health of the helicopter's engine.
|
|
718
|
+
*/
|
|
719
|
+
declare function GetHeliEngineHealth(heli: number): number;
|
|
720
|
+
|
|
721
|
+
/**
|
|
722
|
+
* **Note** This native will always return `1000.0` unless [SET_VEHICLE_BODY_HEALTH](#\_0xB77D05AC8C78AADB), [SET_VEHICLE_ENGINE_HEALTH](#\_0x45F6D8EEF34ABEF1), or [SET_VEHICLE_PETROL_TANK_HEALTH](#\_0x70DB57649FA8D0D8) have been called with a value greater than `1000.0`.
|
|
723
|
+
* @param heli The helicopter to check
|
|
724
|
+
* @return Returns the current health of the helicopter's gas tank.
|
|
725
|
+
*/
|
|
726
|
+
declare function GetHeliGasTankHealth(heli: number): number;
|
|
727
|
+
|
|
728
|
+
/**
|
|
729
|
+
* GET_HELI_MAIN_ROTOR_DAMAGE_SCALE
|
|
730
|
+
* @param heli The helicopter to check
|
|
731
|
+
* @return Returns a value representing the damage scaling factor applied to the helicopter's main rotor. The value ranges from `0.0` (no damage scaling) to` 1.0 ` (full damage scaling).
|
|
732
|
+
*/
|
|
733
|
+
declare function GetHeliMainRotorDamageScale(heli: number): number;
|
|
734
|
+
|
|
700
735
|
/**
|
|
701
736
|
* GET_HELI_MAIN_ROTOR_HEALTH
|
|
702
737
|
* @param vehicle The target vehicle.
|
|
@@ -705,12 +740,61 @@ declare function GetHashKey(model: string): number;
|
|
|
705
740
|
declare function GetHeliMainRotorHealth(vehicle: number): number;
|
|
706
741
|
|
|
707
742
|
/**
|
|
708
|
-
*
|
|
743
|
+
* GET_HELI_PITCH_CONTROL
|
|
744
|
+
* @param heli The helicopter to check.
|
|
745
|
+
* @return Returns a value representing the pitch control of the helicopter. The values range from `-1.0` (nose down) to `1.0` (nose up), with `0.0` indicating no pitch input.
|
|
746
|
+
*/
|
|
747
|
+
declare function GetHeliPitchControl(heli: number): number;
|
|
748
|
+
|
|
749
|
+
/**
|
|
750
|
+
* GET_HELI_REAR_ROTOR_DAMAGE_SCALE
|
|
751
|
+
* @param heli The helicopter to check
|
|
752
|
+
* @return Returns a value representing the damage scaling factor applied to the helicopter's rear rotor. The value ranges from `0.0` (no damage scaling) to` 1.0 ` (full damage scaling).
|
|
753
|
+
*/
|
|
754
|
+
declare function GetHeliRearRotorDamageScale(heli: number): number;
|
|
755
|
+
|
|
756
|
+
/**
|
|
757
|
+
* This native is a getter for [SET_HELI_TAIL_ROTOR_HEALTH](#\_0xFE205F38AAA58E5B)
|
|
709
758
|
* @param vehicle The target vehicle.
|
|
710
|
-
* @return
|
|
759
|
+
* @return Returns the health of the helicopter's rear rotor. The maximum health value is `1000`.
|
|
760
|
+
*/
|
|
761
|
+
declare function GetHeliRearRotorHealth(vehicle: number): number;
|
|
762
|
+
|
|
763
|
+
/**
|
|
764
|
+
* GET_HELI_ROLL_CONTROL
|
|
765
|
+
* @param heli The helicopter to check.
|
|
766
|
+
* @return Returns a value representing the roll control of the helicopter. The values range from `-1.0` (roll left) to `1.0` (roll right), with `0.0` indicating no roll input.
|
|
767
|
+
*/
|
|
768
|
+
declare function GetHeliRollControl(heli: number): number;
|
|
769
|
+
|
|
770
|
+
/**
|
|
771
|
+
* GET_HELI_TAIL_ROTOR_DAMAGE_SCALE
|
|
772
|
+
* @param heli The helicopter to check
|
|
773
|
+
* @return Returns a value representing the damage scaling factor applied to the helicopter's tail rotor. The value ranges from `0.0` (no damage scaling) to` 1.0 ` (full damage scaling).
|
|
774
|
+
*/
|
|
775
|
+
declare function GetHeliTailRotorDamageScale(heli: number): number;
|
|
776
|
+
|
|
777
|
+
/**
|
|
778
|
+
* **Note**: This native is deprecated, please use [`GET_HELI_REAR_ROTOR_HEALTH`](#\_0x33EE6E2B) instead.
|
|
779
|
+
* @param vehicle The target vehicle.
|
|
780
|
+
* @return Return the health of the rear rotor of the helicopter, not the tail rotor.
|
|
711
781
|
*/
|
|
712
782
|
declare function GetHeliTailRotorHealth(vehicle: number): number;
|
|
713
783
|
|
|
784
|
+
/**
|
|
785
|
+
* GET_HELI_THROTTLE_CONTROL
|
|
786
|
+
* @param heli The helicopter to check.
|
|
787
|
+
* @return Returns a value representing the throttle control of the helicopter. The value ranges from `0.0` (no throttle) to `2.0` (full throttle).
|
|
788
|
+
*/
|
|
789
|
+
declare function GetHeliThrottleControl(heli: number): number;
|
|
790
|
+
|
|
791
|
+
/**
|
|
792
|
+
* GET_HELI_YAW_CONTROL
|
|
793
|
+
* @param heli The helicopter to check.
|
|
794
|
+
* @return Returns a value the yaw control of the helicopter. The value ranges from `-1.0` (yaw left) to `1.0` (yaw right), with `0.0` meaning no yaw input.
|
|
795
|
+
*/
|
|
796
|
+
declare function GetHeliYawControl(heli: number): number;
|
|
797
|
+
|
|
714
798
|
/**
|
|
715
799
|
* GET_HOST_ID
|
|
716
800
|
*/
|
|
@@ -726,6 +810,13 @@ declare function GetInstanceId(): number;
|
|
|
726
810
|
*/
|
|
727
811
|
declare function GetInvokingResource(): string;
|
|
728
812
|
|
|
813
|
+
/**
|
|
814
|
+
* GET_IS_HELI_ENGINE_RUNNING
|
|
815
|
+
* @param heli The helicopter to check
|
|
816
|
+
* @return Returns `true` if the helicopter's engine is running, `false` if it is not.
|
|
817
|
+
*/
|
|
818
|
+
declare function GetIsHeliEngineRunning(heli: number): boolean;
|
|
819
|
+
|
|
729
820
|
/**
|
|
730
821
|
* GET_IS_VEHICLE_ENGINE_RUNNING
|
|
731
822
|
*/
|
|
@@ -988,6 +1079,13 @@ Otherwise, will return the milliseconds of the pursuit.
|
|
|
988
1079
|
*/
|
|
989
1080
|
declare function GetPlayerTimeInPursuit(playerSrc: string, lastPursuit: boolean): number;
|
|
990
1081
|
|
|
1082
|
+
/**
|
|
1083
|
+
* Gets the current time online for a specified player.
|
|
1084
|
+
* @param playerSrc A player.
|
|
1085
|
+
* @return The current time online in seconds.
|
|
1086
|
+
*/
|
|
1087
|
+
declare function GetPlayerTimeOnline(playerSrc: string): number;
|
|
1088
|
+
|
|
991
1089
|
/**
|
|
992
1090
|
* Gets a player's token. Tokens can be used to enhance banning logic, however are specific to a server.
|
|
993
1091
|
* @param playerSrc A player.
|
|
@@ -1107,12 +1205,33 @@ declare function GetResourceState(resourceName: string): string;
|
|
|
1107
1205
|
*/
|
|
1108
1206
|
declare function GetSelectedPedWeapon(ped: number): number;
|
|
1109
1207
|
|
|
1208
|
+
/**
|
|
1209
|
+
* GET_STATE_BAG_KEYS
|
|
1210
|
+
* @param bagName The name of the bag.
|
|
1211
|
+
* @return Returns an array containing all keys for which the state bag has associated values.
|
|
1212
|
+
*/
|
|
1213
|
+
declare function GetStateBagKeys(bagName: string): any;
|
|
1214
|
+
|
|
1110
1215
|
/**
|
|
1111
1216
|
* Returns the value of a state bag key.
|
|
1112
1217
|
* @return Value.
|
|
1113
1218
|
*/
|
|
1114
1219
|
declare function GetStateBagValue(bagName: string, key: string): any;
|
|
1115
1220
|
|
|
1221
|
+
/**
|
|
1222
|
+
* GET_THRUSTER_SIDE_RCS_THROTTLE
|
|
1223
|
+
* @param jetpack The jetpack to check.
|
|
1224
|
+
* @return Returns a value representing the side RCS (Reaction Control System) throttle of the jetpack. The values range from `0.0` (no throttle) to `1.0` (full throttle).
|
|
1225
|
+
*/
|
|
1226
|
+
declare function GetThrusterSideRcsThrottle(jetpack: number): number;
|
|
1227
|
+
|
|
1228
|
+
/**
|
|
1229
|
+
* GET_THRUSTER_THROTTLE
|
|
1230
|
+
* @param jetpack The jetpack to check.
|
|
1231
|
+
* @return Returns a value representing the main throttle of the jetpack. The values range from `0.0` (no throttle) to `1.0` (full throttle)
|
|
1232
|
+
*/
|
|
1233
|
+
declare function GetThrusterThrottle(jetpack: number): number;
|
|
1234
|
+
|
|
1116
1235
|
/**
|
|
1117
1236
|
* GET_TRAIN_CARRIAGE_ENGINE
|
|
1118
1237
|
* @param train The entity handle.
|
|
@@ -1222,6 +1341,22 @@ declare function GetVehicleHeadlightsColour(vehicle: number): number;
|
|
|
1222
1341
|
*/
|
|
1223
1342
|
declare function GetVehicleHomingLockonState(vehicle: number): number;
|
|
1224
1343
|
|
|
1344
|
+
/**
|
|
1345
|
+
* This is a getter for the client-side native [`START_VEHICLE_HORN`](https://docs.fivem.net/natives/?\_0x9C8C6504B5B63D2C), which allows you to return the horn type of the vehicle.
|
|
1346
|
+
* **Note**: This native only gets the hash value set with `START_VEHICLE_HORN`. If a wrong hash is passed into `START_VEHICLE_HORN`, it will return this wrong hash.
|
|
1347
|
+
* ```cpp
|
|
1348
|
+
* enum eHornTypes
|
|
1349
|
+
* {
|
|
1350
|
+
* NORMAL = 1330140148,
|
|
1351
|
+
* HELDDOWN = -2087385909,
|
|
1352
|
+
* AGGRESSIVE = -92810745
|
|
1353
|
+
* }
|
|
1354
|
+
* ```
|
|
1355
|
+
* @param vehicle The vehicle to check the horn type.
|
|
1356
|
+
* @return Returns the vehicle horn type hash, or `0` if one is not set.
|
|
1357
|
+
*/
|
|
1358
|
+
declare function GetVehicleHornType(vehicle: number): number;
|
|
1359
|
+
|
|
1225
1360
|
/**
|
|
1226
1361
|
* GET_VEHICLE_INTERIOR_COLOUR
|
|
1227
1362
|
*/
|
|
@@ -1386,6 +1521,20 @@ declare function IsEntityVisible(entity: number): boolean;
|
|
|
1386
1521
|
*/
|
|
1387
1522
|
declare function IsFlashLightOn(ped: number): boolean;
|
|
1388
1523
|
|
|
1524
|
+
/**
|
|
1525
|
+
* This is a getter for [SET_HELI_TAIL_EXPLODE_THROW_DASHBOARD](#\_0x3EC8BF18AA453FE9)
|
|
1526
|
+
* @param heli The helicopter to check
|
|
1527
|
+
* @return Returns `true` if the helicopter's tail boom can break, `false` if it cannot.
|
|
1528
|
+
*/
|
|
1529
|
+
declare function IsHeliTailBoomBreakable(heli: number): boolean;
|
|
1530
|
+
|
|
1531
|
+
/**
|
|
1532
|
+
* IS_HELI_TAIL_BOOM_BROKEN
|
|
1533
|
+
* @param heli The helicopter to check
|
|
1534
|
+
* @return Returns `true` if the helicopter's tail boom is broken, `false` if it is intact.
|
|
1535
|
+
*/
|
|
1536
|
+
declare function IsHeliTailBoomBroken(heli: number): boolean;
|
|
1537
|
+
|
|
1389
1538
|
/**
|
|
1390
1539
|
* This native checks if the given ped is a player.
|
|
1391
1540
|
* @return Returns `true` if the ped is a player, `false` otherwise.
|
|
@@ -2835,6 +2984,14 @@ declare function StartFindKvp(prefix: string): number;
|
|
|
2835
2984
|
*/
|
|
2836
2985
|
declare function StartResource(resourceName: string): boolean;
|
|
2837
2986
|
|
|
2987
|
+
/**
|
|
2988
|
+
* STATE_BAG_HAS_KEY
|
|
2989
|
+
* @param bagName The name of the bag.
|
|
2990
|
+
* @param key The key used to check data existence.
|
|
2991
|
+
* @return Returns true if the data associated with the specified key exists; otherwise, returns false.
|
|
2992
|
+
*/
|
|
2993
|
+
declare function StateBagHasKey(bagName: string, key: string): boolean;
|
|
2994
|
+
|
|
2838
2995
|
/**
|
|
2839
2996
|
* STOP_RESOURCE
|
|
2840
2997
|
*/
|