> For the complete documentation index, see [llms.txt](https://zloma-scripts.gitbook.io/zloma-scripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://zloma-scripts.gitbook.io/zloma-scripts/zloma_core-free/api-reference/client-exports.md).

# Client Exports

All client exports are called via `exports['zloma_core']`.

***

## Notifications

### Notify

```lua
exports['zloma_core']:Notify(message, type, duration)
```

| Param    | Type   | Description                                   |
| -------- | ------ | --------------------------------------------- |
| message  | string | Notification text                             |
| type     | string | `'success'`, `'error'`, `'info'`, `'warning'` |
| duration | number | Duration in milliseconds (default: 5000)      |

Works with all 15 supported notification systems. Falls back to GTA native notifications if none detected.

***

### NotifyAdvanced

```lua
exports['zloma_core']:NotifyAdvanced(title, message, type, duration)
```

| Param    | Type   | Description                                   |
| -------- | ------ | --------------------------------------------- |
| title    | string | Notification title                            |
| message  | string | Notification text                             |
| type     | string | `'success'`, `'error'`, `'info'`, `'warning'` |
| duration | number | Duration in milliseconds                      |

> Note: Not all notification systems support titles. Falls back to regular `Notify` with the message if titles aren't supported.

***

## Appearance

### GetAppearanceSystem

```lua
local system = exports['zloma_core']:GetAppearanceSystem()
```

Returns the detected appearance resource name or `nil`.

***

### GetCurrentSkin

```lua
local skin = exports['zloma_core']:GetCurrentSkin()
```

Returns the current player skin payload when the active appearance resource supports it.

***

### SetPlayerSkin

```lua
local success = exports['zloma_core']:SetPlayerSkin(skinData)
```

Applies a full appearance payload with the detected appearance system.

***

### SetPlayerClothing

```lua
local success = exports['zloma_core']:SetPlayerClothing(clothingData)
```

Applies clothing-only data with the detected appearance system.

***

### OpenWardrobe

```lua
local opened = exports['zloma_core']:OpenWardrobe({
    title = 'Wardrobe'
})
```

Opens the wardrobe or saved outfit UI for the active appearance resource.

***

## Vehicle Keys

### GiveKeys

```lua
local success = exports['zloma_core']:GiveKeys(plate, vehicleEntity)
```

| Param         | Type              | Description           |
| ------------- | ----------------- | --------------------- |
| plate         | string            | Vehicle plate number  |
| vehicleEntity | number (optional) | Vehicle entity handle |
| **Returns**   | boolean           | true if successful    |

***

### RemoveKeys

```lua
local success = exports['zloma_core']:RemoveKeys(plate, vehicleEntity)
```

| Param         | Type              | Description           |
| ------------- | ----------------- | --------------------- |
| plate         | string            | Vehicle plate number  |
| vehicleEntity | number (optional) | Vehicle entity handle |
| **Returns**   | boolean           | true if successful    |

***

### HasKeys

```lua
local hasKeys = exports['zloma_core']:HasKeys(plate)
```

| Param       | Type        | Description                                                   |
| ----------- | ----------- | ------------------------------------------------------------- |
| plate       | string      | Vehicle plate number                                          |
| **Returns** | boolean/nil | true/false, or nil if the key system doesn't support checking |

> Some key systems don't expose a "has keys" check. Returns `nil` in those cases.

***

## Target System

### AddEntity

Add target options to a specific entity (vehicle, ped, object).

```lua
local success = exports['zloma_core']:AddEntity(entity, options)
```

| Param   | Type   | Description            |
| ------- | ------ | ---------------------- |
| entity  | number | Entity handle          |
| options | table  | Array of option tables |

**Option format:**

```lua
{
    name = 'unique_name',        -- Unique identifier
    icon = 'fas fa-wrench',      -- FontAwesome icon
    label = 'Repair Vehicle',    -- Display text
    action = function(entity)    -- Callback on select
        -- your code
    end,
    canInteract = function(entity) -- Optional condition
        return true
    end,
    distance = 3.0               -- Interaction distance
}
```

***

### AddBoxZone

```lua
local success = exports['zloma_core']:AddBoxZone(name, coords, options)
```

| Param   | Type    | Description          |
| ------- | ------- | -------------------- |
| name    | string  | Unique zone name     |
| coords  | vector3 | Zone center position |
| options | table   | Zone config          |

**Options:**

```lua
{
    size = vec3(5, 5, 3),       -- Zone dimensions
    heading = 0,                 -- Rotation
    debugPoly = false,           -- Show debug outline
    targetOptions = { ... }      -- Same format as AddEntity options
}
```

***

### AddSphereZone

```lua
local success = exports['zloma_core']:AddSphereZone(options)
```

***

### AddGlobalVehicle

Add target options to **all vehicles** globally.

```lua
local success = exports['zloma_core']:AddGlobalVehicle(options)
```

***

### RemoveZone

```lua
local success = exports['zloma_core']:RemoveZone(name)
```

| Param       | Type    | Description         |
| ----------- | ------- | ------------------- |
| name        | string  | Zone name to remove |
| **Returns** | boolean | true if successful  |

***

### SetTargetingEnabled

```lua
local success = exports['zloma_core']:SetTargetingEnabled(false)
```

Temporarily enables or disables targeting when the active target resource supports it.

***

### RemoveEntity

```lua
local success = exports['zloma_core']:RemoveEntity(entity, optionNames)
```

***

## Fuel

### GetVehicleFuel

```lua
local fuel = exports['zloma_core']:GetVehicleFuel(vehicle)
```

| Param       | Type   | Description              |
| ----------- | ------ | ------------------------ |
| vehicle     | number | Vehicle entity handle    |
| **Returns** | number | Fuel level (0.0 - 100.0) |

Falls back to native `GetVehicleFuelLevel` if no fuel system detected.

***

### SetVehicleFuel

```lua
exports['zloma_core']:SetVehicleFuel(vehicle, fuelLevel)
```

| Param     | Type   | Description                     |
| --------- | ------ | ------------------------------- |
| vehicle   | number | Vehicle entity handle           |
| fuelLevel | number | Fuel level to set (0.0 - 100.0) |

***

### GetFuelSystem

```lua
local system = exports['zloma_core']:GetFuelSystem()
-- Returns: 'lc_fuel', 'ox_fuel', nil, etc.
```

***

## Inventory (Client)

### GetInventory

Get the player's full inventory client-side:

```lua
local items = exports['zloma_core']:GetInventory()
```

\| **Returns** | table | Array of item objects |

> Availability depends on inventory system. Some systems don't expose client-side inventory access.

***

### HasItem

Check if the player has an item client-side:

```lua
local has = exports['zloma_core']:HasItem(item, count)
```

| Param       | Type    | Description                         |
| ----------- | ------- | ----------------------------------- |
| item        | string  | Item name                           |
| count       | number  | Minimum count (default: 1)          |
| **Returns** | boolean | true if player has >= count of item |

***

## Target Info

### GetTargetSystem

```lua
local system = exports['zloma_core']:GetTargetSystem()
-- Returns: 'ox_target', 'qb-target', 'qtarget', or nil
```

***

## Player Info (Client)

### IsAdmin

```lua
local isAdmin = exports['zloma_core']:IsAdmin(groups)
```

Calls server via callback — secure, doesn't trust client.

| Param       | Type             | Description     |
| ----------- | ---------------- | --------------- |
| groups      | table (optional) | Groups to check |
| **Returns** | boolean          | true if admin   |

***

### GetPlayerJob

```lua
local job = exports['zloma_core']:GetPlayerJob()
```

Client-side callback to server.

***

### GetPlayerGang

```lua
local gang = exports['zloma_core']:GetPlayerGang()
```

Client-side callback to server. QBCore/QBox only.


---

# 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:

```
GET https://zloma-scripts.gitbook.io/zloma-scripts/zloma_core-free/api-reference/client-exports.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
