Admin Guide

The /dice command and its admin subcommands, the in-game settings menu, managing tables, police alerts, missing-model warnings and permissions.

Commands and tools for testing and managing oxide-dice.

Everything runs through one command, /dice, followed by a subcommand. Type it in the chat box in game, or in the server console. Typing /dice on its own (or /dice help) shows the list of subcommands.

Commands Overview

CommandWhat it doesWho can use it
/dice helpLists the dice commandsEveryone
/dice leaveLeaves the dice game you're inEveryone
/dice settingsOpens the in-game settings menuAdmins (see Permissions)
/dice give [dice|table|folding] [count] [id]Gives dice, a casino table or a folding tableAdmins (also works from the server console)
/dice table place [casino|folding]Places a casino or folding table without using an itemAdmins
/dice endEnds the dice game nearest you, settling every bet by the rulesAdmins
/dice gamesLists every dice game runningAdmins (also works from the server console)
/dice demoStarts a circle that rolls by itself, with no moneyAdmins

As you type /dice in the chat box, it shows up as a suggestion.

Settings Menu

/dice settings

Opens an in-game editor for the resource's settings: the values stored in the oxide_settings database table (see Configuration). Changes apply live and are saved to the database straight away, with no restart and no file editing.

  • Settings are in a sidebar of four categories: Games, Players, World and Advanced.
  • A Basic / Advanced switch at the top picks which settings you see, and a search box finds a setting by name. Animations and Dispatch only appear once you switch to Advanced.
  • Fields you've edited but not saved are marked changed, and Save Changes saves them. Reset to default puts a whole setting back to the value from the config files and saves it straight away.
  • Table placement zones are drawn in the world: the menu hides, you place the corners of the area, then the menu comes back. Each zone has a Teleport to zone button to jump to it.
  • Fixed tables and seller locations have Place in world to pick the spot and Teleport here to jump to it.
  • A few settings live only in the config files. Configuration explains which, and how to change them.

Only admins can open the menu, and every save is checked again on the server, so a non-admin can't change settings even by faking the request. It only works in game: from the server console it says "/dice settings only works in game."

Admin Commands

/dice give

Gives dice or a dice table to you or another player. It only hands out this resource's own three items.

Usage:

/dice give [dice|table|folding] [count] [id]

Parameters:

ParameterTypeRequiredDescription
dice, table or foldingtextYesdice gives the dice item. table (or casino, or dice_table) gives the casino table item. folding (or dice_folding_table) gives the folding table item.
countnumberNoHow many, from 1 to 50 (default 1)
idnumberNoThe player's server ID (default: you)

Examples:

/dice give dice           -- one pair of dice for you
/dice give table 2        -- two casino tables for you
/dice give folding        -- one folding table for you
/dice give dice 1 14      -- one pair of dice for player 14

