> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aps-store.com/llms.txt
> Use this file to discover all available pages before exploring further.

# config.client.lua

Client-only: notification function and client hooks.

> [!NOTE]
>
> Runs on: **client**. This file stays editable when the resource is escrow-protected. Restart the resource after editing.

`config/config.client.lua` — notifications and client hooks.

## Notifications

By default this follows `Config.Settings.notifyType`. Replace the body to use any notification system. `ntype` is `'success'`, `'error'`, `'info'` or `'warning'`.

```lua theme={null}
Config.Notify = function(msg, ntype)
    Bridge.Notify(msg, ntype)
    -- e.g. exports['okokNotify']:Alert('City Hall', msg, 5000, ntype)
end
```

Client hooks are documented on the [Hooks](https://docs.aps-store.com/assets/aps_cityhall/developer-api/hooks.md) page.

Client hooks are listed on the [Hooks](https://docs.aps-store.com/assets/aps_cityhall/developer-api/hooks.md) page.

***

## Full View

Preview File Updated: 3.7.0 - 02.11.2026

```lua config/config.client.lua lines expandable theme={null}
-- ─────────────────────────────────────────────
--  Notification handler
--
--  By default this uses Config.Settings.notifyType
--  ('auto' | 'esx' | 'qb' | 'ox_lib' | 'vms_notifyv2' | 'okokNotify').
--  Replace the body to use any other notification library, e.g.:
--    exports['mythic_notify']:DoHudText(ntype, msg)
--  Available ntype values: 'success' | 'error' | 'info' | 'warning'
-- ─────────────────────────────────────────────
Config.Notify = function(msg, ntype)
    Bridge.Notify(msg, ntype)
end

-- ─────────────────────────────────────────────
--  Client hooks — for visual feedback only (notifications, sounds…).
--  A cheater can run these functions themselves, so NEVER give items,
--  money or licenses here. Use the server hooks in config.server.lua.
-- ─────────────────────────────────────────────

-- ─────────────────────────────────────────────
--  Hook: called client-side after a player earns a license
--  licenseId  string — e.g. 'car', 'pilot'
-- ─────────────────────────────────────────────
Config.OnLicenseEarned = function(licenseId)
    -- Config.Notify('Your new license is in your wallet.', 'success')
end

-- ─────────────────────────────────────────────
--  Hook: called client-side after a player orders a document
--  docTypeId    string — document type id
--  validityDays number — chosen validity in days
-- ─────────────────────────────────────────────
Config.OnDocumentOrdered = function(docTypeId, validityDays)
    -- PlaySoundFrontend(-1, 'PURCHASE', 'HUD_LIQUOR_STORE_SOUNDSET', false)
end

-- ─────────────────────────────────────────────
--  Hook: called client-side after a player buys vehicle insurance
--  plate        string — vehicle plate
--  model        string — vehicle model name (e.g. 'adder')
--  days         number — validity days purchased
--  pricePaid    number — amount deducted from bank
-- ─────────────────────────────────────────────
Config.OnInsurancePurchased = function(plate, model, days, pricePaid)
    -- Config.Notify('Insurance purchased for ' .. plate, 'success')
end

-- ─────────────────────────────────────────────
--  Hook: called client-side after a player pays a bill
--  billId    number — bill row id
--  billType  string — 'invoice' | 'ticket' | 'traffic-ticket' | 'receipt'
--  amount    number — amount paid
-- ─────────────────────────────────────────────
Config.OnBillPaid = function(billId, billType, amount)
    -- Config.Notify('Bill #' .. billId .. ' paid: $' .. amount, 'success')
end
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.