Dynamically gathering UI positions
About
If you would like to get fixed position, this guide is for you!
Gathering
Simply headover to your resource and apply that code:
RegisterNetEvent('ZSX_UI:Storage:OnPositionUpdate')
AddEventHandler('ZSX_UI:Storage:OnPositionUpdate', function(component, position, width, height)
--@param component STRING {
-- hud
-- progressBar
-- carhud
-- notifies
--}
--@param position OBJECT {
-- x: x
-- y: y
--}
--@param width NUMBER (PX)
--@param height NUMBER (PX)
end)
Params
Param
Data
component
Available components list is detailed in the bottom.
position
Returns object with x and y offsets in pixels
width
Returns width offset in pixels of selected element
height
Returns height offset in pixels of selected element
Components
Component
hud
progressBar
carhud
notifies
Last updated