Skip to content

Installation

1. Dependencies

Make sure these are installed and started before the casino slots script:

  • vns-core - separate free download from your Keymaster/cfx Portal. It is not included in the script's zip.
  • ox_lib
  • Your framework: qb-core, qbx_core or es_extended
  • A supported inventory, if you play with chips (see vns-core)
  • A casino map/interior that contains the GTA casino slot machine props (see below)

The script has no database tables and no framework settings. vns-core detects your framework, inventory and notification system.

2. Resource

Copy vns-casinoslots into your resources and add it to server.cfg after vns-core:

ensure ox_lib
ensure oxmysql
# your framework, inventory and casino map

ensure vns-core
ensure vns-casinoslots

Ensure order

  • vns-core must be ensured after ox_lib, oxmysql (database), your framework, inventory, target system and your other server scripts such as housing, garages and phone.
  • vns-casinoslots must be ensured after vns-core.

If vns-core starts too early, VNS scripts can't use your database, items, money or other systems. See Installing vns-core.

Do not rename the folder

The resource checks its own name on start and refuses to run if the folder is not called exactly vns-casinoslots.

3. Casino map & machine detection

The script does not spawn slot machines. It scans the objects around the casino area for the slot machine prop models listed in Config.Casino.SlotBets (vw_prop_casino_slot_01a through vw_prop_casino_slot_08a by default) and makes every match playable. Your casino interior has to actually contain those props.

  • K4MB1 casino map: set Config.K4MB1_Casino_Map = true (default). The script uses the K4MB1 casino coordinates automatically.
  • Any other casino map: set Config.K4MB1_Casino_Map = false and set Config.Casino.Center / Config.Casino.Radius to cover your casino floor. Detection starts once a player is inside that radius.

The reel models (vw_prop_casino_slot_XXa_reels / XXb_reels) are part of the game's casino content; there is nothing extra to stream.

4. Chips item

With the default Config.Play.Item = true setup, bets and winnings use an inventory item:

Item Used for
casinochips Charged per spin (the machine's bet amount), paid out on wins

Add it to your inventory, or change Config.Play.ItemName to an item you already have. If you prefer cash or bank money instead, see Configuration.

5. First start

  1. Start the server, walk into the casino and stand at a slot machine chair. A floating "E - Bet: 500" prompt appears.
  2. Press E to sit down, then Enter or Space to spin.
  3. Backspace stands you up and frees the machine.

Escrow note

The encrypted version keeps config.lua, client/client_open.lua and server/server_open.lua editable. The open version is fully editable.

Updating from the previous version

  • vns-core is now required. Download it separately from your portal and start it before vns-casinoslots.
  • Removed config options: Config.Framework, Config.FrameworkFolder, Config.Notification, Config.TargetSystem and Config.Inventory. Force a system in vns-core/config.lua if auto-detection doesn't fit your server.
  • Config.Play.AccountType now takes 'cash' or 'bank' on every framework. On ESX, use 'cash' for the wallet (the old '' value is no longer needed; anything other than 'bank' plays from the wallet).
  • New option Config.UseDrawMarker (default false) draws a marker above the closest free chair.
  • The QBox manifest step is gone. fxmanifest.lua no longer loads @qbx_core/modules/playerdata.lua.
  • oxmysql is no longer a dependency of this script (vns-core still uses it).
  • core_inventory and ESX's built-in inventory now work through vns-core. The old esx_inventoryhud option no longer exists.
  • The rest of the config (Config.Lang, Config.Mult, Config.Offset, Config.OffsetNum, Config.Casino, Config.Wins, UI events) is unchanged and can be copied over.
  • If you edited client/client_open.lua or server/server_open.lua, redo your changes on the new files. They now call vns-core instead of framework code.