User Tools

Site Tools


script:ui_event:hideelement

hideElement

  • Parameters & Types:
    • playerid: number player ID
    • uiid: the ID of the string interface
    • elementid: the ID of the string component
    • effectid: number (default parameter)
  • time: number animation duration (default parameter)
  • Return value and type:
    • ErrorCode. OK
  • The main purpose of this method: to hide the component
  • Specific use cases are as follows:
--This function is executed when the player clicks on the block
local function clickblock(event)
    local playerid=event.eventobjid--Click on the player's mini number of the block
    local uiid="6986982063319417057"-- The interface ID of the component you want to hide
    local elementid="6986982063319417057_1"--The ID of the component to be hidden
    --Hide components from the player
    Customui:hideElement(playerid, uiid, elementid)
end
ScriptSupportEvent:registerEvent([=[Player.ClickBlock]=],clickblock)
script/ui_event/hideelement.txt · Last modified: 2024/06/11 02:32 by don