Custom · origen_masterjob
The custom/ folder handles framework integration, inventory, clothing, vehicles, fuel and notifications without touching the core. All files are escrow_ignore — they survive updates.
custom/
├── client.lua — notifications, inventory, stash, clothing, garage, mechanic, keys, fuel
├── client_pay_bills.lua — bill payment NPC thread
├── blips.lua — business blip rendering
└── server/
├── command.lua — admin command definitions
├── main.lua — inventory helpers, vehicle queries, payment, keys, bill sending
└── menu/
└── phone.lua — phone number lookupcustom/client.lua
Custom.canOpenMenu(job) → { success, message }
Gate whether the local player can open the business menu. Return success = false with a message to block access.
Custom.canOpenMenu = function(job)
return { success = true, message = '' }
endCustom.ShowNotification(msg)
Show a notification to the local player. Used when Config.CustomNotify = true.
Custom.ShowNotification = function(msg)
-- Add your notification here
-- Example: exports["origen_notify"]:ShowNotification(msg, "business")
endCustom.ShowShopState(msg)
Show a shop-related notification (e.g. purchase success/failure).
Custom.ShowShopState = function(msg)
-- Same as ShowNotification but can use a different style
endShowHelpNotification(key, msg)
Show an interaction hint in the world. Used when Config.OrigenNotify = true.
function ShowHelpNotification(key, msg)
-- Default: uses origen_notify CreateHelp
-- Add your own implementation if not using origen_notify
endCustom.DrawText(key, msg) / Custom.HideText()
Draw text UI interaction hint. Used when Config.customDrawText = true.
GetItemData(item) → table | nil
Returns item data from the active inventory system. Dispatches to Config.Inventory.
OpenStash(Sid, Sslots, label, preId)
Opens a stash inventory. Dispatches to Config.Inventory:
ox_inventory→openInventory('stash', ...)codem-inventory→OpenStash(...)- Others → QBCore stash server event
OpenOutfitMenu(canEdit)
Opens the outfit selection menu. Dispatches to Config.Clothing.
openPlayerInventory(pID)
Open another player's inventory (for mechanic job). Dispatches to Config.Inventory.
Custom.ReapirVehicle(vehicle)
Repair a vehicle. Implement your deformation fix here if needed.
Custom.ReapirVehicle = function(vehicle)
-- exports['VehicleDeformation']:FixVehicleDeformation(vehicle)
endCustom.GetVehicleProperties(vehicle) / Custom.SetVehicleProperties(vehicle, mods)
Get/set vehicle mods. Dispatches to Config.Framework.
Custom.GetVehicleFuel(vehicle) / Custom.SetVehicleFuel(vehicle, fuel)
Get/set vehicle fuel. Implement your fuel system here.
Custom.GetVehicleFuel = function(vehicle)
-- return exports['FuelSystem']:GetFuel(vehicle)
endCustom.OpenModificationMenu(vehicle)
Open the tuning menu. Implement your tuning system here.
Custom.OpenModificationMenu = function(vehicle)
-- Used when Config.CustomMechanic = true
endCustom.GetClientVehicleKeys(vehicle)
Give the player keys for a vehicle client-side. Implement your key system here.
Custom.GetClientVehicleKeys = function(vehicle)
local plate = GetVehicleNumberPlateText(vehicle)
TriggerEvent("vehiclekeys:client:SetOwner", plate)
endCustom.SpawnVehicle(model, cb, coords, isNetwork)
Spawn a vehicle. Dispatches to Config.Framework.
CustomGarage(PlayerData, coords) / CustomGarageBusiness(PlayerData, coords)
Override the default garage with your own system. Only called when Config.CustomGarage = true.
custom/server/main.lua
Custom.RemoveMoney(Player, account, amount, log) → boolean
Remove money from a player's account. Handles ox_inventory item cash and framework accounts.
Custom.GetVehicleKeys(source, plate)
Give vehicle keys server-side. Implement your key system here.
Custom.GetVehicleKeys = function(source, plate)
TriggerClientEvent("vehiclekeys:client:SetOwner", source, plate)
endCustom.GetVehicleData(plate) → { owner } | false
Returns the owner identifier for a vehicle by plate from the framework's vehicle table.
Custom.PlateGenerator() → string
Generate a custom license plate. Implement your own logic here.
Custom.PlateGenerator = function()
local plate = ''
-- your plate generation logic
return plate
endCustom.QueryGiveBusinesscar(values) / Custom.QueryRemoveBusinesscar(values)
Insert or delete a vehicle from the framework's vehicle table when a business vehicle is assigned/removed.
Custom.SendBill → false | function
Override the default bill creation logic. Set to a function to use your own billing system:
Custom.SendBill = function(data, cb)
-- data: { senderSource, receiverSource, price, concept, business }
-- cb(true) on success, cb('error message') on failure
local success = MySQL.insert.await('INSERT INTO bills (...) VALUES (...)', {...})
cb(success or 'Failed to send bill')
end