IsMainMenuActive: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(OOP syntax)
Line 26: Line 26:
==See Also==
==See Also==
{{GUI_functions}}
{{GUI_functions}}
{{GUI_events}}

Revision as of 17:21, 21 November 2018

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

Syntax

bool isMainMenuActive ()

OOP Syntax Help! I don't understand this!

Method: GuiElementisMainMenuActive(...)
Variable: .mainMenuActive


Returns

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

Example

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

General functions

Browsers

Buttons

Checkboxes

Comboboxes

Edit Boxes

Gridlists

Memos

Progressbars

Radio Buttons

Scrollbars

Scrollpanes

Static Images

Tab Panels

Tabs

Text Labels

Windows

Input

GUI