Configuration
This page provides a comprehensive guide to configuring the d_roulette script. All settings are located in `config.lua`, which is unencrypted and fully customizable.
Framework Settings
Specifies which RedM framework your server uses. The script will automatically integrate with the selected framework's economy and player systems.
Type: string
Available Options:
"vorp"- Old VORP-Core below Version 2.0.0"vorp2"- Current VORP-Core after Version 2.0.0"redemrp"- Old RedEM:RP below Version 2.0.0"redemrp2"- Current RedEM:RP after Version 2.0.0"rsg"- Old RSGCore"rsg2"- Current RSGCore"qbc"- QBR-Core"gum"- Gum Framework"custom"- For your own Framework
Example:
Config.Framework = "vorp2"Notes:
Must be set correctly or economy integration will fail
Framework core must be started before d_roulette
See Background Information for adding custom framework support
Language Settings
Sets the display language for all in-game text, notifications, and UI elements.
Type: string
Available Languages:
"en"- English (default)"de"- German (Deutsch)"ru"- Russian (Русский)
Example:
Adding New Languages:
Copy
language/en.luatolanguage/yourlang.luaTranslate all string values
Set
Config.UsedLang = "yourlang"
Language File Structure:
Table Locations
Defines all roulette table locations, their spawn positions, and unique settings. Each location is a separate table instance with independent configuration.
Type: table (array of location configs)
Location Structure
Each location entry contains:
Location Properties Explained
Basic Properties
Name
string
Display name shown in prompts and UI
Required
Example:
Blip Configuration
Controls the map blip (marker) for this roulette table.
showBlip
number
Blip visibility behavior
-1 = always visible, 0 = never show, >0 = visible within distance
blipSprite
number
Blip icon sprite ID
RedM blip sprite hash
blipLocation
table
Blip position on map
{x = float, y = float, z = float}
Example (Always Visible Blip):
Example (Proximity Blip):
Example (No Blip):
Common Blip Sprites:
1243830185- Poker/Roulette table iconFind more sprites in RedM native documentation
Table Spawning Configuration
tblSpawn
boolean
Should the table object spawn? Set to false if table exists in map
true
tblModel
string
Prop model name for the table
"p_roulettetable01x"
tblLod
number
Distance at which table spawns (meters)
25.0 - 50.0
tblCoords
table
Table spawn position and rotation
{x = float, y = float, z = float, h = float}
Example (Standard Setup):
Example (Custom Table Model):
Example (Map-Placed Table):
Note: Heading (h) is in degrees (0-360), where 0 = North, 90 = East, 180 = South, 270 = West.
Interaction & Prompt Settings
Controls how players interact with the table and at what distance.
promptLocation
table
Position where interaction prompt appears, should be the middle point of the table
{x = float, y = float, z = float, h = float}
promptRadius
number
Radius around prompt position to trigger interaction (meters)
1.5 - 2.0
tblRange
number
Maximum distance player can be from table while playing (meters)
2.0 - 3.0
Example (Standard Setup):
Behavior:
promptRadius: Player must be within this distance to see/trigger the interaction prompttblRange: Player is kicked from game if they move beyond this distance during gameplay
Economy Properties
pricePerChip
number
How much in-game currency each chip costs
2.5 = $2.50 per chip
Example (Low Stakes Table):
Example (Standard Table):
Example (High Stakes Table):
Balance Considerations:
Set based on your server's average player income
Consider maximum bet sizes (e.g., straight-up bets pay 35:1)
Test economy impact with your player base
Chip Colors
chipColors
table (array)
Chip colors available for this table (max 3 players)
"blue", "green", "red", "pink", "white", "black"
Example:
Important Notes:
Chip prop models must exist:
prop_chip_[color]_x1throughprop_chip_[color]_x10Custom colors require creating new chip models and language entries
Odds Configuration
Standard American Roulette Odds:
House Edge Impact:
Higher odds = Lower house edge (better for players)
Lower odds = Higher house edge (better for casino)
See [Game Rules](3_Game Rules.md#house-edge-explained) for calculations
Camera Offsets
Camera offsets control the player's viewpoint during betting and wheel spin phases. These are relative to the table position and rotation.
tblCamBetFieldOffset
table
Camera position for betting field view
{x = float, y = float, z = float}
tblCamRouletteOffset
table
Camera position for wheel spin view
{x = float, y = float, z = float}
tblRouletteWheelOffset
table
Wheel object spawn position relative to table
{x = float, y = float, z = float}
Standard Table Example:
Calibration Tips:
Start with standard values
If using custom table model, adjust Z values for height
Test in-game with debug mode to see camera positions
Adjust X/Y for horizontal positioning
Higher Z = higher camera angle
Common Issues:
Camera too high/low: Adjust Z value
Camera clipping through objects: Adjust X/Y away from walls
Wheel not visible: Adjust
tblCamRouletteOffsetpositionBet field off-center: Adjust
tblCamBetFieldOffsetX/Y values
Props Configuration
Allows spawning additional decorative props around the table (rakes, chips, drinks, etc.).
props
table
Dictionary of additional props to spawn
["propName"] = {model = string, x = float, y = float, z = float, h = float}
Example (With Rake):
Example (No Extra Props):
Common Prop Models:
p_rouletterake01x- Chip rakeprop_chips_pile- Chip stack
Note: Coordinates are absolute world positions (not relative to table).
Object Deletion
Allows removing unwanted objects from the map at this location (useful for custom mapping).
delete
table
Dictionary of objects to delete by model name and coordinates
["propName"] = {model = string, x = float, y = float, z = float, h = float}
Example (No Deletions):
Example (Delete Specific Objects):
Use Cases:
Removing conflicting map objects
Cleaning up area for custom table placement
Economy Settings
Maximum time (in seconds) a player can remain inactive during their turn before receiving a warning.
Type: number
Default: 120 (2 minutes)
Example:
Behavior:
Timer starts when player joins or after previous round ends
At 50% of time: No warning
At 100% of time: First warning notification
At 200% of time (double): Player kicked from table
Recommended Values:
Fast-paced servers:
60secondsCasual servers:
120secondsRoleplay-heavy servers:
180seconds
Control Keys
Defines which keyboard/controller buttons are used for various actions during gameplay. Uses RedM native control hashes.
Key Configuration Settings
Key Configuration Reference
StartKey
R
0xE3BF959B
Interact with roulette table
InfoKey
Q
0x1ECA87D4
Display game information
CamKey
ENTER
0x07B8BEAF
Toggle camera view
RdyToPlayKey
ENTER
0xC7B5340A
Confirm ready to start round
ChooseChipsLKey
ARROW UP
0x6319DB71
Increase chip denomination
ChooseChipsRKey
ARROW DOWN
0x05CA7C52
Decrease chip denomination
SetChipsKey
ENTER
0xC7B5340A
Confirm chip selection
ChooseBetKey
SPACE
0x6DB8C62F
Place bet on selected position
ReplaceBetsKey
E
0x17BEC168
Modify or replace existing bets
SpinRouletteKey
ENTER
0xC7B5340A
Spin the roulette wheel
SurrenderKey
BACKSPACE
0x156F7119
Leave the table
MoveUpDownLKey
ARROW UP
0x6319DB71
Move cursor up on betting grid
MoveUpDownRKey
ARROW DOWN
0x05CA7C52
Move cursor down on betting grid
MoveLeftRightLKey
ARROW LEFT
0xA65EBAB4
Move cursor left on betting grid
MoveLeftRightRKey
ARROW RIGHT
0xDEB34313
Move cursor right on betting grid
ColorOneKey
1
0xE6F612E4
Quick select first chip color
ColorTwoKey
2
0x1CE6D9EB
Quick select second chip color
ColorThreeKey
3
0x4F49CC4C
Quick select third chip color
Finding Control Hashes:
Use RedM native documentation to find control hashes
Common hashes can be found in the RedM natives reference
Discord Webhooks
Discord webhooks allow you to log roulette game events to a Discord channel for monitoring, analytics, and moderation purposes.
Setting Up Discord Webhooks
Step 1: Add your Discord Webhook
Step 2: Enable or disable the needed events
Webhook Events Logged
The script logs the following events automatically:
TableStarted
First player joined a table
TableEnded
All players leaved a table
TableWinLooseHandling
Round completes
PlayerJoined
Player sits at table
PlayerLeft
Player left at table
PlayerEveryBets
logs sended everytime a player makes a move (adding/removing chips)
PlayerPlacedBets
only logs once for each player after all placed their bets
Last updated