Custom · origen_clothing
The custom/ folder lets you integrate any framework, notification or store access logic without touching the core. All files here are escrow_ignore — they survive updates.
custom/
├── client/
│ ├── framework.lua — player identifier, job, gender, loaded state
│ ├── notify.lua — notifications and text UI
│ ├── store.lua — gate who can open a store
│ └── visuals.lua — hide/show HUD when clothing menu opens
└── server/
├── framework.lua — player identifier, job, money, permissions, group, gender
└── permissions.lua — admin checkcustom/client/framework.lua
Custom.GetPlayerIdentifier() → string | nil
Returns the local player's unique identifier (citizenid / identifier).
Custom.GetPlayerIdentifier = function()
-- Config.Framework == 'custom': implement here
return nil
endCustom.GetJob() → { name, grade }
Returns the local player's current job name and grade level.
Custom.GetJob = function()
return { name = 'unemployed', grade = 0 }
endFramework.GetGender() → number
Returns the local player's gender. 0 = male, 1 = female.
Framework.GetGender = function()
-- Config.Framework == 'custom': implement here
endFramework.isPlayerLoaded() → boolean
Returns true when the player's data is ready and loaded.
Framework.isPlayerLoaded = function()
return false
endcustom/client/notify.lua
Custom.Notify(text, type, length)
Show a notification to the local player.
Custom.Notify = function(text, type, length)
lib.notify({
description = text,
type = type, -- 'info' | 'success' | 'error'
duration = length,
})
endCustom.DrawText(text, key)
Show a text UI interaction hint.
Custom.DrawText = function(text, key)
lib.showTextUI('[' .. key .. '] - ' .. text)
endCustom.HideText()
Hide the text UI hint.
Custom.HideText = function()
lib.hideTextUI()
endcustom/client/store.lua
Custom.CanOpenStore(storeId) → boolean
Gate whether the local player can open a specific store. Called before the store UI opens.
Custom.CanOpenStore = function(storeId)
-- Example: only allow police job to open store ID 1
-- if storeId == 1 then
-- return Custom.GetJob().name == 'police'
-- end
return true
endcustom/client/visuals.lua
Custom.HideVisuals(state)
Called when the clothing menu opens (state = true) or closes (state = false). Use this to hide/show your HUD, radar, minimap, etc.
Custom.HideVisuals = function(state)
-- Example:
-- DisplayRadar(not state)
-- SendNUIMessage({ type = 'hud', visible = not state })
endcustom/server/framework.lua
Custom.GetIdentifier(source) → string | nil
Returns the unique identifier for a player server-side.
Custom.GetIdentifier = function(source)
-- Config.Framework == 'custom': implement here
return nil
endCustom.GetMoney(source, paymentMethod) → number
Returns the player's balance for the given payment method. Falls back to Config.DefaultPaymentMethod if the method is invalid.
Custom.GetMoney = function(source, paymentMethod)
return 0
endCustom.RemoveMoney(source, amount, paymentMethod)
Deducts money from the player's account.
Custom.RemoveMoney = function(source, amount, paymentMethod)
endCustom.GetJob(source) → { name, grade }
Returns the player's current job and grade server-side.
Custom.GetJob = function(source)
return { name = 'unemployed', grade = 0 }
endCustom.GetGroup(source) → string
Returns the player's permission group (e.g. 'admin', 'god').
Custom.GetGroup = function(source)
return 'user'
endCustom.GetGender(source) → number | string
Returns the player's gender server-side. 0 / 'm' = male, 1 / 'f' = female.
Custom.GetGender = function(source)
return 0
endCustom.HasPermission(source, group) → boolean
Checks if a player belongs to a permission group.
Custom.HasPermission = function(source, group)
return false
endcustom/server/permissions.lua
Custom.IsAdmin(source) → boolean
Checks whether a player is considered an admin based on Config.Permissions. Iterates the list and calls Custom.HasPermission for each group. If Config.Permissions is empty, all players are considered admins.
Custom.IsAdmin = function(src)
-- Default logic: checks each group in Config.Permissions
-- To override:
return false
end