Configuration
Everything lives in config.lua, which stays editable in both the Open and Encrypted variant. There are no framework, inventory or notification options - those are handled by vns-core.
General
| Option | Default | What it does |
|---|---|---|
Config.ItemName |
'casinochips' |
The inventory item players bet with and get paid in. Must exist in your inventory. |
Config.Range |
50.0 |
Distance from a table at which the client looks up the table props and spawns the dealers. |
Config.RouletteStart |
30 |
Betting countdown in seconds. It starts when someone sits down at a table; when it hits zero the wheel spins. |
Tables
Config.Tables defines every roulette table. Each entry is one physical table on your map - the script finds the table prop at the position you give it (see Installation):
Config.Tables = {
[0] = {
position = vector3(947.76, 56.93, 74.99), -- Table position
color = 0, -- 0 green, 1 red, 2 blue, 3 purple
minBet = 100, -- Minimum bet
maxBet = 1000, -- Maximum bet
},
-- ...
}
| Field | What it does |
|---|---|
position |
Coordinates of the roulette table prop. Must be within 1 m of a real table prop. |
color |
Cloth color: 0 green, 1 red, 2 blue, 3 purple. |
minBet |
Smallest single bet the table accepts, in chips. Shown in the seat help text. |
maxBet |
Maximum a player can have on the table in one round, in chips - all of that player's bets in the round count towards it. |
The four default tables form a low/medium/high/whale ladder (100-1k, 1k-10k, 10k-100k, 100k-1M). Add or remove entries to run more or fewer tables.
Limits are enforced on the server
minBet and maxBet are checked by the client before a bet is sent and again by the server before any chips are removed. A bet outside the limits is refused with the limit text.
Seats
Every table has four seats, defined by the table prop itself. Config.ChairIds maps the prop's chair bones and must not be edited.
Texts
All player-facing texts are in the Locales table in config.lua:
| Key | Used for |
|---|---|
limit |
Bet below the table minimum or above the maximum. |
invalid_bet |
The entered bet amount is not valid. |
gamestarted |
Betting after the spin has started. |
not_enough_chips |
The player doesn't have enough chips. |
input_bet |
Title of the custom bet amount input. |
help |
Controls help while seated; the current bet amount is appended. |
won_chips / you_bet |
Win and bet notifications, followed by the amount and item_name. |
item_name |
Chip name shown in notifications. |
The seat prompt with the minimum/maximum bet and the on-screen countdown ("Game will start in") are fixed English strings in the script. The chair_used and help_sit_rulett keys exist in the table but are currently not shown anywhere - an occupied chair simply can't be sat on.
Bet types and payouts
Bet spots and payouts are fixed in code:
| Bet | Pays |
|---|---|
Straight number, 0 or 00 |
35x the bet |
| Red / Black, Even / Odd, 1-18 / 19-36 | 2x the bet |
| Dozens (1st/2nd/3rd 12), Columns (2 to 1) | 3x the bet |
The Config.ChairIds, Config.Positions and RNUMBERS blocks at the bottom of config.lua describe the table seats, the American wheel order and which numbers belong to each outside bet. They sit below a DO NOT EDIT THOSE banner - changing them breaks bet resolution and payouts.
Open files
Both open files stay readable in the Encrypted variant:
| File | Functions |
|---|---|
client/client_open.lua |
IsPlayerLoaded, ClientNotification, helpText (help text display), getGenericTextInput (custom bet input - must return the entered text or false) |
server/server_open.lua |
IsPlayerLoaded, getPlayerChips, giveChips, removeChips (must return true only when the chips were really taken), NotifyPlayer |
By default they call vns-core. If you run a custom framework or inventory, the recommended place to add support is vns-core itself, so these files can stay untouched.