HideMenuForPlayer

From SA-MP Wiki

Jump to: navigation, search


Description:

Hides a menu for a player.


Image:32px-Ambox_warning_orange.png

Note

Crashes the both server and player if an invalid menu ID given.


Parameters:
(menuid, playerid)
menuidThe ID of the menu to hide. Returned by CreateMenu and passed to OnPlayerSelectedMenuRow.
playeridThe ID of the player that the menu will be hidden for.


Return Values:

  • 1: The function executed successfully.
  • 0: The function failed to execute.


Example Usage:

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.

Template:GetPlayerMenu

Personal tools
Navigation
Toolbox
In other languages