@citizenfx/server 2.0.10048-1 → 2.0.10188-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.
@@ -557,6 +557,13 @@ declare function GetEntityMaxHealth(entity: number): number;
557
557
  */
558
558
  declare function GetEntityModel(entity: number): number;
559
559
 
560
+ /**
561
+ * GET_ENTITY_ORPHAN_MODE
562
+ * @param entity The entity to get the orphan mode of
563
+ * @return Returns the entities current orphan mode, refer to enum in [SET_ENTITY_ORPHAN_MODE](#\_0x489E9162)
564
+ */
565
+ declare function GetEntityOrphanMode(entity: number): number;
566
+
560
567
  /**
561
568
  * This native gets an entity's population type.
562
569
  * @param entity the entity to obtain the population type from
@@ -696,6 +703,7 @@ declare function GetGameName(): string;
696
703
  * ### Supported pools
697
704
  * * `CPed`: Peds (including animals) and players.
698
705
  * * `CObject`: Objects (props), doors, and projectiles.
706
+ * * `CNetObject`: Networked objects
699
707
  * * `CVehicle`: Vehicles.
700
708
  * * `CPickup`: Pickups.
701
709
  * @param poolName The pool name to get a list of entities from.
@@ -1396,6 +1404,33 @@ declare function GetVehicleLivery(vehicle: number): number;
1396
1404
  */
1397
1405
  declare function GetVehicleLockOnTarget(vehicle: number): number;
1398
1406
 
1407
+ /**
1408
+ * Getter to check the neon colour of a vehicle. This native is the server side getter of [GET_VEHICLE_NEON_LIGHTS_COLOUR](#\_0x7619EEE8C886757F).
1409
+ * @param vehicle The vehicle to check.
1410
+ * @param red Pointer to an integer where the red component of the neon color will be stored.
1411
+ * @param green Pointer to an integer where the green component of the neon color will be stored.
1412
+ * @param blue Pointer to an integer where the blue component of the neon color will be stored.
1413
+ * @return None. The neon color values are retrieved and stored in the `red`, `green`, and `blue` pointers. Make sure to store the returned values in variables for further use.
1414
+ */
1415
+ declare function GetVehicleNeonColour(vehicle: number): [number, number, number];
1416
+
1417
+ /**
1418
+ * Getter to check if one of the neon lights of a vehicle is enabled. This native is the server side getter of [IS_VEHICLE_NEON_LIGHT_ENABLED](#\_0x8C4B92553E4766A5).
1419
+ * ```cpp
1420
+ * enum neonIndex
1421
+ * {
1422
+ * NEON_BACK = 0, // Back neon
1423
+ * NEON_RIGHT = 1, // Right neon
1424
+ * NEON_LEFT = 2, // Left neon
1425
+ * NEON_FRONT = 3 // Front neon
1426
+ * };
1427
+ * ```
1428
+ * @param vehicle The vehicle to check.
1429
+ * @param neonIndex A value from the neonIndex enum representing the neon light to check.
1430
+ * @return Returns `true` if the specified neon light is enabled, `false` otherwise.
1431
+ */
1432
+ declare function GetVehicleNeonEnabled(vehicle: number, neonIndex: number): boolean;
1433
+
1399
1434
  /**
1400
1435
  * GET_VEHICLE_NUMBER_PLATE_TEXT
1401
1436
  */
@@ -1946,6 +1981,28 @@ declare function SetEntityHeading(entity: number, heading: number): void;
1946
1981
  */
1947
1982
  declare function SetEntityIgnoreRequestControlFilter(entity: number, ignore: boolean): void;
1948
1983
 
1984
+ /**
1985
+ * ```cpp
1986
+ * enum EntityOrphanMode {
1987
+ * // Default, this will delete the entity when it isn't relevant to any players
1988
+ * // NOTE: this *doesn't* mean when they're no longer in scope
1989
+ * DeleteWhenNotRelevant = 0,
1990
+ * // The entity will be deleted whenever its original owner disconnects
1991
+ * // NOTE: if this is set when the entities original owner has already left it will be
1992
+ * // marked for deletion (similar to just calling DELETE_ENTITY)
1993
+ * DeleteOnOwnerDisconnect = 1,
1994
+ * // The entity will never be deleted by the server when it does relevancy checks
1995
+ * // you should only use this on entities that need to be relatively persistent
1996
+ * KeepEntity = 2
1997
+ * }
1998
+ * ```
1999
+ * Sets what happens when the entity is orphaned and no longer has its original owner.
2000
+ * **NOTE**: This native doesn't guarantee the persistence of the entity.
2001
+ * @param entity The entity to set the orphan mode of
2002
+ * @param orphanMode The mode that the server should use for determining if an entity should be removed.
2003
+ */
2004
+ declare function SetEntityOrphanMode(entity: number, orphanMode: number): void;
2005
+
1949
2006
  /**
1950
2007
  * Sets the rotation of a specified entity in the game world.
1951
2008
  * ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@citizenfx/server",
3
- "version": "2.0.10048-1",
3
+ "version": "2.0.10188-1",
4
4
  "description": "Typings for the CitizenFX server JS API.",
5
5
  "main": "index.js",
6
6
  "scripts": {