Configuration
Comprehensive configuration guide for the Taintless Multicharacter system — UI, character slots, spawn settings, appearance, and more.
This file contains the necessary configurations for the character creation and management system.
Configuration File
UI Configuration
Interface Color
Defines the interface colors using hex color codes.
UIColor = '#FBCA79', -- Interface colorTip: You can use any hex color code (e.g., #FF4F79, #FBCA79, #3498db)
Display Elements
Controls which UI elements are displayed to players.
UIDisplay = {
BuySlot = true, -- Shows the character slot purchase button
DeleteCharacter = true, -- Shows the character deletion button
},Custom UI Logic
Allows you to define custom interface logic that triggers when the camera becomes active.
CustomUIFunction = function(get) -- (get: true/false) true when camera is active
-- Example: Toggle HUD visibility
-- exports['your-hud']:toggleHUD(not get)
end,Character Slots
MaxCharacterSlot
Sets the maximum number of character slots a player can have.
MaxCharacterSlot = 6, -- Maximum number of character slotsDefaultCharSlot
Determines how many character slots players start with by default.
DefaultCharSlot = 3, -- Default number of character slots for new playersSpawn Settings
When enabled, players skip the spawn selection menu and respawn at their last location.
SkipSelection = false, -- Set to true to skip spawn selectionDefines custom spawn logic that runs on the client side when a character spawns.
Note: This function only runs on the client side.
SpawnFunction = function(data) -- (client-side only)
TriggerEvent('qb-spawn:client:setupSpawns', data.citizenid)
TriggerEvent('qb-spawn:client:openUI', true)
end,Sets the default spawn location using vec4 format (x, y, z, heading).
DefaultSpawn = vec4(-540.58, -212.02, 37.65, 208.88),Configures the housing spawn interface for apartment/property spawning.
SetHousingSpawnUI = function(data) -- (client side only)
UZFramework.Apartment.setupSpawnUI(data)
end,Character Appearance
Items and Commands
StarterItems
Defines the items given to new characters upon creation.
StarterItems = { -- Items given to new characters
{ name = 'phone', amount = 1 }, -- Mobile phone
{ name = 'id_card', amount = 1}, -- Identification card
{ name = 'driver_license', amount = 1}, -- Driver's license
-- Add more starter items as needed
},Command
Configures custom commands with permission levels.
Command = {
['logout'] = {
Permission = 'admin', -- Required permission level
Command = 'logout', -- Command name
Text = 'Logout (Admin Only)', -- Display text
Description = {} -- Command description
},
['setchar'] = {
Permission = 'admin', -- Required permission level
Command = 'setchar', -- Command name
Text = 'Set Character Slots', -- Display text
Description = {
{name='Owner', help='CitizenID or License'}, -- Parameter 1
{name='Slot', help='New Max Slot'} -- Parameter 2
}
}
},Advanced Settings
CharacterOffsets
Defines positioning offsets for character display based on the number of available slots.
CharacterOffsets = {
[1] = { -- Single character position
{x = 0.11, y = -0.6, z = -1.4, h = 170.0}
},
[2] = { -- Two character positions
{x = -0.21, y = -0.5, z = -1.5, h = 190.15}, -- Left position
{x = 0.59, y = -0.5, z = -1.5, h = 140.15} -- Right position
},
[3] = { -- Three character positions
{x = -0.61, y = -0.5, z = -1.5, h = 200.15}, -- Left
{x = 0.11, y = -0.6, z = -1.4, h = 170.0}, -- Center
{x = 0.99, y = -0.5, z = -1.5, h = 130.15} -- Right
},
-- Add more configurations for additional slots as needed
},GiveStarterItems
Function that handles giving starter items to new characters. Supports both QBX and QB-Core frameworks.
function GiveStarterItems(source)
local src = source
for _, v in pairs(Customize.StarterItems) do
local info = {}
-- QBX Core compatibility
if GetResourceState('qbx_core'):find('start') then
if v.name == "id_card" then
info = exports.qbx_idcard:GetMetaLicense(src, {'id_card'})
elseif v.name == "driver_license" then
info = exports.qbx_idcard:GetMetaLicense(src, {'driver_license'})
end
-- QB Core compatibility
elseif GetResourceState('qb-core'):find('start') then
local Player = Framework.Functions.GetPlayer(src)
if v.name == "id_card" then
info = {
citizenid = Player.PlayerData.citizenid,
firstname = Player.PlayerData.charinfo.firstname,
lastname = Player.PlayerData.charinfo.lastname,
birthdate = Player.PlayerData.charinfo.birthdate,
gender = Player.PlayerData.charinfo.gender,
nationality = Player.PlayerData.charinfo.nationality
}
elseif v.name == "driver_license" then
info = {
firstname = Player.PlayerData.charinfo.firstname,
lastname = Player.PlayerData.charinfo.lastname,
birthdate = Player.PlayerData.charinfo.birthdate,
type = "Class C Driver License"
}
end
end
UZFramework.AddItem(Player or nil, v.name, v.amount, info, src)
end
endQBXConfig
Loads the configuration file for QBX Core framework compatibility.
QBXConfig = function(appaYeet)
local configData = LoadResourceFile('qbx_core', 'config/client.lua')
local configFunc = load(configData)
return configFunc()
end