> RedM VORP Framework Complete Setup Guide

Learn how to install and configure the VORP Framework for your RedM server. Set up character creation, inventory, housing, and economy systems.

Advanced
3 hours

RedM VORP Framework Complete Setup Guide

The VORP Framework is the backbone of most RedM roleplay servers. This guide covers installation through advanced configuration, giving you a fully functional Wild West RP experience with character creation, inventory, economy, and essential gameplay scripts.

What is VORP Framework?

VORP (Versatile Open Roleplay Platform) is an open-source roleplay framework built specifically for RedM. It serves the same purpose as ESX or QBCore in the FiveM ecosystem:

  • >Character creation and management - Multi-character support with customizable appearances
  • >Inventory system - Weight-based item management with a visual UI
  • >Economy - Dual currency with gold and dollars (period-appropriate for 1898)
  • >Developer API - Server and client exports for building custom scripts
  • >Database integration - MySQL-backed persistent storage for all player data
  • >Modular design - Install only the components you need
VORP is actively maintained by the VORPCORE community and has the largest ecosystem of compatible scripts for RedM.

---

VORP vs RedEM:RP

FeatureVORPRedEM:RP
PopularityLargest communitySmaller but active
Open SourceYes (GitHub)Partially
Script EcosystemLargeSmaller
InventoryWeight-basedSlot-based
EconomyGold + dollarsConfigurable
This guide focuses on VORP as it has the larger community and more available resources.

---

Prerequisites

Before installing VORP, you need:

  • >A working RedM server (see our RedM Server Setup Guide)
  • >MySQL or MariaDB installed and running
  • >oxmysql installed as your database connector
  • >Basic familiarity with Lua and server configuration
Verify your server.cfg has:

Config
set mysql_connection_string "mysql://redm_user:your_password@localhost/redm_server?charset=utf8mb4"
ensure oxmysql

---

Installing VORP Core

VORP Core is the foundation. All other VORP resources depend on it.

Download and Install

Bash
cd ~/redm/server-data/resources/[core]
git clone https://github.com/VORPCORE/vorp-core-lua.git vorp_core

Import the Database

Bash
mysql -u redm_user -p redm_server < ~/redm/server-data/resources/[core]/vorp_core/database/vorp_core.sql

Configure VORP Core

Lua
-- vorp_core/config.lua
Config = {}

Config.MaxCharacters = 5
Config.StartingMoney = 100.00
Config.StartingGold = 5.00

Config.DefaultSpawn = {
    x = -279.22, y = 788.42, z = 118.35, heading = 180.0
}

Config.SaveInterval = 5        -- minutes
Config.WhitelistEnabled = false
Config.RespawnTime = 60        -- seconds
Config.RespawnCost = 5.00      -- dollars deducted on death

Add to server.cfg

Config
ensure oxmysql
ensure vorp_core

---

Installing VORP Character

VORP Character handles character creation, selection, and appearance customization.

Bash
cd ~/redm/server-data/resources/[core]
git clone https://github.com/VORPCORE/vorp_character-lua.git vorp_character
mysql -u redm_user -p redm_server < vorp_character/database/vorp_character.sql

Configuration

Lua
-- vorp_character/config.lua
Config = {}
Config.MinFirstNameLength = 2
Config.MaxFirstNameLength = 20
Config.MinAge = 18
Config.MaxAge = 80
Config.Genders = {
    { label = "Male", value = "male", model = "mp_male" },
    { label = "Female", value = "female", model = "mp_female" }
}
Config.AppearanceOptions = {
    face = true, hair = true, beard = true,
    body = true, overlays = true, clothing = true
}

Add ensure vorp_character to server.cfg after vorp_core.

---

Installing VORP Inventory

Bash
cd ~/redm/server-data/resources/[core]
git clone https://github.com/VORPCORE/vorp_inventory-lua.git vorp_inventory
mysql -u redm_user -p redm_server < vorp_inventory/database/vorp_inventory.sql

