Skip to content

Database tables

Both entries are in editable/framework.lua and need oxmysql.

EntryUse it whenReturns
inventoryTablesYour database schema is custom (built in for Qbox, QBCore, ESX, ox_core and ND_Core).Character and vehicle table names and columns
extraCharacterTablesYour scripts keep character data in their own tables.{ { 'table', 'column' }, … }; the column holds the character id
editable/framework.lua
EditableServer.extraCharacterTables = {
custom = true,
fn = function()
return { { 'my_houses', 'citizenid' }, { 'my_phone_messages', 'owner' } }
end,
}
editable/framework.lua
EditableServer.inventoryTables = {
custom = true,
fn = function()
return {
characters = { table = 'characters', id = 'charid', inventory = 'inventory', nameExpr = 'name' },
vehicles = { table = 'owned_cars', plate = 'plate', modelExpr = 'model', owner = 'charid' },
}
end,
}

Deleted characters are backed up in your database (fiveops_deleted_characters) for 30 days and restored from Players → Deleted characters. Tables must be InnoDB. Fiveops then triggers the server events fiveops:characterDeleted and fiveops:characterRestored (citizenId, info) so your scripts can refresh; the framework’s own characterDeleted event is not triggered.