setSize

From Customui Class

  Customui:setSize(playerid, uiid, elementid, width, height)

API Description Sets the dimensions of a UI component.

Parameters Types Info
playerid number Player ID
uiid string Custom UI ID
elementid string Target component ID
width number New width in pixels
height number New height in pixels
Return Value Type
ErrorCode.OK (0) number

Examples

setSize_Example.lua
-- Triggered when player clicks a block
local function clickblock(event)
    local playerid = event.eventobjid  -- Clicking player's ID
    local uiid = "6986982063319417057"  -- Replace with your UI ID
    local elementid = "6986982063319417057_3"  -- Replace with component ID
    local width, height = 500, 200  -- New dimensions
 
    -- Resize the specified component
    Customui:setSize(playerid, uiid, elementid, width, height)
end
ScriptSupportEvent:registerEvent([=[Player.ClickBlock]=], clickblock)

Function Details

Parameter Breakdown

Usage Notes