Configuration

Lua
-- vorp_inventory/config.lua
Config = {}

Config.InventoryType = "weight"
Config.MaxWeight = 24000        -- grams
Config.HotbarSlots = 5
Config.MaxStack = 50
Config.DropOnDeath = false
Config.UsePickupAnimation = true
Config.OpenKey = "TAB"

Register Items

Items must be registered in the database before use:

SQL
INSERT INTO items (item, label, weight, description, type) VALUES
('bread', 'Bread', 200, 'A loaf of fresh bread', 'item_standard'),
('water', 'Water Bottle', 500, 'Clean drinking water', 'item_standard'),
('bandage', 'Bandage', 100, 'A basic medical bandage', 'item_standard'),
('whiskey', 'Whiskey', 400, 'A bottle of fine whiskey', 'item_standard'),
('tobacco', 'Tobacco', 50, 'Dried tobacco leaves', 'item_standard'),
('rope', 'Rope', 300, 'A sturdy length of rope', 'item_standard'),
('meat_raw', 'Raw Meat', 500, 'Uncooked animal meat', 'item_standard'),
('meat_cooked', 'Cooked Meat', 400, 'Grilled and ready to eat', 'item_standard'),
('gold_nugget', 'Gold Nugget', 100, 'A small nugget of gold', 'item_standard'),
('horse_reviver', 'Horse Reviver', 300, 'Medicine for a downed horse', 'item_standard'),
('ammo_revolver', 'Revolver Ammo', 150, 'Ammunition for revolvers', 'item_standard'),
('ammo_rifle', 'Rifle Ammo', 200, 'Ammunition for rifles', 'item_standard');

Add ensure vorp_inventory to server.cfg.

---

Database Tables Overview

After installing the core VORP components, your database contains:

TablePurpose
usersPlayer accounts linked by identifier
charactersCharacter data (name, money, job, position)
inventoryPlayer inventory items
itemsItem definitions (name, weight, type)
whitelistWhitelisted player identifiers
loadoutPlayer weapon loadouts
Verify with:

SQL
SHOW TABLES;
SELECT COUNT(*) FROM items;
DESCRIBE characters;

---

Configuring the Economy System

VORP uses a dual-currency system with dollars and gold.

Using the Economy API

Lua
-- Server-side economy functions
local VORPcore = exports.vorp_core:GetCore()

RegisterNetEvent('myScript:buyItem')
AddEventHandler('myScript:buyItem', function(price)
    local source = source
    local Character = VORPcore.getUser(source).getUsedCharacter

    if Character.money >= price then
        Character.removeCurrency(0, price)  -- 0 = dollars, 1 = gold
        TriggerClientEvent('myScript:purchaseComplete', source)
    else
        TriggerClientEvent('myScript:insufficientFunds', source)
    end
end)

-- Admin commands
-- Admin: give dollars
RegisterCommand('givemoney', function(source, args)
    local targetId, amount = tonumber(args[1]), tonumber(args[2])
    if not targetId or not amount then return end
    VORPcore.getUser(targetId).getUsedCharacter.addCurrency(0, amount)
end, true)

-- Admin: give gold
RegisterCommand('givegold', function(source, args)
    local targetId, amount = tonumber(args[1]), tonumber(args[2])
    if not targetId or not amount then return end
    VORPcore.getUser(targetId).getUsedCharacter.addCurrency(1, amount)
end, true)

Automatic Salary System

Lua
local Salaries = {
    sheriff = { money = 50, gold = 0.5 },
    doctor = { money = 40, gold = 0.3 },
    blacksmith = { money = 35, gold = 0.2 },
    farmer = { money = 25, gold = 0.1 },
}

-- Pays salaries every 30 minutes based on character job
CreateThread(function()
    while true do
        Wait(1800000)
        for _, playerId in pairs(GetPlayers()) do
            local user = VORPcore.getUser(tonumber(playerId))
            if user then
                local character = user.getUsedCharacter
                local salary = Salaries[character.job]
                if salary then
                    character.addCurrency(0, salary.money)
                    character.addCurrency(1, salary.gold)
                end
            end
        end
    end
end)

