HideMenuForPlayer
Description:
Function HideMenuForPlayer hides a menu for a player.
Crashes the both server and player if an invalid menu ID given. |
Parameters:
(menuid, playerid)
int | menuid | The ID of the menu to hide. Returned by CreateMenu and passed to OnPlayerSelectedMenuRow. |
int | playerid | The ID of the player that the menu will be hidden for. |
Return Values:
- 1: The function was executed successfully.
- 0: The function failed to execute.
Examples:
if(strcmp(cmdtext, "/menuhide", true) == 0) { new Menu:myMenu = GetPlayerMenu(playerid); HideMenuForPlayer(myMenu, playerid); return 1; }
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.
- AddMenuItem: Add an item to a menu.
- SetMenuColumnHeader: Set the header for one of the columns in a menu.
- CreateMenu: Create a menu.