script:ui_event:rotateelement
rotateElement
- Parameters & Types:
- playerid: number player ID
- uiid: string the UIID of the custom UI
- elementid: the UIID of the string element
- rotate: number rotation angle
- Return value and type:
- ErrorCode. OK
- The main function of this method: to rotate the element
- 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 rotated local elementid="6986982063319417057_1"-- ID of the component to be rotated local rotate=90--The number of degrees to rotate (clockwise) --Rotate the element to the player Customui:rotateElement(playerid, uiid, elementid, rotate) end ScriptSupportEvent:registerEvent([=[Player.ClickBlock]=],clickblock)
script/ui_event/rotateelement.txt · Last modified: 2024/06/11 02:35 by don