Documentation
R_Store

r_store Installation

Install r_store on ESX, QBCore or QBox: ox_lib and oxmysql, the database tables, server.cfg start order and install troubleshooting.

Prerequisites

Before installing R_Store, ensure you have:

Required Dependencies

  • ox_lib: UI and utilities
  • oxmysql: database
  • Framework: ESX, QBCore or QBX

Installation Steps

Download & Extract

  1. Download R_Store from your Cfx.re Portal
  2. Extract the folder to your server's resources directory
  3. Ensure the folder is named r_store

Database Setup

Choose one of the following methods:

Method 1: Manual Import

Import sql.sql from the r_store folder into your database. It creates these two tables:

CREATE TABLE `r_store_players` (
    `id` INT(11) NOT NULL AUTO_INCREMENT,
    `player_identifier` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
    `coins` INT(11) NOT NULL DEFAULT 0,
    PRIMARY KEY (`id`) USING BTREE,
    UNIQUE INDEX `player_identifier` (`player_identifier`) USING BTREE
);

CREATE TABLE `r_store_purchases` (
    `id` INT(11) NOT NULL AUTO_INCREMENT,
    `player_identifier` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
    `item_name` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
    `item_type` ENUM('vehicle','item','weapon','money') NOT NULL COLLATE 'latin1_swedish_ci',
    `quantity` INT(11) NOT NULL DEFAULT 1,
    `cost_coins` INT(11) NOT NULL,
    `purchase_date` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
    PRIMARY KEY (`id`) USING BTREE,
    INDEX `player_identifier` (`player_identifier`) USING BTREE
);
  1. Open config.lua
  2. Set R.EnableAutoinsert = true
  3. Start the resource
  4. Set R.EnableAutoinsert = false after tables are created (if you wish)

Configure Framework

Open config.lua and configure your framework:

R.Framework = "ESX"
R.newESX = true -- Set to false for ESX 1.1
R.CoreName = "es_extended"
R.Inventory = "ox_inventory"

Configure Target (Optional)

If you use a target system:

R.UseTarget = true
R.Target = "ox_target" -- or "qb-target"

If you don't use target:

R.UseTarget = false

Add to server.cfg

Add r_store to your server.cfg after dependencies:

# Dependencies
ensure ox_lib
ensure oxmysql
ensure es_extended
ensure ox_inventory

# R-Scripts
ensure r_store

Order matters: the dependencies must start before r_store.

Next Steps

Troubleshooting

Having issues? Check common problems:

Common Issues

View troubleshooting guide