UZ Scripts
Multicharacter

ESX Configuration

Required database and code modifications to support nationality field in ESX for Boyraz Multicharacter.

This guide covers the necessary database and code adjustments to add nationality support when using the ESX framework with the Boyraz Multicharacter.

Important: Always create a backup of your database and es_extended files before making any modifications.

Database Migration

Run the following SQL query on your database to add the nationality column to the users table:

ALTER TABLE `users` ADD COLUMN `nationality` VARCHAR(100) DEFAULT NULL AFTER `dateofbirth`;

You can execute this via phpMyAdmin, HeidiSQL, or any MySQL client connected to your server database.


Target File

You need to edit one file in your ESX core:

main.lua

Required Modifications

New Player Query

Line ~9 — Locate the newPlayer query string and add the nationality column:

newPlayer = newPlayer .. ", `firstname` = ?, `lastname` = ?, `dateofbirth` = ?, `sex` = ?, `height` = ?"
newPlayer = newPlayer .. ", `firstname` = ?, `lastname` = ?, `dateofbirth` = ?, `sex` = ?, `height` = ?, `nationality` = ?"

Player Data Parameters

Line ~35 — Add data.nationality to the parameter list:

{ json.encode(accounts), identifier, Core.generateSSN(), defaultGroup, data.firstname, data.lastname, data.dateofbirth, data.sex, data.height }
{ json.encode(accounts), identifier, Core.generateSSN(), defaultGroup, data.firstname, data.lastname, data.dateofbirth, data.sex, data.height, data.nationality }

Verify Changes

  1. Save main.lua
  2. Restart your FiveM server
  3. Monitor the console for any errors
  4. Test in-game by creating a new character and confirming nationality is saved correctly

Setup Complete: Your ESX framework now supports the nationality field for the Boyraz Multicharacter.

Maintenance Note

Updating es_extended will overwrite these changes. Remember to reapply modifications to main.lua and verify the database column after any framework updates.

Troubleshooting

On this page