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

# Client

> Client functions your framework adapter must provide.

The client adapter lives in `client/custom/framework/<name>/core.lua`. Copy `standalone` to start, then change the guard at the top:

```lua client/custom/framework/custom/core.lua theme={null}
if Bridge.Framework.Provider ~= 'custom' then
    return
end
```

> [!NOTE]
>
> Set up the server side first. See [Server](https://docs.redutzu.com/redutzu-mdt/guides/custom-framework/server.md).

## IsPlayerLoaded

Whether the character is loaded. The MDT won't open while this is `false`.

```lua theme={null}
Bridge.Framework.IsPlayerLoaded = true
```

Set it to `true` when your framework finishes loading the character, and back to `false` on logout.

## IsPedMale

```lua theme={null}
---@return boolean
function Bridge.Framework.IsPedMale()
    return IsPedMale(PlayerPedId())
end
```

Returns `true` if the character is male.

## IsOpenable

```lua theme={null}
---@return boolean
function Bridge.Framework.IsOpenable()
    return true
end
```

Returns `true` if the player can open the MDT right now. Return `false` while dead, handcuffed, or in any state where your framework blocks UI.

## Notify

```lua theme={null}
---@param message string
---@param type 'success'|'error'|'info'|'warning'
function Bridge.Framework.Notify(message, type)
    lib.notify({ description = message, type = type })
end
```

Shows a notification. Returns nothing. Map `type` to your notification system's own types if they differ.

## Client events

The server adapter triggers these on the client. You don't handle them, just make sure they're sent.

| Event | When |
| - | - |
| `redutzu-mdt:client:on-player-load` | The character finished loading. |
| `redutzu-mdt:client:on-player-unload` | The character logged out. |
| `redutzu-mdt:client:on-job-change` | The job or grade changed. |


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