Skip to main content

Prerequisites

1

Required Dependencies

  • ox_lib - UI and utilities
  • oxmysql - Database operations
  • Framework - ESX, QBCore, or QBX

Installation Steps

1

Download & Extract

Download R_Casino and place it in your resources folder as r_casino
2

Database Setup

Import the SQL file:
CREATE TABLE IF NOT EXISTS `r_casino_players` (
  `id` INT(11) NOT NULL AUTO_INCREMENT,
  `player_identifier` VARCHAR(46) NOT NULL,
  `coins` INT(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
);

CREATE TABLE IF NOT EXISTS `r_casino_case_cooldowns` (
  `player_identifier` varchar(255) NOT NULL,
  `case_value` varchar(255) NOT NULL,
  `last_opened` datetime NOT NULL,
  PRIMARY KEY (`player_identifier`, `case_value`)
);
Or enable auto-insert:
R.EnableAutoinsert = true
3

Configure Framework

Edit config.lua:
R.Framework = "ESX" -- ESX, qbcore, or qbx
R.newESX = true
R.CoreName = "es_extended"
R.Inventory = "ox_inventory"
4

Add to server.cfg

ensure ox_lib
ensure oxmysql
ensure es_extended
ensure r_casino
5

Start Server

Perform a full server restart

Verify Installation

  1. Type /casino in-game
  2. Press F5 (default fast key)
  3. Test exports in console:
    exports['r_casino']:getPlayerCoinBalance(1)
    

Common Issues

Having problems? Check troubleshooting