SleepyCode
Home
AboutBlogSubscriptionDocs
Cart0
SleepyCode
Cart0
  • πŸ’£Documentation

Scripts

  • Multicharacter
    • Features
    • Installation
    • Framework Setup
    • Core Settings
    • Characters and Slots
    • Identity
    • Spawn Selector
    • Camera and Scene
    • Arrival and Welcome
    • Starting Items
    • Loading Screen
    • Discord
    • Logs
    • Theme and Branding
    • Translations
    • Commands and Permissions
    • Database
    • Integrations
    • Hooks
    • Exports and Events
    • Examples
    • Security
    • Troubleshooting
  • DevTool
  • Fishing
  • πŸ—ƒοΈGarages V2
  • 🚌Bus Job
  • πŸš—Vehicle Shop V1
  • πŸ—ƒοΈGarages V1
  • 🍁Selldrugs
  • πŸŽ…Advent Calendar
  1. Docs
  2. /Multicharacter
  3. /Database

Multicharacter

Database

Resource tables, automatic schema repair, framework tables, saving, and character deletion.

On this page6 sections
  • Automatic repair
  • Resource tables
  • Framework tables
  • Manual install
  • Saving characters
  • Deleting characters

Automatic repairLink copied

Lua
Config.AutoFixDatabase = true

On start, the resource compares the database with the columns it actually uses.

  • Enabled: creates missing resource tables and adds missing columns. An Unknown column error after an update fixes itself.
  • Disabled: prints the exact CREATE and ALTER statements to run.

The repair never drops, renames, or retypes columns. It does not touch existing rows or create framework tables. It only adds new nullable columns to framework tables.

Run scfixdb to check manually.

Resource tablesLink copied

sc_slots

Slots set with setslots. A row here replaces the calculated limit.

ColumnTypeDescription
licenseVARCHAR(60), PKPlayer identifier
slotsINT UNSIGNEDSlot count
set_byVARCHAR(60)Who set it
updated_atDATETIMEChange date

sc_character_locks

Character locks from lockchar.

ColumnTypeDescription
citizenidVARCHAR(60), PKCharacter
reasonVARCHAR(128)Reason shown to the player
locked_byVARCHAR(60)Who locked it
locked_atDATETIMELock date

Framework tablesLink copied

Characters are saved in the native framework table, so other resources see full character data.

FrameworkTableKeyAdded columns
ESXusersidentifier (char<N>:<license>)metadata, height
QBCoreplayerscitizenidcid, metadata
Qboxplayerscitizenidcid, metadata
ox_corecharacterscharIdnationality, height, weight

Manual installLink copied

sql/install.sql contains the resource tables. Import it when Config.AutoFixDatabase = false.

Saving charactersLink copied

Characters are saved:

  • every 5 minutes
  • on /relog
  • when the player leaves
  • when the resource stops

Deleting charactersLink copied

Deletion by a player or with forcedeletechar is immediate. On ox_core it is a soft delete (deleted = curdate()), like ox_core itself.

If your resources keep their own character data, clean it up in the OnCharacterDeleted hook.

← PreviousCommands and PermissionsMulticharacterNext β†’IntegrationsMulticharacter

On this page

  • Automatic repair
  • Resource tables
  • Framework tables
  • Manual install
  • Saving characters
  • Deleting characters
↑ Back to top
Ready when you are

Put your server on something that holds up

150+ servers run our resources - ESX, QBCore and standalone. Once the payment clears, the package is waiting in Keymaster.

Browse the catalogueAsk on Discord β†—
  • Delivered instantly
  • Support with no expiry
  • 100+ reviews
  • Payment via Tebex

SleepyCode

FiveM Scripts

Checkout is run by Tebex Limited- they handle payment, invoicing and refunds. Β© 2026

Community

  • Discord
  • YouTube
  • X (Twitter)

Navigation

  • Home
  • All Scripts
  • ESX Scripts
  • QBCore Scripts
  • Free Scripts
  • About
  • Blog
  • Documentation
  • Support

Legal

  • Privacy Policy
  • Tebex Privacy Policy
  • Terms of Service
  • Impressum

Β© 2026 SleepyCode. Not affiliated with Rockstar Games or Take-Two Interactive.

Powered byTebex