mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 15:06:02 +01:00
13 lines
402 B
Lua
13 lines
402 B
Lua
local maxProps = GetConvarInt('ox:progressPropLimit', 2)
|
|
|
|
---@param props ProgressPropProps | ProgressPropProps[] | nil
|
|
RegisterNetEvent('ox_lib:progressProps', function(props)
|
|
if type(props) == 'table' then
|
|
props = #props > maxProps and { table.unpack(props, 1, maxProps) } or props
|
|
else
|
|
props = nil
|
|
end
|
|
|
|
Player(source).state:set('lib:progressProps', props, true)
|
|
end)
|