Database Setup
This page explains the database tables used by 0r-multicharacterv3 and how to set them up.
๐ Required Tables
Table: 0r_multicharacterv3
0r_multicharacterv3Stores additional character slot data for each player.
CREATE TABLE IF NOT EXISTS `0r_multicharacterv3` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`identifier` VARCHAR(100) NOT NULL,
`character_slot` INT(11) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE KEY `identifier` (`identifier`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;id
INT
Auto-increment primary key
identifier
VARCHAR(100)
Player's license2 identifier
character_slot
INT
Additional slots (added to default)
Table: 0r_multicharacterv3_code
0r_multicharacterv3_codeStores redeemable codes for extra character slots.
CREATE TABLE IF NOT EXISTS `0r_multicharacterv3_code` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`code` VARCHAR(100) NOT NULL,
`slot` INT(11) NOT NULL DEFAULT 1,
PRIMARY KEY (`id`),
UNIQUE KEY `code` (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;id
INT
Auto-increment primary key
code
VARCHAR(100)
Unique redeemable code
slot
INT
Number of slots the code gives
๐ Quick Setup
Using the SQL File
Locate
insert-me.sqlin the resource folderOpen your database management tool
Execute the entire SQL file
Manual Creation
Run these queries in your database:
๐ฎ Framework-Specific Tables
The script also interacts with your framework's existing tables:
QBCore / QBox
players
Character data storage
playerskins
Character appearance
ESX
users
Character data storage
(skin in users table)
Character appearance
๐ Optional: House Data (QBCore Only)
If you use qb-houses, the script reads from:
Make sure your houselocations table exists if using housing.
๐ง Character Deletion Tables
When a character is deleted, the script removes data from configured tables. Default tables in config/database.lua:
QBCore Tables
ESX Tables
๐ Adding Custom Codes
To add redeemable slot codes manually:
Players can redeem these codes in the character selection UI.
Last updated