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

# Commands and exports

Commands, the admin tab, exports and events in ALT0 Boosting.

## Commands

| Command                                                   | Who                     | What                                                                                                            |
| --------------------------------------------------------- | ----------------------- | --------------------------------------------------------------------------------------------------------------- |
| `/boosting`                                               | Players with the tablet | Open the boosting tablet. Rename or turn it off with `Tablet.Command`; add a default key with `Tablet.Keybind`. |
| `/testhack <hex\|freq\|circuit\|memory\|1-5> [bandwidth]` | Admins                  | Open the tablet in minigame test mode (`/hacktest` works too)                                                   |

Using the Boosting Tablet item also opens the tablet.

## Admin tab

Admins (see [Customization → Admins](/alt0-docs/alt0-boosting/customization.md#admins)) get an **Admin** tab in the tablet to generate contracts, add or set XP and crypto, and restock the black market. Admin actions are written to the `alt0_boosting_admin_logs` table and to the `AdminLogs` webhook.

## Client exports

```lua
exports['alt0-boosting']:openTablet()
local isOpen = exports['alt0-boosting']:isTabletOpen() -- true / false
```

## Server exports

```lua
-- a player's boosting profile
local data = exports['alt0-boosting']:getPlayerData(source)
-- { alias, profile_picture, experience, crypto, total_contracts, wanted_level, current_class }

local balance = exports['alt0-boosting']:getCrypto(source)
exports['alt0-boosting']:addCrypto(source, amount)
local ok = exports['alt0-boosting']:removeCrypto(source, amount) -- true when the player had enough

exports['alt0-boosting']:addXP(source, amount)
local class = exports['alt0-boosting']:getPlayerClass(source)    -- 'D', 'C', 'B', 'A' or 'S'

exports['alt0-boosting']:OpenTablet(source)                      -- open a player's tablet from the server
```

## Events

When a contract is delivered, each squad member's client receives:

```lua
RegisterNetEvent('alt0-boosting:client:contractCompleted', function(cash, crypto) end)
```

Contracts fail on their own when their car is deleted. To fail one right away from a police or impound script, trigger this **on the server**:

```lua
TriggerEvent('alt0-boosting:server:vehicleImpounded', nil, plate)  -- by plate
TriggerEvent('alt0-boosting:server:vehicleImpounded', contractId)  -- or by contract id
```

From a client it is only accepted for on-duty police.
