Skip to main content

Prerequisites

Before installing R_Store, ensure you have:
1

Required Dependencies

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

Installation Steps

1

Download & Extract

  1. Download R_Store from your cfx.re portal portal
  2. Extract the folder to your server’s resources directory
  3. Ensure the folder is named r_store
2

Database Setup

Choose one of the following methods:

Method 1: Manual Import

Import the sql.sql file from the r_store folder into your database using HeidiSQL, phpMyAdmin, or your preferred database tool.
CREATE TABLE `r_store_players` (
    `id` INT(11) NOT NULL AUTO_INCREMENT,
    `player_identifier` VARCHAR(46) 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(46) 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)
3

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"
4

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
5

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! Ensure dependencies are loaded before r_store.

Next Steps

Troubleshooting

Having issues? Check common problems:

Common Issues

View troubleshooting guide