Customui:hideElement(playerid, uiid, elementid [, effectid, time])
API Description Hides a visible UI component, optionally with animation effects.
| Parameters | Types | Info | Default |
|---|---|---|---|
| playerid | number | Player ID | - |
| uiid | string | Parent UI ID | - |
| elementid | string | Component ID to hide | - |
| effectid | number | Animation type (optional) | 0 |
| time | number | Animation duration in s(optional) | 0 |
| Return Value | Type |
|---|---|
| ErrorCode.OK (0) | number |
-- Basic instant hide local function clickblock(event) local playerid = event.eventobjid local uiid = "6986982063319417057" -- Replace with your UI ID local elementid = "6986982063319417057_1" -- Replace with component ID -- Hide component immediately Customui:hideElement(playerid, uiid, elementid) end -- Advanced usage with fade-out local function hideWithEffect(event) local playerid = event.eventobjid Customui:hideElement(playerid, "6986982063319417057", "6986982063319417057_1", 1, 500) -- 500ms fade-out end ScriptSupportEvent:registerEvent([=[Player.ClickBlock]=], clickblock)
| effectid | Animation Type |
|---|---|
| 0 | Instant |
| 10001 | Fade In |
| 10002 | Zoom In |
| 10003 | Zoom Out |