Custom · origen_titlemenu
The custom/ folder handles framework integration, skin application, spawn logic and logs without touching the core. All files are escrow_ignore — they survive updates.
custom/
├── client/
│ └── client.lua — notifications, skin application, character creation, post-spawn hook
└── server/
├── function.lua — last position query, ESX character creation query
├── server.lua — starter items, slot commands, phone number helpers
└── logs.lua — Discord webhook loggingcustom/client/client.lua
ShowNotification(msg)
Show a notification to the local player. Dispatches to Config.Framework.
function ShowNotification(msg)
-- 'qbcore' → TriggerEvent('QBCore:Notify', msg)
-- 'esx' → ESX.ShowNotification(msg)
endCreatePlayer()
Called when a new character needs to open the appearance creator. Dispatches to Config.Framework:
qbcore→ opensqb-clothingesx→ opensesx_skin:openSaveableMenu
Swap this function to use a different clothing system.
SetSkin(ped, skin)
Apply a skin/appearance to a ped. Dispatches to Config.ClothSystem:
| Value | Applies via |
|---|---|
qb-clothing | qb-clothing:client:loadPlayerClothing |
fivem-appearance | exports['fivem-appearance']:setPedAppearance |
illenium-appearance | exports['illenium-appearance']:setPedAppearance |
codem-appearance | qb-clothing:client:loadPlayerClothing |
skinchanger | ApplySkinSkinChanger(ped, skin) — full GTA native face/body blending |
rcore_clothing | exports.rcore_clothing:setPedSkin (ESX) |
ShutDownLoadingScreenCustom()
Called when the loading screen should be dismissed. Override to add custom transition logic.
function ShutDownLoadingScreenCustom()
ShutdownLoadingScreen()
ShutdownLoadingScreenNui()
endPostSpawnPlayer()
Fired after the player has fully spawned into the world. Add any post-spawn logic here (e.g. trigger events for other resources).
function PostSpawnPlayer()
-- TriggerEvent('myresource:onPlayerSpawned')
endcustom/server/function.lua
Custom.GetLastPosition(cid) → table | nil
Queries the framework's player table to get the last saved position for a character. Returns a decoded position table or nil.
-- qbcore → SELECT position FROM players WHERE citizenid = ?
-- esx → SELECT position FROM users WHERE identifier = ?Custom.QueryCreatePlayer(src, data, id)
Insert a new ESX character into the users table. Only runs on Config.Framework == 'esx'. Handles firstname, lastname, birthdate, sex, nationality, skin, and starting accounts.
custom/server/server.lua
GiveStarterItems(source)
Give the items from Config.StarterItems to a player on first character creation (ESX only). Auto-fills metadata for id_card and driver_license.
GetCharInfoPhone(id) → string | nil
Fetch a player's phone number from the users table. Handles both qs-smartphone charinfo format and a direct phone_number column.
custom/server/logs.lua
SendDiscordLog(webhook, message)
Send a Discord embed log to the given webhook. Called automatically for /logout and /giveslot commands when enabled in Logs.Enabled.
function SendDiscordLog(webhook, message)
PerformHttpRequest(webhook, ..., json.encode({
username = "Title Menu Logs",
embeds = {{ title = "origen_titlemenu", description = message, ... }}
}), { ['Content-Type'] = 'application/json' })
end