Statuses
Dynamically handle your statuses.
Registering new status
exports['ZSX_UIV2']:RegisterStatus(statusName, icon, defaultValue, getFunction)Params explained
Parameter
Type
About
Example register of the status
local statusName = "hygiene" -- name of the status
local icon = "fas fa-soap" -- icon of the status
local defaultValue = 100 -- default value of the status, 100 means max level
local getFunction = function()
return exports['my-pseudo-status']:GetHygieneLevel() -- returns hygiene level from
--our pseudo resource called "my-pseudo-status" with export name of GetHygieneLevel()
end
exports['ZSX_UIV2']:RegisterStatus(statusName, icon, defaultValue, getFunction)Be careful!
Unregistering status
Params explained
Parameter
Type
About
Last updated