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

# Client Exports

Open the PC from your own scripts, such as a laptop item, a phone app or an admin menu.

> [!WARNING]
>
> Paid and state-changing actions only work near a City Hall (`Config.Security.location`). To open the PC somewhere else, use the **server** export [`openCityHall`](https://docs.aps-store.com/assets/aps_cityhall/developer-api/server-exports#opencityhall), or set `location.enabled = false`.

### OpenCityHall

Opens the City Hall PC for the local player.

```lua theme={null}
exports['aps_cityhall']:OpenCityHall()
```

### CloseCityHall

Closes the PC if it is open.

```lua theme={null}
exports['aps_cityhall']:CloseCityHall()
```

### IsCityHallOpen

Returns whether the PC is open.

```lua theme={null}
---@return boolean
local isOpen = exports['aps_cityhall']:IsCityHallOpen()
```

### getTaxAmount

Calculates the tax for an amount, using a rate path from `Config.Taxes` (same as vms\_cityhall).

```lua theme={null}
---@param amount number
---@param taxPath string: e.g. 'products.food', 'tuning', 'gym.membership'
---@return number total, number tax, number percent
local total, tax, percent = exports['aps_cityhall']:getTaxAmount(250, 'products.food')
```

***

## Events

### aps\_cityhall:open

Opens the PC, the same as `OpenCityHall()`.

```lua theme={null}
TriggerEvent('aps_cityhall:open')
```

> [!NOTE]
>
> Set `Config.Features.npc = false` if players should only reach the PC through your own script.


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