Skip to content

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.

Position

Option Default What it does
Config.K4MB1_Casino_Map true Use the built-in K4MB1 casino position for the Inside Track area. Config.Coords is ignored while this is on.
Config.Coords vector3(1096.42, 260.75, -51.24) Center of your Inside Track area, used when the K4MB1 preset is off.
Config.UseDrawMarker true Draw a marker above the closest free betting chair.

The script wakes up when a player is within 10 m of the position and then searches for vw_prop_casino_track_chair_01 props - every chair of that model becomes a usable betting seat.

Betting

Option Default What it does
Config.ItemName 'casinochips' The inventory item players bet with and get paid in.
Config.MinBet 1000 Minimum bet, and the starting bet when a horse is selected.
Config.MaxBet 10000 Maximum bet.
Config.ChangeBet 250 How much one click on the +/- buttons changes the bet.

The player can only raise the bet while it stays below their current chip balance and at or under Config.MaxBet. The bet is removed from the player's chips when the race starts.

Race

Option Default What it does
Config.Racetime 30 Race length in seconds.

Each race fields six horses with random names and colors. Every horse rolls random odds of 2, 3 or 4 (shown as 1/2, 1/3, 1/4). The finishing order is random; a winning bet pays bet x odds in chips, a losing bet pays nothing. The main screen shows a 60-second countdown between events.

Texts

Option Default What it does
Config.Lang.Text3D.play "~g~E~w~ - Play" The 3D text shown above a free betting chair.

The betting UI itself is GTA's native Inside Track scaleform, so its texts are localized by the game. The script loads GTA's DLC_VINEWOOD/CASINO_GENERAL audio bank - there is no custom audio to configure.

Open files

File Functions
client/client_open.lua ClientNotification, DrawText3Ds (the chair prompt - restyle it freely)
server/server_open.lua GetPlayerFromId, GetItemAmount, PlayerHasItem, RemoveItemFromPlayer, GiveItemToPlayer

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.