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

# Commands & Permissions

## Player command

The marketplace is normally opened by walking up to the NPC. An optional chat command is available as well, disabled by default:

```lua
Config.UI = {
    enableCommand = false,          -- set to true to enable the command
    openCommand   = 'marketplace',  -- /marketplace
}
```

When enabled, `/marketplace` opens the **nearest** location — but only if the player is within `Config.Security.maxDistance` of it. Further away they get the "too far away" notification, so the command cannot be used to trade from anywhere on the map.

Press **ESC** to close the UI.

## Admin command

`/marketplaceadmin` is the moderation command. It is protected by an ACE, so it does nothing for players who were not granted it.

```cfg
add_ace group.admin command.marketplaceadmin allow
```

{% hint style="warning" %}
Without this line the command is refused for everyone in game. It always works from the server console.
{% endhint %}

| Command                                     | What it does                                                                                                       |
| ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| `/marketplaceadmin listing <id>`            | Cancels a listing. The remaining items go back to the seller and every open offer on it is refunded.               |
| `/marketplaceadmin auction <id>`            | Cancels an auction. The item goes back to the seller and the held bid is refunded to the current bidder.           |
| `/marketplaceadmin buyorder <id>`           | Cancels a buy order. The remaining escrow is refunded to the buyer.                                                |
| `/marketplaceadmin deliveries <identifier>` | Lists the items waiting in the delivery depot for that player, with row id, quantity, item and where it came from. |

`<id>` is the numeric id shown in the UI and in the Discord logs. `<identifier>` is the framework identifier (citizenid on QB/QBX, identifier on ESX).

If the returned items do not fit in the seller's inventory — or they are offline — the items go into their delivery depot instead of being lost.

Every admin action is written to `Config.Webhooks.admin` when that webhook is filled in.

## Example

```
> marketplaceadmin listing 412
Listing #412 cancelled, 25x Iron returned to the seller.

> marketplaceadmin deliveries ABC12345
2 pending delivery row(s) for ABC12345.
  #88 25x Iron (admin_cancel)
  #91 1x Lockpick (listing_expired)
```

## Next steps

* [Exports](/daddy-studios-docs/scripts/daddy-marketplace/exports.md) — open the marketplace from a phone or menu
* [Security](/daddy-studios-docs/scripts/daddy-marketplace/configuration/security.md) — distance checks and rate limits


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://daddy-studios.gitbook.io/daddy-studios-docs/scripts/daddy-marketplace/commands-and-permissions.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