---

Adding VORP Scripts

VORP Stables (Horse Management)

Bash
cd ~/redm/server-data/resources/[gameplay]
git clone https://github.com/VORPCORE/vorp_stables-lua.git vorp_stables
mysql -u redm_user -p redm_server < vorp_stables/database/vorp_stables.sql

Lua
-- vorp_stables/config.lua
Config.Stables = {
    {
        name = "Valentine Stables",
        coords = vector3(-365.89, 770.27, 115.17),
        horses = {
            { model = "A_C_Horse_Arabian_White", name = "White Arabian", price = 850.00 },
            { model = "A_C_Horse_Morgan_Bay", name = "Bay Morgan", price = 150.00 },
            { model = "A_C_Horse_Mustang_Buckskin", name = "Buckskin Mustang", price = 400.00 },
        }
    }
}

VORP Stores (General Shops)

Bash
git clone https://github.com/VORPCORE/vorp_stores-lua.git vorp_stores

Lua
-- vorp_stores/config.lua
Config.Stores = {
    {
        name = "Valentine General Store",
        coords = vector3(-325.29, 774.52, 116.98),
        items = {
            { item = "bread", label = "Bread", price = 2.00 },
            { item = "water", label = "Water", price = 1.00 },
            { item = "whiskey", label = "Whiskey", price = 5.00 },
            { item = "bandage", label = "Bandage", price = 4.00 },
        }
    }
}

VORP Crafting

Bash
git clone https://github.com/VORPCORE/vorp_crafting-lua.git vorp_crafting
mysql -u redm_user -p redm_server < vorp_crafting/database/vorp_crafting.sql

Lua
-- vorp_crafting/config.lua
Config.Recipes = {
    {
        name = "Cooked Meat",
        result = { item = "meat_cooked", amount = 1 },
        ingredients = { { item = "meat_raw", amount = 1 } },
        craftTime = 10,
        requiredJob = nil,
        station = "campfire"
    }
}

VORP Housing

Bash
git clone https://github.com/VORPCORE/vorp_housing-lua.git vorp_housing
mysql -u redm_user -p redm_server < vorp_housing/database/vorp_housing.sql

Lua
-- vorp_housing/config.lua
Config.Properties = {
    {
        id = "valentine_house_1",
        label = "Valentine Homestead",
        price = 500.00,
        coords = vector3(-300.50, 800.30, 117.50),
        storage = 50,
        maxOwners = 1,
        furnishable = true
    }
}

Complete Resource Load Order

Config
# Database
ensure oxmysql

# VORP Core Framework
ensure vorp_core
ensure vorp_character
ensure vorp_inventory

# VORP Gameplay Scripts
ensure vorp_stables
ensure vorp_stores
ensure vorp_crafting
ensure vorp_housing

# Utility
ensure chat
ensure spawnmanager
ensure hardcap

---

Creating Custom VORP Scripts

Here is a pelt-selling script example showing how to use VORP Core and Inventory APIs together.

fxmanifest.lua

Lua
fx_version 'cerulean'
game 'rdr3'

author 'Your Name'
description 'Custom hunting script for VORP'
version '1.0.0'

shared_scripts { 'config.lua' }
server_scripts { '@oxmysql/lib/MySQL.lua', 'server/main.lua' }

server/main.lua

Lua
local VORPcore = exports.vorp_core:GetCore()

local PeltPrices = {
    deer_pelt = 8.00,
    rabbit_pelt = 3.00,
    bear_pelt = 25.00,
}

