# Permissions

## In-game Permissions

In game permissions are handled via the database and can be managed in game via the admin menu. This allows for easy configuration and addition/removal of player permissions.

### Adding your first user

Unfortunately the first player to require permissions will need to be manually added to the `permissions`  table. The table layout is pretty clear and you'll need your steam and license identifiers to fill this out however the permission column must be a specific format. You can directly copy the snippet below and paste it into the column:

```json
{"dev":"god","live":"god"}
```

Once you've inserted this and restarted the server you'll have full permissions for every TMC command there is.

### Adding other users

<figure><img src="/files/lFTpIIqA8CJ0OdGMPJTy" alt=""><figcaption></figcaption></figure>

Adding other users is as simple as using the `/admin` menu and finding the `Set Permission` option. You can then select from the available permission levels. Most commands have their permission levels defined in `utils/config.lua` so you can adjust them to suit your staffing needs.

### Server type support

TMC has many features focused around communities. One of these is the splitting of permissions in shared databases. Some communities want to use the same database for their live and dev servers but normally this would lead to a user receiving permissions to both! If you need to add just staff to the live server or developers to the dev server you can do so. Adding permissions via the [in game admin menu](#adding-other-users) will only add their permissions level to that type of server.

## Server Permissions

Server permissions are handled via the normal [ACE permissions system](https://docs.fivem.net/docs/server-manual/server-commands/#add_ace-principal-object-allowdeny) that CFX offers. These are purely to enable access to commands that control the server such as `start` , `stop`, `refresh`, `ensure`, etc. We don't use these to control access to internal framework commands.

Granting access to these is as simple as navigating to the `sv_pre.cfg` and appending the following line:

```
add_principal identifier.steam:1100001058c3935 group.admin
```

Replace the `steam:1100001058c3935` with any of your identifiers including Steam, Discord, FiveM license, etc and once you restart the server you'll have access to everything ACE permissions related.


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tmc.bj/v2/guides/permissions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
