User Tools

Site Tools


script:ui_event:showelement

showElement

  • 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 display the components
  • 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 to be displayed
    local elementid="6986982063319417057_1"--The ID of the component to be displayed
    --Display the symbol to the player
    Customui:showElement(playerid, uiid, elementid)
end
ScriptSupportEvent:registerEvent([=[Player.ClickBlock]=],clickblock)
script/ui_event/showelement.txt · Last modified: 2024/06/11 02:31 by don