UZ Scripts
Multicharacter

Custom Integration

Add unsupported scripts, access exports, and extend the multicharacter system.

The multicharacter system auto-detects and integrates with 10+ appearance, spawn selector, and apartment scripts out of the box. If you use a script that isn't auto-detected, you can add it yourself by editing Compatibility.lua.

Compatibility.lua

The core logic in client/main.lua and server/main.lua stays untouched — custom integrations only require modifying Compatibility.lua.


Adding a Skin Setter

Controls how appearance data is applied to a ped (character preview + skin loading).

{ resource = 'your_script', apply = function(ped, skin)
    exports['your_script']:applyAppearance(ped, skin)
end }

Prop

Type


Adding a Skin Creator

Controls the character creator menu that opens when making a new character. Set esx, qb, or both depending on your framework.

{ resource = 'your_script',
    esx = function()
        exports['your_script']:openCreator(function(skin)
            TriggerServerEvent('your_script:server:saveSkin', skin)
        end)
    end,
    qb = function()
        TriggerEvent('your_script:client:CreateFirstCharacter')
    end,
}

Prop

Type


Adding a Spawn Selector

Controls where existing characters spawn after selection.

{ resource = 'your_script', open = function(id)
    TriggerEvent('your_script:client:openSpawn', id)
end }

Prop

Type


Adding an Apartment Handler

Controls first-spawn apartment/housing selection for new characters.

{ resource = 'your_script', setup = function(data)
    TriggerEvent('your_script:client:setupSpawn', data)
end }

Prop

Type


Adding a Skin Fetcher

Server-side database query that loads character appearance data. Add to the appropriate framework key in the skinFetchers table.

skinFetchers.ESX[#skinFetchers.ESX + 1] = {
    resource = 'your_script',
    fetch = function(identifier)
        local result = MySQL.single.await('SELECT * FROM your_skins WHERE id = ?', { identifier })
        if result then
            return { skin = json.decode(result.skin), model = result.model }
        end
    end,
}

Prop

Type


Exports

Client-side exports for accessing cached character mugshots from external scripts.

GetCachedMugshot

local mugshot = exports['uz_Multicharacter-2']:GetCachedMugshot(citizenid)

Prop

Type

GetAllCachedMugshots

local allMugshots = exports['uz_Multicharacter-2']:GetAllCachedMugshots()

Prop

Type


Commands

CommandDescription
/logoutReturns to character selection screen.

Character Creation Rules

Prop

Type

On this page