RegisterNetEvent('hunting:sellPelts')
AddEventHandler('hunting:sellPelts', function()
    local source = source
    local Character = VORPcore.getUser(source).getUsedCharacter
    local total = 0.0

    for item, price in pairs(PeltPrices) do
        local count = exports.vorp_inventory:getItemCount(source, nil, item)
        if count > 0 then
            exports.vorp_inventory:subItem(source, item, count)
            total = total + (price * count)
        end
    end

    if total > 0 then
        Character.addCurrency(0, total)
        TriggerClientEvent('vorp:NotifyTip', source,
            "Sold pelts for %%CODEBLOCK_23%%quot; .. string.format("%.2f", total), 4000)
    end
end)

---

Managing the Admin Panel

VORP Core provides built-in admin commands: /addmoney, /addgold, /setjob, /revive, /tp, /bring, /kick, and /ban.

Admin Groups in server.cfg

Config
add_ace group.owner vorp.admin allow
add_ace group.owner vorp.superadmin allow
add_ace group.admin vorp.admin allow
add_principal identifier.license:your_license_hash group.owner

You can also manage admin status directly in the database:

SQL
UPDATE characters SET `group` = 'admin' WHERE charidentifier = 1;

---

Common VORP Errors and Troubleshooting

"VORP Core not found"

Ensure resources load in order: oxmysql then vorp_core then other VORP resources.

Character Creation Issues

  • 1.Verify tables exist: SHOW TABLES LIKE '%character%';
  • 2.Check the SQL import completed without errors
  • 3.Look for Lua errors in the server console
  • Inventory Items Not Showing

  • 1.Verify items in database: SELECT * FROM items;
  • 2.Item names are case-sensitive and must match exactly
  • 3.Restart the resource: ensure vorp_inventory
  • Economy Not Working

    Check that Character.addCurrency(0, amount) uses 0 for dollars and 1 for gold. Verify the money and gold columns are populated in the characters table.

    ---

    Performance Optimization

    Database Optimization

    SQL
    ALTER TABLE characters ADD INDEX idx_identifier (identifier);
    ALTER TABLE characters ADD INDEX idx_job (job);
    ALTER TABLE inventory ADD INDEX idx_charidentifier (charidentifier);
    ALTER TABLE inventory ADD INDEX idx_item (item);
    
    DELETE FROM inventory WHERE charidentifier NOT IN (SELECT charidentifier FROM characters);
    OPTIMIZE TABLE characters;
    OPTIMIZE TABLE inventory;
    

    Script Performance

    • >Cache exports - Store exports.vorp_core:GetCore() once at script load, not per event
    • >Distance-based sleep - Use Wait(2000) by default, reduce to Wait(0) only when players are near interaction points
    • >Batch database queries - Avoid single queries per item when processing multiple items
    ---

    ScriptDescriptionType
    VORP FishingFishing mini-game with sellingGameplay
    VORP MiningOre extraction and tradeJobs
    VORP LumberjackWood chopping and lumberJobs
    VORP FarmingCrop planting and harvestingJobs
    VORP WantedBounty and wanted systemLaw
    VORP LawmanSheriff job with arrestsJobs
    VORP MoonshineBrewing and distributionJobs
    VORP BankingBank accounts and robberyEconomy
    VORP BlacksmithWeapon crafting and repairCrafting
    VORP CampPlaceable camps with storageSurvival
    Find scripts on GitHub (search "VORP" or "RedM"), the Cfx.re Forums, the VORP Discord, and the Tebex/CFX Store. Before installing, verify the script was recently updated, supports your VORP Core version, and has all dependencies listed.

    ---

    Conclusion

    Your VORP-powered RedM server now has character creation, inventory management, economy, and essential gameplay scripts. From here:

    • >Add community scripts based on your server's theme
    • >Create custom Lua scripts using the VORP API
    • >Fine-tune economy values through playtesting
    • >Build a unique Wild West experience for your community
    Next steps:
    • >Add job scripts for sheriff, doctor, blacksmith, and rancher
    • >Set up Discord webhooks for server events
    • >Create custom events and storylines for roleplay
    • >Monitor performance and optimize queries as your player base grows