---
title: "HideGameTextForAll | open.mp"
description: "隐藏所有玩家的指定样式游戏文本。"
canonical: https://omp.itsneufox.com/zh-CN/docs/scripting/functions/HideGameTextForAll
language: zh-CN
---

# HideGameTextForAll

注意

这个函数是在omp v1.1.0.2612中添加的，在以前的版本中不起作用！

## 描述

停止为所有玩家显示指定样式的游戏文本。

| 参数名 | 说明 |
| --- | --- |
| style | 要隐藏的[游戏文本样式](https://omp.itsneufox.com/zh-CN/docs/scripting/resources/gametextstyles)编号 |

## 返回值

此函数不返回特定值。

## 示例

```c
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (!strcmp(cmdtext, "/hidegametext3", true))
    {
        if (!IsPlayerAdmin(playerid))
        {
            return 1;
        }

        HideGameTextForAll(3);
        return 1;
    }
    return 0;
}
```

## 相关函数

-   [HideGameTextForPlayer](https://omp.itsneufox.com/zh-CN/docs/scripting/functions/HideGameTextForPlayer): 隐藏单个玩家的游戏文本
-   [GameTextForPlayer](https://omp.itsneufox.com/zh-CN/docs/scripting/functions/GameTextForPlayer): 为玩家显示游戏文本
-   [GameTextForAll](https://omp.itsneufox.com/zh-CN/docs/scripting/functions/GameTextForAll): 为所有玩家显示游戏文本
-   [TextDrawHideForAll](https://omp.itsneufox.com/zh-CN/docs/scripting/functions/TextDrawHideForAll): 隐藏全服文本绘图元素
