---
title: "HideMenuForPlayer | open.mp"
description: "Hides a menu for a player."
canonical: https://omp.itsneufox.com/th/docs/scripting/functions/HideMenuForPlayer
language: th
---

# HideMenuForPlayer

## คำอธิบาย

Hides a menu for a player.

| Name | Description |
| --- | --- |
| menuid | The ID of the menu to hide. Returned by CreateMenu and passed to OnPlayerSelectedMenuRow. |
| playerid | The ID of the player that the menu will be hidden for. |

## ส่งคืน

1: The function was executed successfully.

0: The function failed to execute.

## ตัวอย่าง

```c
if (strcmp(cmdtext, "/menuhide", true) == 0)
{
    new Menu:myMenu = GetPlayerMenu(playerid);
    HideMenuForPlayer(myMenu, playerid);
    return 1;
}
```

## บันทึก

warning

Crashes the both server and player if an invalid menu ID given. (Fixed in open.mp)

## ฟังก์ชั่นที่เกี่ยวข้องกัน

-   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.
    
-   [CreateMenu](https://omp.itsneufox.com/th/docs/scripting/functions/CreateMenu): Create a menu.
    
-   [AddMenuItem](https://omp.itsneufox.com/th/docs/scripting/functions/AddMenuItem): Adds an item to a specified menu.
    
-   [SetMenuColumnHeader](https://omp.itsneufox.com/th/docs/scripting/functions/SetMenuColumnHeader): Set the header for one of the columns in a menu.
    
-   [ShowMenuForPlayer](https://omp.itsneufox.com/th/docs/scripting/functions/ShowMenuForPlayer): Show a menu for a player.
