GetPlayerMenu
Description:
Function GetPlayerMenu gets the ID of the menu the player is currently viewing (shown by ShowMenuForPlayer).
Returns previous menu when none is displayed. |
Parameters:
(playerid)
int | playerid | The ID of the player to get the current menu of. |
Return Values:
The ID of the player's currently shown menu, or INVALID_MENU (255) if no menu shown. Value returned is tagged with Menu:.
Examples:
new Menu:CurrentMenu = GetPlayerMenu(playerid); // Store the player's current menu in 'CurrentMenu'
Related Functions
The following functions may be useful, as they are related to this function in one way or another.
- ShowMenuForPlayer: Show a menu for a player.
- HideMenuForPlayer: Hide a menu for a player.
- CreateMenu: Create a menu.
- DestroyMenu: Destroy a menu.
- AddMenuItem: Add an item to a menu.
Related Callbacks
The following callbacks might be useful as well, as they are related to this callback in one way or another.
- OnPlayerSelectedMenuRow: Called when a player selected a row in a menu.
- OnPlayerExitedMenu: Called when a player exits a menu.