> For the complete documentation index, see [llms.txt](https://docs.devm.cc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devm.cc/bridge/client-side.md).

# Client-Side

### 🔁 Framework Exports (Client)

#### `GetPlayerData()`

```lua
local data = exports['devm-bridge']:GetPlayerData()
```

#### `DeleteVehicle(vehicle)`

```lua
exports['devm-bridge']:DeleteVehicle(vehicle)
```

#### `GetClosestPed(coords, modelFilter)`

```lua
local ped = exports['devm-bridge']:GetClosestPed(coords)
```

#### `GetClosestPlayer(coords)`

```lua
local ply, dist = exports['devm-bridge']:GetClosestPlayer(coords)
```

#### `GetClosestVehicle(coords)`

```lua
local veh = exports['devm-bridge']:GetClosestVehicle()
```

#### `GetVehicles()`

```lua
local all = exports['devm-bridge']:GetVehicles()
```

#### `SetVehicleProperties(vehicle, props)`

```lua
exports['devm-bridge']:SetVehicleProperties(vehicle, {
    plate = "DEV M"
})
```

***

### 🎯 Targeting System (Client)

#### `addLocalEntity(object, data)`

```lua
exports['devm-bridge']:addLocalEntity(entity, {
    label = 'Open',
    icon = 'fa-solid fa-box',
    onSelect = function() print("Opened") end
})
```

#### `addModel(model, data)`

```lua
exports['devm-bridge']:addModel(`prop_chair_01`, {
    label = 'Sit',
    icon = 'fa-solid fa-chair',
    onSelect = function() end
})
```

#### `addGlobalPlayer(data)`

```lua
exports['devm-bridge']:addGlobalPlayer({
    label = 'Check ID',
    icon = 'fa-solid fa-id-card',
    onSelect = function() end
})
```

#### `disableTarget(state)`

```lua
exports['devm-bridge']:disableTarget(true)
```

***

### 👕 Clothing System (Client)

#### `setPlayerComponentVariation(player, componentId, drawableId, textureId?, paletteId?)`

Unified method to set clothing based on the configured system:

```lua
exports['devm-bridge']:setPlayerComponentVariation(PlayerPedId(), 6, 1, 0)
```

Behavior:

* **illenium**: Uses `setPedComponent()`
* **native**: Direct `SetPedComponentVariation`
* **skinchanger**: Uses native + triggers relevant `skinchanger:change` events

***

### 📣 Synced Events (Client)

These wrap base framework events and redirect them to `devm-bridge` equivalents.

#### `devm-bridge:onPlayerDeath`

| Framework | Original Event                   |
| --------- | -------------------------------- |
| ESX       | `esx:onPlayerDeath`              |
| QBCore    | `hospital:server:SetDeathStatus` |

```lua
AddEventHandler('devm-bridge:onPlayerDeath', function(data)
    -- your code
end)
```

***

#### `devm-bridge:playerLoaded`

| Framework    | Original Event                 |
| ------------ | ------------------------------ |
| ESX          | `esx:playerLoaded`             |
| QBCore / QBX | `QBCore:Client:OnPlayerLoaded` |

```lua
AddEventHandler('devm-bridge:playerLoaded', function(xPlayer, isNew, skin)
    -- your code
end)
```

> `xPlayer`, `isNew`, and `skin` are only passed in **ESX**.

***

### ✅ Notes

* Everything here is **client-side only**.
* All systems auto-detect based on `Framework`, `Target`, and `Clothing` values.
* Use `TriggerEvent('devm-bridge:...')` instead of framework-specific events.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.devm.cc/bridge/client-side.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
