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

# Client

### Client Exports

The following exports are **client-side only**:

```
OpenProfile
OpenAdmin
```

Both exports use the same validated opening flow as `/cs` and `/csadmin`. Job restrictions, ACE access, database readiness, and admin permissions are still checked by the server.

#### `OpenProfile`

**Side:** Client\
**Parameters:** None\
**Returns:** `true` when the panel opens, otherwise `false`

```lua
local opened = exports['tg-cornerselling']:OpenProfile()

if not opened then
    print('The Corner Selling profile could not be opened.')
end
```

#### `OpenAdmin`

**Side:** Client\
**Parameters:** None\
**Returns:** `true` when the admin panel opens, otherwise `false`

```lua
local opened = exports['tg-cornerselling']:OpenAdmin()

if not opened then
    print('The Corner Selling admin panel could not be opened.')
end
```

Players without admin permission receive the normal permission error and the panel does not open.

#### ox\_lib radial menu example

Add this to a client file in the resource that manages your radial menu. That resource must load `@ox_lib/init.lua`.

```lua
lib.addRadialItem({
    {
        id = 'tg_cornerselling_profile',
        label = 'Street Profile',
        icon = 'user',
        onSelect = function()
            exports['tg-cornerselling']:OpenProfile()
        end
    },
    {
        id = 'tg_cornerselling_admin',
        label = 'Corner Selling Admin',
        icon = 'shield-halved',
        onSelect = function()
            exports['tg-cornerselling']:OpenAdmin()
        end
    }
})
```

The admin option can be omitted from the radial menu for normal players. Keeping it visible does not bypass server permission validation.