Output:

  • Success: "Gave 1x dice to player 14."
  • Failure: "Usage: /dice give dice|table|folding [count] [player id]", "Player 14 is not online.", or "The inventory refused the item." (the inventory is full, or the item isn't registered in your inventory)

From the server console, always include the player's ID, since the console has no inventory of its own.

/dice table place

Opens the table placement tool so you can place a dice table without using a table item. It works whatever Who may place is set to.

Usage:

/dice table place            -- a casino table
/dice table place folding    -- a folding table with its four chairs

Aim at the ground where the table should go, up to 60 metres from where you stand, and click the left mouse button. See Placing a table for every key. The table is saved with you as its owner, so you (or any admin) can pack it up later.

Output:

  • Success: "Table placed. Players start a game at it with the target."
  • Failure: "Usage: /dice table place [casino|folding]" (anything other than place after table, or a kind that isn't casino or folding), or what's wrong with the spot, for example "Too close to another game or table." or "That spot is too far from you."

In game only.

/dice end

Ends the dice game nearest you (within 15 metres), and settles every bet in it by the rules.

Usage:

/dice end

How the money settles depends on where the game is:

When you run itWhat happens
Before the come-out throw (the shooter is setting the bet, or players are fading it)Every bet comes back to whoever put it up
The dice are in the airThat roll settles first, then the game ends as below
A point is setIt counts as a seven-out: the faders win the main bet, "7 before point" side bets win, and number bets come back to both players

So if you want everyone to get their money back, end the game before the come-out throw, not while a point is set.

Output:

  • Success: "Game ended. Every bet settled by the rules."
  • Failure: "There is no dice game near you."

In game only.

/dice games

Lists every dice game running on the server, one line each: its ID, whether it's a street game or a table, where it is, how many players, what stage it's at, and the pot.

Usage:

/dice games

Example output:

1761834912-3 street at 245.1, -1023.6: 3 players, point, pot $1,400

The stage is one of bet (the shooter is setting the bet), fade (waiting for fades), rolling (the dice are in the air) or point (a point is set). If nothing is running: "No dice games are running."

Works in game (each game is a notification) and from the server console (each game is a line).

/dice demo

Starts a street circle a few steps in front of you that plays itself: six throws, then it ends on its own. Nobody can join it and no money is involved, though the pot display grows so you can see the cash props. Use it to check the dice landing, the landing sounds, the pot and the tag on your server without a second player.

Usage:

/dice demo

Output:

  • Success: a notification that the demo has started and nothing is staked, then the circle appears
  • Failure: "Cannot start a demo here (are you in a game?)." (you're already seated in a game)

In game only.

Player Commands

/dice help

Anyone can run this. In game it shows "Usage: /dice help | leave | settings | give | table place | end | games | demo". From the server console it lists every subcommand with a line about what it does.

/dice leave

Anyone can run this. It leaves the dice game you're in, the same as pressing BACKSPACE in the game. Your money settles by the rules (see Leaving). If you're not in a game: "You are not in a dice game."

Managing Tables

  • Placing. Admins can always place tables, with the item or with /dice table place, and skip the zones, the road and water checks and the per-player limit. Tables still need to be 3 metres from other tables and games (see Dice tables).
  • Packing up. Aim at any placed table and pick Pack up the table. Admins can pack up anyone's table, as long as no game is running at it. That table's own item (dice_table or dice_folding_table) goes into your inventory, not the owner's.
  • Stopping a game at a table. Use /dice end next to it, then pack it up.
  • Fixed tables are set in Games → Tables → Dice tables → Fixed tables in /dice settings, each as a casino or a folding table. They can't be packed up; delete the row and save to remove one.
  • Letting players place tables. Change Who may place to Players in allowed zones (then draw the zones) or Players anywhere. See Configuration.

Police Alerts

Under World → Dispatch → Police alerts (switch the menu to Advanced to see it) you can make street games carry a risk of being reported to police. Dice tables never alert.

Set Alert chance above 0, and every time a street game starts the server rolls for a dispatch call at that game's location. Area cooldown (default 5 minutes) stops one corner sending call after call: after an alert, games within 50 metres of it don't alert again until the cooldown runs out.

Alerts go into any dispatch resource o-link supports. Without one, officers get a short notification and a 30-second blip on the game (see Configuration). Everything is decided on the server from the game's position, so a player can't suppress an alert or make it point somewhere else.

Missing-Model Warnings

If a model can't be loaded on a player's game, every admin online gets a message naming it. If it's the die (oxide_dice_street), the dice table (oxide_dice_table) or the street crate (oxide_dice_crate), the resource's stream/models/ folder is missing or damaged: copy the resource folder again. If it's a base-game model (the folding table prop_table_03b, its chairs prop_chair_08, the cash props or the seller's ped), add a replacement in Advanced → Compatibility → Model replacements (see Configuration).

Permissions

The admin subcommands (settings, give, table, end, games, demo) check whether you're a server admin through o-link. The check uses FiveM's built-in permission system (called ACE), so there's nothing dice-specific to set up.

A player counts as an admin if any of these is true:

  • They have the command permission. Stock QBCore and Qbox server.cfg files already give this to group.admin (add_ace group.admin command allow), so your existing framework admins can use the commands with no changes.
  • They're an admin in ESX (an ESX admin group).
  • They have the admin permission.

If you need to make someone an admin, two lines in server.cfg do it: one to put the player in the admin group, and one to give that group the admin permission.

server.cfg
add_principal identifier.license:YOUR_LICENSE_HERE group.admin
add_ace group.admin admin allow

Replace YOUR_LICENSE_HERE with the player's license identifier (txAdmin shows it on the player's page), save the file, then restart the server.

If a player without permission runs an admin subcommand, they get "You do not have permission."

The live server console is always allowed to run /dice give (with a player ID) and /dice games. /dice help and /dice leave need no permission.

Next Steps