@citizenfx/client 2.0.12746-1 → 2.0.12781-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.
@@ -7316,6 +7316,28 @@ declare function DrawBinkMovie(binkMovie: number, posX: number, posY: number, sc
7316
7316
  */
7317
7317
  declare function DrawBox(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, red: number, green: number, blue: number, alpha: number): void;
7318
7318
 
7319
+ /**
7320
+ * Allows drawing advanced light effects, known as coronas, which support flares, volumetric lighting, and customizable glow properties.
7321
+ * @param posX The X position of the corona origin.
7322
+ * @param posY The Y position of the corona origin.
7323
+ * @param posZ The Z position of the corona origin.
7324
+ * @param size The size of the corona.
7325
+ * @param red The red component of the marker color, on a scale from 0-255.
7326
+ * @param green The green component of the marker color, on a scale from 0-255.
7327
+ * @param blue The blue component of the marker color, on a scale from 0-255.
7328
+ * @param alpha The alpha component of the marker color, on a scale from 0-255.
7329
+ * @param intensity The intensity of the corona.
7330
+ * @param zBias zBias slightly shifts the depth of surfaces to make sure they don’t overlap or cause visual glitches when they are very close together. The zBias value are usually in the range of 0.0 to 1.0.
7331
+ * @param dirX The X direction of the corona.
7332
+ * @param dirY The Y direction of the corona.
7333
+ * @param dirZ The Z direction of the corona.
7334
+ * @param viewThreshold The view threshold is to determine the fading of the corona based on the distance.
7335
+ * @param innerAngle The inner angle of the corona.
7336
+ * @param outerAngle The outer angle of the corona.
7337
+ * @param flags The corona flags.
7338
+ */
7339
+ declare function DrawCorona(posX: number, posY: number, posZ: number, size: number, red: number, green: number, blue: number, alpha: number, intensity: number, zBias: number, dirX: number, dirY: number, dirZ: number, viewThreshold: number, innerAngle: number, outerAngle: number, flags: number): void;
7340
+
7319
7341
  /**
7320
7342
  * NOTE: Debugging functions are not present in the retail version of the game.
7321
7343
  */
@@ -15304,24 +15326,24 @@ declare function GetPedEventData(ped: number, eventType: number, outData?: numbe
15304
15326
  declare function GetPedExtractedDisplacement(ped: number, worldSpace: boolean): number[];
15305
15327
 
15306
15328
  /**
15307
- * A getter for [`_SET_PED_EYE_COLOR`](#\_0x50B56988B170AFDF).
15329
+ * A getter for [\_SET_PED_EYE_COLOR](#\_0x50B56988B170AFDF). Returns -1 if fails to get.
15308
15330
  * @param ped The target ped
15309
15331
  * @return Returns ped's eye colour, or -1 if fails to get.
15310
15332
  */
15311
15333
  declare function GetPedEyeColor(ped: number): number;
15334
+
15312
15335
  /**
15313
15336
  * A getter for [`_SET_PED_EYE_COLOR`](#\_0x50B56988B170AFDF).
15314
15337
  * @param ped The target ped
15315
15338
  * @return Returns ped's eye colour, or -1 if fails to get.
15316
15339
  */
15317
- declare function N_0x76bba2cee66d47e9(ped: number): number;
15318
-
15340
+ declare function GetPedEyeColor(ped: number): number;
15319
15341
  /**
15320
- * A getter for [\_SET_PED_EYE_COLOR](#\_0x50B56988B170AFDF). Returns -1 if fails to get.
15342
+ * A getter for [`_SET_PED_EYE_COLOR`](#\_0x50B56988B170AFDF).
15321
15343
  * @param ped The target ped
15322
15344
  * @return Returns ped's eye colour, or -1 if fails to get.
15323
15345
  */
15324
- declare function GetPedEyeColor(ped: number): number;
15346
+ declare function N_0x76bba2cee66d47e9(ped: number): number;
15325
15347
 
15326
15348
  /**
15327
15349
  * A getter for [\_SET_PED_FACE_FEATURE](#\_0x71A5C1DBA060049E). Returns 0.0 if fails to get.
@@ -18640,6 +18662,57 @@ declare function GetVehicleHandlingInt(vehicle: number, class_: string, fieldNam
18640
18662
  */
18641
18663
  declare function GetVehicleHandlingVector(vehicle: number, class_: string, fieldName: string): number[];
18642
18664
 
18665
+ /**
18666
+ * **Note**: Flags are not the same based on your `gamebuild`. Please see [here](https://docs.fivem.net/docs/game-references/vehicle-references/vehicle-flags) to see a complete list of all vehicle flags.
18667
+ * Get vehicle.meta flag by index. Useful examples include `FLAG_LAW_ENFORCEMENT` (31), `FLAG_RICH_CAR` (36), `FLAG_IS_ELECTRIC` (43), `FLAG_IS_OFFROAD_VEHICLE` (48).
18668
+ * @param vehicle The vehicle to obtain flags for.
18669
+ * @param flagIndex Flag index.
18670
+ * @return A boolean for whether the flag is set.### Example```lua
18671
+ local vehicleFlags = {
18672
+ FLAG_SMALL_WORKER = 0,
18673
+ FLAG_BIG = 1,
18674
+ FLAG_NO_BOOT = 2,
18675
+ FLAG_ONLY_DURING_OFFICE_HOURS = 3
18676
+ -- This is just a example, see fivem-docs to see all flags.
18677
+ }
18678
+
18679
+ local function getAllVehicleFlags(vehicle)
18680
+ local flags = {}
18681
+ for i = 0, 256 do
18682
+ if GetVehicleHasFlag(vehicle, i) then
18683
+ flags[#flags+1] = i
18684
+ end
18685
+ end
18686
+ return flags
18687
+ end
18688
+
18689
+ local flagsVehicle = GetVehiclePedIsIn(PlayerPedId(), false)
18690
+ print(getAllVehicleFlags)
18691
+ ``````javascript
18692
+ const VEHICLE_FLAGS = {
18693
+ FLAG_SMALL_WORKER: 0,
18694
+ FLAG_BIG: 1,
18695
+ FLAG_NO_BOOT: 2,
18696
+ FLAG_ONLY_DURING_OFFICE_HOURS: 3
18697
+ // This is just a example, see fivem-docs to see all flags.
18698
+ };
18699
+
18700
+ function getAllVehicleFlags(mVehicle = GetVehiclePedIsIn(PlayerPedId(), false)) {
18701
+ const flags = [];
18702
+ for (let i = 0; i < 204; i++) {
18703
+ if (GetVehicleHasFlag(mVehicle, i)) {
18704
+ flags.push(i);
18705
+ }
18706
+ }
18707
+ return flags;
18708
+ }
18709
+
18710
+ let flagsVehicle = GetVehiclePedIsIn(PlayerPedId(), false);
18711
+ console.log(getAllVehicleFlags);
18712
+ ```
18713
+ */
18714
+ declare function GetVehicleHasFlag(vehicle: number, flagIndex: number): boolean;
18715
+
18643
18716
  /**
18644
18717
  * GET_VEHICLE_HAS_KERS
18645
18718
  * @param vehicle The vehicle handle.
@@ -40636,6 +40709,14 @@ declare function RegisterRawNuiCallback(callbackType: string, callback: Function
40636
40709
  */
40637
40710
  declare function RegisterResourceAsEventHandler(eventName: string): void;
40638
40711
 
40712
+ /**
40713
+ * Registers a custom rope data with the game. For guidance on what these values should be use common:/data/ropedata.xml as a reference.
40714
+ * Returns a rope type which can be passed into [ADD_ROPE](?\_0xE832D760399EB220) to use a custom rope design.
40715
+ * Once a rope data is registered it can be used indefinitely and you should take caution not too register too many as to exceed the games limit.
40716
+ * @return Returns a non-negative value on success, or -1 if the rope data could not be registered or an invalid argument is passed.
40717
+ */
40718
+ declare function RegisterRopeData(numSections: number, radius: number, diffuseTextureName: string, normalMapName: string, distanceMappingScale: number, uvScaleX: number, uvScaleY: number, specularFresnel: number, specularFalloff: number, specularIntensity: number, bumpiness: number, color: number): number;
40719
+
40639
40720
  /**
40640
40721
  * REGISTER_SAVE_HOUSE
40641
40722
  */
@@ -55325,6 +55406,14 @@ declare function SetVehicleExtraColours(vehicle: number, pearlescentColor: numbe
55325
55406
  */
55326
55407
  declare function SetVehicleFixed(vehicle: number): void;
55327
55408
 
55409
+ /**
55410
+ * This native is a setter for [`GET_VEHICLE_HAS_FLAG`](#\_0xD85C9F57).
55411
+ * @param vehicle The vehicle to set flag for.
55412
+ * @param flagIndex Flag index.
55413
+ * @param value `true` to enable the flag, `false` to disable it.
55414
+ */
55415
+ declare function SetVehicleFlag(vehicle: number, flagIndex: number, value: boolean): boolean;
55416
+
55328
55417
  /**
55329
55418
  * SET_VEHICLE_FLIGHT_NOZZLE_POSITION
55330
55419
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@citizenfx/client",
3
- "version": "2.0.12746-1",
3
+ "version": "2.0.12781-1",
4
4
  "description": "Typings for the CitizenFX client JS API.",
5
5
  "main": "index.js",
6
6
  "scripts": {