# QBCore Admin Commands

Use this page as a practical cheatsheet for QBCore staff commands. It focuses on
commands server owners search for most often: opening the admin menu, setting
permissions, setting jobs, giving money, spawning vehicles, and fixing commands that do
not appear in chat.

> **Resource names matter**
> Core commands such as `/setjob`, `/givemoney`, `/tp`, and `/dv` are registered by
> `qb-core`. Menu commands such as `/admin`, `/noclip`, `/coords`, and warning tools are
> usually provided by `qb-adminmenu`. If a command is missing, first check that the right
> resource is installed and ensured in `server.cfg`.

![QBCore admin command authorization path](/diagrams/permissions.svg)

*Conceptual diagram; verify the behavior against your installed resource version.*

## Quick Command List

| Command | Permission | Source | Use it for |
| --- | --- | --- | --- |
| `/admin` | admin | `qb-adminmenu` | Open the QBCore admin menu |
| `/addpermission [id] [permission]` | god | `qb-core` | Give a player `mod`, `admin`, or `god` permission |
| `/removepermission [id] [permission]` | god | `qb-core` | Remove a permission level from a player |
| `/setjob [id] [job] [grade]` | admin | `qb-core` | Assign a player job and grade |
| `/setgang [id] [gang] [grade]` | admin | `qb-core` | Assign a player gang and grade |
| `/givemoney [id] [type] [amount]` | admin | `qb-core` | Add cash, bank, or crypto money |
| `/setmoney [id] [type] [amount]` | admin | `qb-core` | Set a money balance directly |
| `/car [model]` | admin | `qb-core` | Spawn a vehicle by model name |
| `/dv` | admin | `qb-core` | Delete the closest vehicle |
| `/dvall` | admin | `qb-core` | Delete all vehicles |
| `/dvp` | admin | `qb-core` | Delete all peds |
| `/dvo` | admin | `qb-core` | Delete all objects |
| `/tp [id]` or `/tp [x] [y] [z]` | admin | `qb-core` | Teleport to a player or coordinates |
| `/tpm` | admin | `qb-core` | Teleport to your map marker |
| `/openserver` | admin | `qb-core` | Reopen a closed server |
| `/closeserver [reason]` | admin | `qb-core` | Close the server and kick non-whitelisted players |

## Open the QBCore Admin Menu

The common QBCore admin menu command is:

```text
/admin
```

If `/admin` does nothing, check these first:

1. `qb-adminmenu` is installed.
2. `ensure qb-adminmenu` appears after `ensure qb-core` in `server.cfg`.
3. Your player has `admin` or `god` permission.
4. No other admin resource overrides the same command.

## Give Yourself Admin Permission

For a live server, prefer assigning ACE permissions in `server.cfg` and then use
QBCore permissions for in-game staff levels.

```cfg
add_ace group.admin command allow
add_ace resource.qb-core command allow

add_principal qbcore.god group.admin
add_principal qbcore.god qbcore.admin
add_principal qbcore.admin qbcore.mod

add_principal identifier.license:YOUR_LICENSE_HERE qbcore.god
```

The `identifier.license:...` principal is the persistent staff assignment. Restart the profile,
reconnect, and verify the intended account.

For temporary runtime administration, an existing `god` can use:

```text
/addpermission 1 admin
/removepermission 1 admin
```

Replace `1` with the current server ID. These commands operate on an ACE principal named
`player.<server-id>`; they do not write a permission into the character database. The current
`playerDropped` handler does not remove that principal, so do not use `/addpermission` as your
persistent staff roster.

## Player Management Commands

### Set a Job

```text
/setjob [player_id] [job_name] [grade]
```

Examples:

```text
/setjob 12 police 0
/setjob 12 mechanic 2
/setjob 12 unemployed 0
```

The job name must exist in your QBCore job config. The grade must exist for that job.
For a deeper walkthrough, use the [set job guide](/docs/guides/set-job).

### Set a Gang

```text
/setgang [player_id] [gang_name] [grade]
```

Use this only when your server uses QBCore gangs and the target gang is configured.

### Give or Set Money

```text
/givemoney [player_id] [money_type] [amount]
/setmoney [player_id] [money_type] [amount]
```

Examples:

```text
/givemoney 12 cash 500
/givemoney 12 bank 2500
/setmoney 12 cash 1000
```

Use `/givemoney` when you want to add to the current balance. Use `/setmoney` when you
want to replace the balance.

## Vehicle and World Cleanup Commands

| Task | Command |
| --- | --- |
| Spawn a vehicle | `/car sultan` |
| Delete nearby vehicle | `/dv` |
| Delete all vehicles | `/dvall` |
| Delete all peds | `/dvp` |
| Delete all objects | `/dvo` |
| Teleport to player ID | `/tp 12` |
| Teleport to coordinates | `/tp 215.0 -810.0 30.7` |
| Teleport to map marker | `/tpm` |

Use global cleanup commands carefully on production servers. `/dvall`, `/dvp`, and
`/dvo` affect the whole server, not only your local area.

## Server Open and Close Commands

Close the server with a visible reason:

```text
/closeserver Maintenance restart in 5 minutes
```

Reopen it after maintenance:

```text
/openserver
```

Players with the configured whitelist permission can stay during a closed-server
period. Everyone else is kicked with the reason you provide.

## Why Commands Do Not Work

### The command is not suggested in chat

Run a command refresh after changing permissions:

```lua
QBCore.Commands.Refresh(source)
```

If you changed permissions from the console or database, reconnect the player as well.

### The command says you have no permission

QBCore command permissions are ACE checks. Verify the connected player's stable
`identifier.license:...` principal, the `qbcore.god -> qbcore.admin -> qbcore.mod` inheritance,
and the permission attached to the command. Do not add a fictional database permission column.

`/addpermission` itself requires `god`. It is a runtime/server-ID ACE helper, not a separate
persistent QBCore permission database. txAdmin roles are also separate from this QBCore ACE graph.

### The command exists but does nothing

Check the resource that owns the command:

```cfg
ensure qb-core
ensure qb-adminmenu
```

Then check the server console for Lua errors during startup. A failed resource can
leave its commands unregistered.

## Related Guides

- [Commands and Key Mappings](/docs/guides/keybindings) for registering your own commands and
  rebindable keys
- [How to Become Admin in QBCore](/docs/guides/how-to-become-admin)
- [How to Set Job on QBCore](/docs/guides/set-job)
- [QBCore Commands API](/docs/api/commands)
- [QB-Core Framework](/docs/resources/qb-core)
