script:world_event:iscreaterunmode
isCreateRunMode
- Parameters and types: None
- Return value and type:
- code: numberSuccess (ErrorCode.OK) ErrorCode
- The main function of this method: Switch from creative mode to survival mode
- The specific use cases are as follows:
Judge whether it is creative mode to survival mode
local result=World:isCreateRunMode() if result==0 then--If it is creative mode to survival mode Chat:sendSystemMsg("Current mode is creative mode to survival mode!") else--If it is not creative mode to survival mode Chat:sendSystemMsg("Current mode is not creative mode to survival mode!") end
If you have any questions about Developer Tools, feel free to join our official discord server Mini World Global DEV discord
script/world_event/iscreaterunmode.txt · Last modified: 2024/06/01 05:10 by don