isMainMenuActive | Multi Theft Auto: Wiki Skip to content

isMainMenuActive

Client-side
Server-side
Shared

Manual Review Required

Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.


This function returns whether the user is in the mainmenu or not.

OOP Syntax Help! I don't understand this!

  • Method: GuiElement.)(...)
  • Variable: .mainMenuActive

Syntax

bool isMainMenuActive ( )

Returns

  • bool: value

Returns true if the mainmenu is visible, false if not.

Code Examples

shared

This example check if the player is afk.

function isLocalPlayerActive ()
if isMainMenuActive() then
setElementData(getLocalPlayer(),"status","afk")
else
setElementData(getLocalPlayer(),"status","playing")
end
end

See Also

GUI Functions