### start Method Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/ParticleEffect.html Starts the particle effect. ```APIDOC ## start ### Description Starts the particle effect. ### Method start(): boolean ### Returns boolean ``` -------------------------------- ### start Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/NetworkedScene.html Starts the networked scene. ```APIDOC ## start ### Description Starts the networked scene playback. ### Returns * void ``` -------------------------------- ### Install Dependencies Source: https://github.com/nativewrappers/fivem-client/blob/master/DEVELOPMENT.md Install all project dependencies using npm. Node.js version 12 or greater is recommended. ```bash npm i ``` -------------------------------- ### start Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/Effects.html Starts a screen effect with optional duration and loop settings. This method is used to apply visual effects to the screen. ```APIDOC ## start ### Description Starts a screen effect with optional duration and loop settings. This method is used to apply visual effects to the screen. ### Method static ### Signature start(effectName: ScreenEffect, duration?: number, looped?: boolean): void ### Parameters #### Parameters - **effectName** (ScreenEffect) - Required - The name of the screen effect to start. - **duration** (number) - Optional - The duration in seconds for the effect. Defaults to 0. - **looped** (boolean) - Optional - Whether the effect should loop. Defaults to false. ### Returns void ``` -------------------------------- ### IsEngineStarting Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/Vehicle.html Gets or sets a boolean value indicating whether the vehicle's engine is in the process of starting. ```APIDOC ## get IsEngineStarting ### Description Gets a boolean value indicating whether the vehicle's engine is currently starting. ### Returns - **boolean**: `true` if the engine is starting, `false` otherwise. ## set IsEngineStarting ### Description Sets a boolean value to control whether the vehicle's engine is starting. ### Parameters #### Parameters - **value** (boolean) - Required - Set to `true` to initiate the engine starting process, `false` to stop it. ### Returns - **void ``` -------------------------------- ### Example Commit Message: Documentation Change Source: https://github.com/nativewrappers/fivem-client/blob/master/CONTRIBUTING.md This is an example of a descriptive and short commit message for documentation changes. ```git docs: Scaleform + LoadingPrompt ``` -------------------------------- ### Example Commit Message: Feature Addition Source: https://github.com/nativewrappers/fivem-client/blob/master/CONTRIBUTING.md This is an example of a descriptive and short commit message for adding new features. ```git Added bone collections and Camera PointAt functions ``` -------------------------------- ### installModKit Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/VehicleModCollection.html Installs a mod kit onto the vehicle. ```APIDOC ## installModKit ### Description Installs a mod kit onto the vehicle. ### Parameters #### Parameters - **modKitId** (number) - Required - The ID of the mod kit to install. ``` -------------------------------- ### Vehicle.Windows Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/Vehicle.html Gets the collection of windows for the vehicle. ```APIDOC ## Vehicle.Windows ### Description Gets the collection of windows for the vehicle. ### Method Getter ### Returns * **VehicleWindowCollection** - The collection of vehicle windows. ``` -------------------------------- ### VehicleToggleMod.IsInstalled Accessor Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/VehicleToggleMod.html Gets or sets the installation status of the vehicle toggle mod. This accessor allows checking if the mod is currently installed and also installing or uninstalling it. ```APIDOC ### IsInstalled * get IsInstalled(): boolean * set IsInstalled(value: boolean): void #### Returns boolean #### Parameters * ##### value: boolean ``` -------------------------------- ### Camera.FarDepthOfField Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/Camera.html Gets or sets the distance at which depth of field starts to fade out. ```APIDOC ## FarDepthOfField ### Description Gets or sets the distance at which depth of field starts to fade out. ### Parameters #### Path Parameters * **farDepthOfField** (number) - Description: The desired far depth of field distance. ### Returns * number or void ``` -------------------------------- ### Camera.NearDepthOfField Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/Camera.html Gets or sets the distance at which depth of field starts to become fully focused. ```APIDOC ## NearDepthOfField ### Description Gets or sets the distance at which depth of field starts to become fully focused. ### Parameters #### Path Parameters * **nearDepthOfField** (number) - Description: The desired near depth of field distance. ### Returns * number or void ``` -------------------------------- ### Initialize and Draw Instructional Buttons Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/InstructionalButtons.html Demonstrates how to create an instance of InstructionalButtons with custom button configurations and how to draw them on the screen within a game tick. Ensure to import 'InstructionalButtons' and 'Control' from '@nativewrappers/client'. ```typescript import { InstructionalButtons, Control } from '@nativewrappers/client'; const buttons = new InstructionalButtons([ { controls: [Control.Context], label: "Interact with Bob" }, { controls: [Control.Detonate], label: "Say hello to Alice" } ]); setTick(() => { buttons.draw(); }); ``` -------------------------------- ### Player.handle Property Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/Player.html Gets the network handle of the player. ```APIDOC ## Player.handle ### Description Gets the network handle of the player. ### Returns * number ``` -------------------------------- ### LodDistance Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/Entity.html Gets or sets the Level of Detail (LOD) distance for the entity. This controls when the entity starts to be culled or simplified. ```APIDOC ## LodDistance ### Description Gets or sets the Level of Detail (LOD) distance for the entity. This controls when the entity starts to be culled or simplified. ### Getter #### Returns - number: The current LOD distance. ### Setter #### Parameters - **value** (number): The desired LOD distance. #### Returns - void ``` -------------------------------- ### InstructionalButtons Constructor Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/InstructionalButtons.html Initializes a new instance of the InstructionalButtons class. This constructor takes an array of button configurations, where each configuration specifies the controls and the label to display for the button. ```APIDOC ## constructor ### Description Initializes a new instance of the InstructionalButtons class. This constructor takes an array of button configurations, where each configuration specifies the controls and the label to display for the button. ### Parameters * **buttons** ([IButton]()) - Required - Array of instructional buttons to be drawn. ### Returns * [InstructionalButtons]() ``` -------------------------------- ### Relevant Development Commands Source: https://github.com/nativewrappers/fivem-client/blob/master/DEVELOPMENT.md A list of common npm scripts for managing the project, including installation, formatting, linting, and documentation generation. ```bash npm i ``` ```bash npm run build ``` ```bash npm run format ``` ```bash npm run lint ``` ```bash npm run docs ``` -------------------------------- ### IsEngineRunning Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/Vehicle.html Gets or sets the state of the vehicle's engine. This property indicates whether the engine is currently running or can be started. ```APIDOC ## get IsEngineRunning ### Description Gets the current running state of the vehicle's engine. ### Returns - **boolean**: `true` if the engine is running, `false` otherwise. ## set IsEngineRunning ### Description Sets the running state of the vehicle's engine. ### Parameters #### Parameters - **value** (boolean) - Required - The desired running state for the engine. Set to `true` to start the engine, `false` to stop it. ### Returns - **void ``` -------------------------------- ### FrameCount Accessor Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/Game.html Gets the total number of frames rendered since the game session started. This can be used for tracking game duration or activity. ```APIDOC ## FrameCount Accessor ### Description Gets the total amount of frames rendered in this session. ### Method GET ### Endpoint /game/frameCount ### Parameters None ### Response #### Success Response (200) * **return value** (number) - The total frame count. ### Response Example ```json { "frameCount": 15000 } ``` ``` -------------------------------- ### Create and Configure a Timerbar Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/Timerbar.html Demonstrates how to create a new Timerbar instance, set its text, and later control its visibility. This is useful for displaying timed events or progress to the player. ```typescript const myTimerbar = new Cfx.Timerbar("Hello"); myTimerbar.Text = "World"; // Disable Timerbar later on myTimerbar.Visible = false; ``` -------------------------------- ### AbstractUIMenuPanel Constructor Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/AbstractUIMenuPanel.html Initializes a new instance of the AbstractUIMenuPanel class. ```APIDOC ## constructor ### Description Initializes a new instance of the AbstractUIMenuPanel class. ### Returns - [AbstractUIMenuPanel](AbstractUIMenuPanel.html) ### Code Example ```typescript new AbstractUIMenuPanel() ``` ``` -------------------------------- ### Instantiate and Render a Scaleform Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/Scaleform.html Demonstrates how to create a new Scaleform instance, call a function on it, and set up a tick to render it. Ensure the Scaleform is loaded before calling functions. ```typescript import { Scaleform } from '@nativewrappers/client/ui'; const scaleform = new Cfx.Scaleform("MIDSIZED_MESSAGE"); scaleform.callFunction("SHOW_MIDSIZED_MESSAGE", ["Title", "Message"]); setTick(() => { await scaleform.render2D(); }); ``` -------------------------------- ### open Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/Menu.html Opens the menu. ```APIDOC ## open ### Description Opens the menu. ### Method (Not specified, likely a class method) ### Parameters (None) ### Returns void ``` -------------------------------- ### constructor Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/VehicleWindowCollection.html Initializes a new instance of the VehicleWindowCollection class. ```APIDOC ## constructor ### Description Initializes a new instance of the VehicleWindowCollection class. ### Parameters #### Path Parameters * owner (Vehicle) - Description of the owner parameter. ### Returns VehicleWindowCollection - A new instance of VehicleWindowCollection. ``` -------------------------------- ### World.CreateAmbientPickup Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/World.html Creates an ambient pickup in the world. ```APIDOC ## CreateAmbientPickup ### Description Creates an ambient pickup in the world. ### Method POST ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **pickupModel** (string) - Required - The model hash or name of the pickup. - **x** (number) - Required - The x-coordinate. - **y** (number) - Required - The y-coordinate. - **z** (number) - Required - The z-coordinate. - **type** (number) - Optional - The type of pickup. ### Request Example ```json { "pickupModel": "WEAPON_PISTOL", "x": 0.0, "y": 0.0, "z": 0.0, "type": 1 } ``` ### Response #### Success Response (200) - **pickupHandle** (number) - The handle of the created pickup. #### Response Example ```json { "pickupHandle": 12345 } ``` ``` -------------------------------- ### World.CreatePickup Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/World.html Creates a pickup in the world. ```APIDOC ## CreatePickup ### Description Creates a pickup in the world. ### Method POST ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **pickupModel** (string) - Required - The model hash or name of the pickup. - **x** (number) - Required - The x-coordinate. - **y** (number) - Required - The y-coordinate. - **z** (number) - Required - The z-coordinate. - **type** (number) - Optional - The type of pickup. - **amount** (number) - Optional - The amount of money or ammo. ### Request Example ```json { "pickupModel": "PICKUP_MONEY_CASE", "x": 0.0, "y": 0.0, "z": 0.0, "type": 1, "amount": 1000 } ``` ### Response #### Success Response (200) - **pickupHandle** (number) - The handle of the created pickup. #### Response Example ```json { "pickupHandle": 12345 } ``` ``` -------------------------------- ### Camera.shake Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/Camera.html Starts shaking the camera. ```APIDOC ## shake ### Description Starts shaking the camera. ### Parameters #### Path Parameters * **pattern** (string) - Description: The shake pattern. * **amplitude** (number) - Description: The shake amplitude. ### Returns * void ``` -------------------------------- ### World.constructor Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/World.html Initializes a new instance of the World class. ```APIDOC ## constructor ### Description Initializes a new instance of the World class. ### Method CONSTRUCTOR ### Parameters None ### Request Example None ### Response #### Success Response (200) - **World** ([World](World.html)) - A new instance of the World class. #### Response Example None ``` -------------------------------- ### Ped.Gender Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/Ped.html Gets the gender of the Ped. ```APIDOC ## get Gender ### Description Gets the gender of the Ped. ### Returns [Gender](../enums/Gender.html) ### Defined in models/Ped.ts:82 ``` -------------------------------- ### Model Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/Vehicle.html Gets the model of the vehicle. ```APIDOC ## Model ### Description Gets the model of the vehicle. ### Method GET /Model ### Endpoint /Model ### Returns - **Model**: The model of the vehicle. ``` -------------------------------- ### UIMenuStatisticsPanelItem Constructor Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/UIMenuStatisticsPanelItem.html Initializes a new instance of the UIMenuStatisticsPanelItem class. ```APIDOC ## constructor ### Description Initializes a new instance of the UIMenuStatisticsPanelItem class. ### Signature ```typescript new UIMenuStatisticsPanelItem(name: string, percentage?: number): UIMenuStatisticsPanelItem ``` ### Parameters #### Parameters - **name**: string - **percentage**: number = 0 ### Returns [UIMenuStatisticsPanelItem](UIMenuStatisticsPanelItem.html) ``` -------------------------------- ### Driver Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/Vehicle.html Gets the driver of the vehicle. ```APIDOC ## get Driver ### Description Gets the driver of the vehicle. ### Method GET ### Endpoint /vehicles/{id}/driver ### Returns [Ped](Ped.html) ``` -------------------------------- ### Player Constructor Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/Player.html Initializes a new Player instance. The handle can be the player's network handle or their server source ID. ```APIDOC ## new Player(handle: number) ### Description Initializes a new Player instance. ### Parameters #### Path Parameters * **handle** (number) - Required - the player handle, or if on the server, their source. ### Returns * [Player](Player.html) ``` -------------------------------- ### IsPlayer Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/Ped.html Gets whether the Ped is the player. ```APIDOC ## get IsPlayer(): boolean ### Description Gets whether the Ped is the player. ### Returns * **boolean**: True if the Ped is the player, false otherwise. ``` -------------------------------- ### goTo Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/Tasks.html Makes a ped go to a specified position with customizable pathing and speed options. ```APIDOC ## goTo ### Description Makes a ped go to a specified position with customizable pathing and speed options. ### Method void ### Parameters #### Path Parameters - **position** ([Vector3](Vector3.html)) - Required - The position to go to. - **ignorePaths** (boolean) - Optional - Whether to ignore pathfinding. Defaults to false. - **timeout** (number) - Optional - The timeout for reaching the position. Defaults to -1. - **speed** (number) - Optional - The movement speed. Defaults to 1. ### Returns void ``` -------------------------------- ### Ped.CurrentVehicle Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/Ped.html Gets the vehicle the Ped is currently in, if any. ```APIDOC ## get CurrentVehicle ### Description Gets the vehicle the Ped is currently in. ### Returns null | [Vehicle](Vehicle.html) ### Defined in models/Ped.ts:162 ``` -------------------------------- ### Size Constructor Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/Size.html Initializes a new instance of the Size class. Optionally accepts width and height parameters. ```APIDOC ## new Size(w?: number, h?: number) ### Description Initializes a new instance of the Size class. ### Parameters #### Path Parameters - **w** (number) - Optional - The initial width of the size. Defaults to 0. - **h** (number) - Optional - The initial height of the size. Defaults to 0. ### Returns - **[Size](Size.html)** - A new instance of the Size class. ``` -------------------------------- ### Ped.Armor Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/Ped.html Gets or sets the armor of the ped. ```APIDOC ## Armor ### Description Gets or sets the armor of the ped. ### Accessors #### get Armor(): number Returns the current armor of the ped. #### set Armor(amount: number): void Sets the armor of the ped. * **amount** (number) - The desired armor amount. ``` -------------------------------- ### World.createCameraWithParams Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/World.html Creates a camera with specified parameters in the world. ```APIDOC ## createCameraWithParams ### Description Creates a camera with specified parameters in the world. ### Method POST ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **x** (number) - Required - The x-coordinate. - **y** (number) - Required - The y-coordinate. - **z** (number) - Required - The z-coordinate. - **roll** (number) - Required - The roll angle. - **pitch** (number) - Required - The pitch angle. - **yaw** (number) - Required - The yaw angle. - **fov** (number) - Optional - The field of view. ### Request Example ```json { "x": 0.0, "y": 0.0, "z": 0.0, "roll": 0.0, "pitch": 0.0, "yaw": 0.0, "fov": 70.0 } ``` ### Response #### Success Response (200) - **cameraHandle** (number) - The handle of the created camera. #### Response Example ```json { "cameraHandle": 11223 } ``` ``` -------------------------------- ### Ped.Accuracy Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/Ped.html Gets or sets the accuracy of the ped. ```APIDOC ## Accuracy ### Description Gets or sets the accuracy of the ped. ### Accessors #### get Accuracy(): number Returns the current accuracy of the ped. #### set Accuracy(accuracy: number): void Sets the accuracy of the ped. * **accuracy** (number) - The desired accuracy value. ``` -------------------------------- ### Create Camera with Parameters Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/World.html Creates a camera using the 'DEFAULT_SCRIPTED_CAMERA' type with specified position, rotation, and field of view. ```typescript const position = new Vector3(-802.311, 175.056, 72.8446); const myCamera = World.createCameraWithParams(CameraTypes.Scripted, position, new Vector3(0,0,0), 180); ``` -------------------------------- ### Clone the Repository Source: https://github.com/nativewrappers/fivem-client/blob/master/DEVELOPMENT.md Clone your forked repository to your local machine. Ensure you have git installed. ```bash git clone git@github.com:yournamehere/native-wrappers-client.git ``` -------------------------------- ### getAllWindows Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/VehicleWindowCollection.html Retrieves all vehicle windows. ```APIDOC ## getAllWindows ### Description Retrieves all vehicle windows. ### Returns (undefined | null | VehicleWindow)[] - An array of vehicle windows. ``` -------------------------------- ### Vehicle.Wheels Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/Vehicle.html Gets the collection of wheels for the vehicle. ```APIDOC ## Vehicle.Wheels ### Description Gets the collection of wheels for the vehicle. ### Method Getter ### Returns * **VehicleWheelCollection** - The collection of vehicle wheels. ``` -------------------------------- ### Text Constructor Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/Text.html Initializes a new Text object with specified caption, position, and optional styling parameters. ```APIDOC ## constructor Text ### Description Initializes a new Text object. ### Parameters * **caption** (string) - Required - Text to display * **pos** ([Point](Point.html)) - Required - Position of text relative to alignment. In pixels. * **scale** (number) - Optional - Size of text. Default 1.0 * **color** ([Color](Color.html)) - Optional - Color of text. Default black. * **font** ([Font](../enums/Font.html)) - Optional - Font of text. Default Chalet London. * **alignment** ([Alignment](../enums/Alignment.html)) - Optional - Alignment of text. Default Left. * **dropShadow** (boolean) - Optional - * **outline** (boolean) - Optional - * **wordWrap** ([Size](Size.html)) - Optional - ### Returns * [Text](Text.html) ``` -------------------------------- ### Position Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/Vehicle.html Gets or sets the position of the vehicle. ```APIDOC ## get Position ### Description Gets the current position of the vehicle. ### Returns [Vector3](Vector3.html) - The current position of the vehicle. ``` ```APIDOC ## set Position ### Description Sets the position of the vehicle. ### Parameters * ##### position: [Vector3](Vector3.html) - The new position for the vehicle. ### Returns void ``` -------------------------------- ### NetworkId Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/Vehicle.html Gets the network ID of the vehicle. ```APIDOC ## NetworkId ### Description Gets the network ID of the vehicle. ### Method GET /NetworkId ### Endpoint /NetworkId ### Returns - **number**: The network ID of the vehicle. ``` -------------------------------- ### Create Vehicle and Enter as Driver (TypeScript) Source: https://github.com/nativewrappers/fivem-client/blob/master/README.md This snippet demonstrates how to create a vehicle and have the player's ped enter it as the driver. It uses the World.createVehicle and PlayerPed.setIntoVehicle methods. ```typescript import * as Cfx from '@nativewrappers/client'; RegisterCommand( 'adder', async (source: number, args: string[]) => { const vehicle = await Cfx.World.createVehicle( new Cfx.Model('adder'), new Cfx.Vector3(1, 2, 3), 4, ); Cfx.Game.PlayerPed.setIntoVehicle(vehicle, Cfx.VehicleSeat.Driver); }, false, ); ``` -------------------------------- ### MaxTraction Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/Vehicle.html Gets the maximum traction the vehicle has. ```APIDOC ## MaxTraction ### Description Gets the maximum traction the vehicle has. ### Method GET /MaxTraction ### Endpoint /MaxTraction ### Returns - **number**: The maximum traction. ``` -------------------------------- ### Camera Constructor Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/Camera.html Creates a new Camera instance. This is typically used internally by the SDK. ```APIDOC ## constructor ### Description Creates a new Camera instance. ### Parameters #### Path Parameters * **handle** (number) - Description: The handle of the camera. ### Returns * [Camera](Camera.html) ``` -------------------------------- ### Handle Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/Vehicle.html Gets the handle (identifier) of the entity. ```APIDOC ## get Handle ### Description Gets the handle (identifier) of the entity. ### Method GET ### Endpoint /entities/{id}/handle ``` -------------------------------- ### Static fromArgb Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/Color.html Creates a Color instance from its alpha, red, green, and blue components. ```APIDOC ## Static fromArgb ### Description Creates a Color instance from its alpha, red, green, and blue components. ### Parameters #### Path Parameters * **a** (number) - Required - Alpha component. * **r** (number) - Required - Red component. * **g** (number) - Required - Green component. * **b** (number) - Required - Blue component. ### Returns * [Color](Color.html) ``` -------------------------------- ### Doors Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/Vehicle.html Gets the collection of doors for the vehicle. ```APIDOC ## get Doors ### Description Gets the collection of doors for the vehicle. ### Method GET ### Endpoint /vehicles/{id}/doors ### Returns [VehicleDoorCollection](VehicleDoorCollection.html) ``` -------------------------------- ### Show Loading Prompt with Custom Text and Spinner Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/LoadingPrompt.html Illustrates using the show method to display a loading prompt with specific text and a chosen spinner type. The spinner type defaults to 'RegularClockwise' if not provided. ```typescript LoadingPrompt.show("Processing data...", LoadingSpinnerType.RegularClockwise); ``` -------------------------------- ### Language Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/Game.html Gets the current game language. ```APIDOC ## get Language() ### Description Gets the game language. ### Method GET ### Endpoint /Game/Language ### Returns [Language](../enums/Language.html) ``` -------------------------------- ### Lint and Build Project Source: https://github.com/nativewrappers/fivem-client/blob/master/DEVELOPMENT.md Check for linting errors and build the project using npm scripts. Ensure code quality before committing. ```bash npm run lint npm run build ``` -------------------------------- ### IsLoading Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/Game.html Get if a loading screen is active. ```APIDOC ## get IsLoading() ### Description Get if a loading screen is active. ### Method GET ### Endpoint /Game/IsLoading ### Returns boolean ``` -------------------------------- ### Scaleform.Handle Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/Scaleform.html Gets the handle of the Scaleform instance. ```APIDOC ## Handle ### Description Get the handle of the scaleform. ### Signature `get Handle(): number` ### Returns - number - The handle of the scaleform. ``` -------------------------------- ### Show and Hide Loading Prompt Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/LoadingPrompt.html Demonstrates how to show a loading prompt with custom text and then hide it after a delay. Ensure the LoadingPrompt is imported from '@nativewrappers/client/ui'. ```typescript import { LoadingPrompt } from '@nativewrappers/client/ui'; LoadingPrompt.show("Hello World"); setTimeout(() => { LoadingPrompt.hide(); }, 10000) ``` -------------------------------- ### Rotation Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/Camera.html Gets or sets the rotation of the camera. ```APIDOC ## get Rotation ### Description Gets the current rotation of the camera. ### Returns - **Vector3**: The current rotation of the camera. ``` ```APIDOC ## set Rotation(rotation: Vector3) ### Description Sets the rotation of the camera. ### Parameters - **rotation** (Vector3) - Required - The desired rotation for the camera. ### Returns - **void** ``` -------------------------------- ### Prop Constructor Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/Prop.html Creates a new Prop instance using its handle. ```APIDOC ## new Prop(handle: number) ### Description Creates a new Prop instance using its handle. ### Parameters #### Path Parameters - **handle** (number) - The handle of the prop entity. ### Returns - **Prop** - A new Prop instance. ``` -------------------------------- ### Position Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/Camera.html Gets or sets the position of the camera. ```APIDOC ## get Position ### Description Gets the current position of the camera. ### Returns - **Vector3**: The current position of the camera. ``` ```APIDOC ## set Position(position: Vector3) ### Description Sets the position of the camera. ### Parameters - **position** (Vector3) - Required - The desired position for the camera. ### Returns - **void** ``` -------------------------------- ### IButton Interface Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/interfaces/IButton.html Defines the properties for a button configuration. ```APIDOC ## Interface IButton ### Description Represents the configuration for a button, specifying its associated controls and display label. ### Properties #### controls - **Type**: `Control[]` - **Description**: An array of `Control` enums representing the input controls associated with the button. - **Defined in**: [ui/interfaces/IButton.ts:4](https://github.com/AvarianKnight/native-wrappers-client/blob/94ddabf/src/ui/interfaces/IButton.ts#L4) #### label - **Type**: `string` - **Description**: The text label to be displayed for the button. - **Defined in**: [ui/interfaces/IButton.ts:5](https://github.com/AvarianKnight/native-wrappers-client/blob/94ddabf/src/ui/interfaces/IButton.ts#L5) ``` -------------------------------- ### ForwardVector Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/Camera.html Gets the forward vector of the camera. ```APIDOC ## get ForwardVector ### Description Gets the forward vector of the camera. ### Returns - **Vector3**: The forward vector of the camera. ``` -------------------------------- ### LoadingPrompt.show Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/LoadingPrompt.html Shows a loading prompt with optional text and spinner type. This is a static method that can be called directly on the LoadingPrompt class. ```APIDOC ## Static show * show(loadingText?: string, spinnerType?: LoadingSpinnerType): void Shows a loading prompt. ### Parameters * ##### loadingText: string = '' Text to be displayed inside loading prompt. * ##### spinnerType: LoadingSpinnerType = LoadingSpinnerType.RegularClockwise Type of spinner. ### Returns * void ``` -------------------------------- ### constructor Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/VehicleDoorCollection.html Initializes a new instance of the VehicleDoorCollection class. ```APIDOC ## constructor ### Description Initializes a new instance of the VehicleDoorCollection class. ### Parameters #### Path Parameters - **owner** (Vehicle) - Required - The vehicle this collection belongs to. ### Returns - **VehicleDoorCollection** - A new instance of VehicleDoorCollection. ``` -------------------------------- ### Camera.handle Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/Camera.html Gets the internal handle of the camera. ```APIDOC ## handle ### Description Gets the internal handle of the camera. ### Returns * number ``` -------------------------------- ### startScenario Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/Tasks.html Starts a scenario for the character at a specified position and heading. Optional duration, sitting scenario, and teleportation flags can be provided. ```APIDOC ## startScenario ### Description Starts a scenario for the character at a specified position and heading. Optional duration, sitting scenario, and teleportation flags can be provided. ### Method startScenario ### Parameters #### Path Parameters * **name**: string - Description of the scenario name. * **position**: [Vector3](Vector3.html) - The position where the scenario should start. * **heading**: number - Optional. The heading for the scenario. Defaults to 0. * **duration**: number - Optional. The duration of the scenario in milliseconds. Defaults to 0. * **sittingScenario**: boolean - Optional. Whether the scenario involves sitting. Defaults to false. * **teleport**: boolean - Optional. Whether to teleport the character to the position. Defaults to true. ### Returns void ``` -------------------------------- ### IsOnFoot Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/Ped.html Gets whether the Ped is currently on foot. ```APIDOC ## get IsOnFoot(): boolean ### Description Gets whether the Ped is currently on foot. ### Returns * **boolean**: True if the Ped is on foot, false otherwise. ``` -------------------------------- ### World.createProp Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/World.html Spawns a Prop at the given position with specified model, physics, ground placement, and network status. ```APIDOC ## World.createProp ### Description Spawns a [`Prop`](Prop.html) at the given position. ### Method `createProp` ### Parameters * **model**: [Model](Model.html) - The [`Model`](Model.html) to spawn (must be a Prop). * **position**: [Vector3](Vector3.html) - Location of Prop. * **dynamic**: boolean - If set to true, the Prop will have physics otherwise it's static. * **placeOnGround**: boolean - If set to true, sets the Prop on the ground nearest to position. * **isNetwork**: boolean (Optional, defaults to true) - ### Returns Promise tags for type checking. ```javascript /// /// const Cfx = require('@nativewrappers/client'); RegisterCommand( 'adder', async (source, args) => { const vehicle = await Cfx.World.createVehicle( new Cfx.Model('adder'), new Cfx.Vector3(1, 2, 3), 4, ); Cfx.Game.PlayerPed.setIntoVehicle(vehicle, Cfx.VehicleSeat.Driver); }, false, ); ``` -------------------------------- ### EngineHealth Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/Vehicle.html Gets or sets the engine health of the vehicle. ```APIDOC ## get EngineHealth ### Description Gets the current engine health of the vehicle. ### Method GET ### Endpoint /vehicles/{id}/engineHealth ``` ```APIDOC ## set EngineHealth ### Description Sets the engine health of the vehicle. ### Method PUT ### Endpoint /vehicles/{id}/engineHealth ### Parameters #### Request Body - **value** (number) - Required - The new engine health value. ``` -------------------------------- ### UIMenuSeparatorItem Constructor Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/UIMenuSeparatorItem.html Initializes a new instance of the UIMenuSeparatorItem class. Optionally accepts a string for the text displayed with the separator. ```APIDOC ## constructor ### Description Initializes a new instance of the UIMenuSeparatorItem class. ### Method constructor ### Parameters #### Optional Parameters * **text** (string) - The text to display with the separator. ### Returns * [UIMenuSeparatorItem] - A new instance of the UIMenuSeparatorItem class. ``` -------------------------------- ### Acceleration Accessor Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/Vehicle.html Gets the current acceleration of the vehicle. ```APIDOC ## get Acceleration(): number ### Description Gets the current acceleration of the vehicle. ### Returns * **number** - The acceleration value of the vehicle. ``` -------------------------------- ### Notification Constructor Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/Notification.html Initializes a new Notification instance with a given handle. ```APIDOC ## constructor ### Description Initializes a new Notification instance. ### Parameters #### Path Parameters - **handle** (number) - Required - The handle for the notification. ``` -------------------------------- ### LicensePlateType Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/VehicleModCollection.html Gets the license plate type for the vehicle. ```APIDOC ## LicensePlateType ### Description Gets the license plate type for the vehicle. ### Method GET /LicensePlateType ### Endpoint /vehicles/{id}/mod/licensePlateType ### Response #### Success Response (200) - **licensePlateType** (LicensePlateType) - The current license plate type. ``` -------------------------------- ### DividerColor Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/UIMenuSliderItem.html Gets or sets the divider color of the UIMenuSliderItem. ```APIDOC ## DividerColor ### Description Gets or sets the divider color of the UIMenuSliderItem. ### Method GET / DividerColor SET / DividerColor ### Parameters #### Set Parameters - **value** (Color) - Required - The color to set the divider to. ### Response #### Success Response (GET) - **DividerColor** (Color) - The current divider color of the item. #### Success Response (SET) void ``` -------------------------------- ### UIMenuSeparatorItem Methods Source: https://github.com/nativewrappers/fivem-client/blob/master/docs/classes/UIMenuSeparatorItem.html Lists the methods available for UIMenuSeparatorItem, including inherited methods from UIMenuItem. ```APIDOC ## Methods ### addEvent * Description: Adds an event listener to the item. * Inherited from: [UIMenuItem](UIMenuItem.html) ### addPanel * Description: Adds a UI menu panel to the item. * Inherited from: [UIMenuItem](UIMenuItem.html) ### badgeToColor * Description: Converts a badge identifier to its corresponding color. * Inherited from: [UIMenuItem](UIMenuItem.html) ### badgeToTextureName * Description: Converts a badge identifier to its texture name. * Inherited from: [UIMenuItem](UIMenuItem.html) ### draw * Description: Draws the menu item. * Inherited from: [UIMenuItem](UIMenuItem.html) ### findPanelIndex * Description: Finds the index of a UI menu panel. * Inherited from: [UIMenuItem](UIMenuItem.html) ### fireEvent * Description: Fires a specific event associated with the item. * Inherited from: [UIMenuItem](UIMenuItem.html) ### formatDescription * Description: Formats the description text for display. * Inherited from: [UIMenuItem](UIMenuItem.html) ### removePanel * Description: Removes a UI menu panel from the item. * Inherited from: [UIMenuItem](UIMenuItem.html) ### setVerticalPosition * Description: Sets the vertical position of the menu item. * Inherited from: [UIMenuItem](UIMenuItem.html) ### badgeToTextureDict * Description: Converts a badge identifier to its texture dictionary name. * Inherited from: [UIMenuItem](UIMenuItem.html) ### getBadgeSize * Description: Gets the size of the badge. * Inherited from: [UIMenuItem](UIMenuItem.html) ### getBadgeSpriteHeightOffset * Description: Gets the height offset for the badge sprite. * Inherited from: [UIMenuItem](UIMenuItem.html) ### getBadgeSpriteWidthOffset * Description: Gets the width offset for the badge sprite. * Inherited from: [UIMenuItem](UIMenuItem.html) ```