Custom · origen_admin
The custom/ folder lets you integrate any framework, inventory, ambulance, clothing, ban or vehicle system without touching the core. All files are escrow_ignore — they survive updates.
custom/
├── client/
│ ├── actions.lua — revive, skin, tuning, fuel, vehicle actions
│ ├── inventory.lua — clear/view inventory
│ ├── notifications.lua — notifications
│ └── weather.lua — weather/time sync
├── server/
│ ├── actions.lua — revive, kill, ban system hooks, gang setter
│ ├── apartments.lua — fetch/add player apartments
│ ├── business.lua — fetch business list
│ ├── chat.lua — admin chat messages
│ ├── ck.lua — post-CK hook
│ ├── debug.lua — permission tester command (debug only)
│ ├── gangs.lua — fetch gang list, assign gang
│ ├── inventory.lua — view inventory server-side
│ ├── player.lua — read player metadata (health, hunger, thirst, armor)
│ ├── vehicles.lua — fetch/add/delete player vehicles
│ └── weather.lua — weather/time freeze via qb-weathersync
└── framework/
├── client/
│ ├── qb.lua — QBCore/QBX client bridge exports
│ └── esx.lua — ESX client bridge exports
└── server/
├── qb.lua — QBCore/QBX server bridge exports
└── esx.lua — ESX server bridge exportscustom/client/actions.lua
SelfRevive()
Revive the local admin. Dispatches to the configured Config.AmbulanceSystem.
-- qb-ambulancejob → hospital:client:Revive
-- wasabi_ambulance → wasabi_ambulance:revive
-- default → /revive commandModifySkin()
Open the clothing menu for the local admin. Dispatches to Config.ClothingSystem.
-- origen_clothing → origen_clothing:openClothingMenu
-- qb-clothing → qb-clothing:client:openMenu
-- illenium-appearance → illenium-appearance:client:openClothingShop
-- vms_clothestore → exports vms_clothestore:OpenWardrobe()ModifyVehicle()
Open the tuning menu for the current vehicle. Dispatches to Config.TunningSystem.
-- qb-mechanicjob → exports qb-mechanicjob:PaintCategories()
-- vms_tunning → exports vms_tuning:openTuning()
-- esx_tunning → exports esx_tuning:OpenMenu()
-- okokTunning → TriggerServerEvent okokTuning:openFreeMenuSetMaxVehicleFuel(vehicle)
Refuel the given vehicle to 100%. Dispatches to Config.FuelSystem.
-- default → SetVehicleFuelLevel(vehicle, 100.0)
-- legacyfuel → exports LegacyFuel:SetFuel(vehicle, 100)FixVehicle(vehicle) / UnlockVehicle(vehicle) / BoostVehicle(vehicle)
Built-in vehicle actions. BoostVehicle applies max engine, brakes, traction and handling overrides.
custom/client/inventory.lua
ClearInv(source)
Clears a player's inventory by running the appropriate command for Config.Inventory.
Supported: origen_inventory, qs-inventory, codem-inventory, ox_inventory, qb-inventory.
SeeInv(source)
Opens a player's inventory. Falls back to origen_admin:server:open_otherinv if the inventory has no client-side command.
Supported client-side: origen_inventory, qs-inventory, codem-inventory, ox_inventory.
Server-side fallback: qb-inventory (via OpenInventoryById).
custom/client/notifications.lua
ShowNotification(text)
Show a notification to the local admin. Dispatches to Config.Framework.
function ShowNotification(text)
-- 'qbcore' → TriggerEvent("QBCore:Notify", text)
-- 'esx' → Framework.ShowNotification(text)
endcustom/client/weather.lua
Manages weather and time sync. Auto-detects qb-weathersync if present.
SetWeather(weather, isSynced)
Set the weather type. If isSynced = true and qb-weathersync is running, syncs to all players.
SetWeatherTime(hour, minute)
Override the game clock to a specific time.
SetWeatherSync(state) → enables/disables qb-weathersync sync
IsTimeFreezed() / IsWeatherFreezed() → boolean
custom/server/actions.lua
BanPlayerHandler(license, targetId, time, staffName, reason)
Called when Config.CustomBanSystem = true. Implement your custom ban logic here.
function BanPlayerHandler(license, targetId, time, staffName, reason)
-- implement custom ban
endUnbanPlayerHandler(license)
Called when unbanning with Config.CustomBanSystem = true.
function UnbanPlayerHandler(license)
endIsbannedHandler(license) → false | { banTime, expireTime, reason, staff }
Called on player connect with Config.CustomBanSystem = true. Return false if not banned, or a table with ban details.
function IsbannedHandler(license)
return false
endcustom/server/ck.lua
OnCK(identifier)
Hook fired after a player is wiped (CK). Add custom cleanup logic here — extra DB queries, events, etc.
function OnCK(identifier)
-- Example: delete player properties
-- MySQL.query.await("DELETE FROM player_properties WHERE citizenid = ?", { identifier })
endcustom/server/vehicles.lua
GetPlayerVehicles(citizenid) → table[]
Fetches a player's registered vehicles from the DB. Auto-resolves the query based on Config.GarageSystem and Config.Framework. Returns { label, subData (plate), garage } per vehicle.
AddPlayerVehicle(citizenid, model) has no default implementation — you must write the INSERT query for your specific vehicle table.
custom/server/apartments.lua
GetPlayerApartments(citizenid) → table[]
Fetches a player's owned properties. Auto-resolves based on Config.HousingSystem.
AddPlayerApartment(citizenid, type) has no default implementation — you must write the INSERT query for your housing system.
custom/server/player.lua
Override these functions to read player metadata from your framework's structure:
| Function | Returns | Default reads from |
|---|---|---|
GetPlayerHealth(player) | number | PlayerData.metadata.health (default 200) |
GetPlayerHunger(player) | number | PlayerData.metadata.hunger (default 100) |
GetPlayerThirst(player) | number | PlayerData.metadata.thirst (default 100) |
GetPlayerArmor(player) | number | PlayerData.metadata.armor (default 0) |
custom/server/chat.lua
SendChatMessage(src, header, color, message)
Send a formatted chat message to a player.
function SendChatMessage(src, header, color, message)
TriggerClientEvent('chatMessage', src, header, color, message)
end