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

# Client Exports

Client functions of the Striga Core API.

```lua
local Core = exports['striga-core']:GetCore()
```

## Player

| Function                      | Returns                                                                       |
| ----------------------------- | ----------------------------------------------------------------------------- |
| `isReady()`                   | Core is ready                                                                 |
| `isLoggedIn()`                | Player is in game with a character                                            |
| `getProfile()`                | `{ charId, firstname, lastname, birthdate, gender, phone, money, job, gang }` |
| `getCharId()` / `getName()`   | Character id / first and last name                                            |
| `getMoney(account)`           | Money in that account                                                         |
| `getJob()` / `getGang()`      | `{ name, label, onDuty, isBoss, grade = { level, name, label } }`             |
| `getMetadata(key)`            | Framework metadata value (e.g. `stress`)                                      |
| `getNeeds()`                  | `{ hunger, thirst, stress }`, 0 to 100                                        |
| `framework()` / `inventory()` | Name of the active system                                                     |
| `getStaff()`                  | Staff info, for UI only (check on the server)                                 |

## Inventory

| Function                                                               | Returns                                                        |
| ---------------------------------------------------------------------- | -------------------------------------------------------------- |
| `getItems()`                                                           | List of `{ name, label, count, slot, weight, metadata }`       |
| `getItemCount(item)` / `hasItem(item, count?, metadata?)`              | Count / boolean                                                |
| `getItemLabel(item)` / `getItemData(item)`                             | Label / `{ label, weight, description, unique, useable, ... }` |
| `inventoryWeight()` / `inventoryMaxWeight()` / `inventoryFreeWeight()` | Weight                                                         |
| `getItemImage(item)`                                                   | `nui://` image URL for your NUI                                |
| `isInventoryOpen()` / `useSlot(slot)`                                  | Boolean                                                        |

## UI

| Group     | Functions                                                                                       |
| --------- | ----------------------------------------------------------------------------------------------- |
| Notify    | `notify(text, type?, duration?)` or `notify({ title, description, type, duration, icon, ... })` |
| Text UI   | `showTextUI(text, { key = 'E' })`, `updateTextUI(text)`, `hideTextUI(force?)`, `isTextUIOpen()` |
| Help text | `helpNotify(text, duration?)`                                                                   |

Notifications go to the system set in `notify`, text UI to the one set in `textui`. See [Notify](/docs/striga-core/integration/notify.md) and [Text UI](/docs/striga-core/integration/text-ui.md).

## Callbacks, vehicle, voice

| Function                  | Notes                                                       |
| ------------------------- | ----------------------------------------------------------- |
| `callback(name, cb, ...)` | Calls a server callback from `registerCallback`             |
| `getFuel(vehicle)`        | 0 to 100. See [Fuel](/docs/striga-core/integration/fuel.md) |
| `getVoice()`              | pma-voice state                                             |
| `getWeaponLabel(hash)`    | Weapon name                                                 |

## Settings and theme

The API table also has the settings hub and theme functions (`registerSettings`, `unregisterSettings`, `getSettingsProviders`, `setProviderSettings`, `previewProvider`, `resetProvider`, `notifySettingsChanged`, `setTheme`, `getTheme`). They work before core is ready. See [Settings Hub & Theme](/docs/striga-core/settings-hub-and-theme.md).

## Language

The server language is set in `config.json` (`"locale"`) and with `/strigalocale`. Core reads **your** resource's `editable/locales/<code>.json` (the calling resource). `code` is optional: without it the active language is used.

| Export                            | Returns                                                                                                                      |
| --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| `GetLocale()`                     | Active code, e.g. `'tr'`                                                                                                     |
| `LocaleText(key, params?, code?)` | `game[key]`, then English `game[key]`, then the key. `{name}` is filled from `params`; without params you get the raw string |
| `LocaleUi(path, code?)`           | Dotted lookup in `ui` (`'settings.title'`), string or table, English fallback                                                |
| `LocaleFiles(code?)`              | `localeRaw, fallbackRaw`: raw JSON of `<code>.json` and `en.json`, for your NUI                                              |
| `GetLocales()`                    | Array of codes that exist for your resource                                                                                  |

```lua
local text = exports['striga-core']:LocaleText('welcome', { name = 'Alex' })  -- "Welcome {name}" -> "Welcome Alex"
local title = exports['striga-core']:LocaleUi('settings.title')
```

A missing `<code>.json` prints one console warning and English is used. Listen to the [locale events](/docs/striga-core/events.md) to refresh your texts when the language changes.

## Example

```lua
Core.callback('my-shop:getPrice', function(price)
    if price then Core.notify(('Price: $%s'):format(price)) end
end, 'water_bottle')

Core.showTextUI('Open shop', { key = 'E' })
Core.hideTextUI()
```

{% content-ref url="/pages/jE3SyzHTVPkjN81mDZ4I" %}
[Events](/docs/striga-core/events.md)
{% endcontent-ref %}


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://striga.gitbook.io/docs/striga-core/exports/client-exports.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
