---
title: "GangZoneShowForPlayer | open.mp"
description: "为指定玩家显示帮派区域。"
canonical: https://omp.itsneufox.com/zh-CN/docs/scripting/functions/GangZoneShowForPlayer
language: zh-CN
---

# GangZoneShowForPlayer

## 描述

为指定玩家显示帮派区域。需预先使用[GangZoneCreate](https://omp.itsneufox.com/zh-CN/docs/scripting/functions/GangZoneCreate)创建。

| 参数 | 说明 |
| --- | --- |
| playerid | 目标玩家 ID |
| zoneid | 要显示的帮派区域 ID（由[GangZoneCreate](https://omp.itsneufox.com/zh-CN/docs/scripting/functions/GangZoneCreate)创建返回） |
| colour | 显示颜色（RGBA 格式的整型或十六进制值，支持透明度通道） |

## 返回值

显示成功返回**1**，否则返回**0**（帮派区域不存在）

## 示例

```c
new gGangZoneId;

public OnGameModeInit()
{
    gGangZoneId = GangZoneCreate(1082.962, -2787.229, 2942.549, -1859.51);
    return 1;
}

public OnPlayerSpawn(playerid)
{
    GangZoneShowForPlayer(playerid, gGangZoneId, 0xFFFF0096);
    return 1;
}
```

## 相关函数

-   [GangZoneCreate](https://omp.itsneufox.com/zh-CN/docs/scripting/functions/GangZoneCreate): 创建帮派区域
-   [GangZoneDestroy](https://omp.itsneufox.com/zh-CN/docs/scripting/functions/GangZoneDestroy): 销毁帮派区域
-   [GangZoneShowForPlayer](https://omp.itsneufox.com/zh-CN/docs/scripting/functions/GangZoneShowForPlayer): 为玩家显示帮派区域
-   [GangZoneHideForPlayer](https://omp.itsneufox.com/zh-CN/docs/scripting/functions/GangZoneHideForPlayer): 为玩家隐藏帮派区域
-   [GangZoneHideForAll](https://omp.itsneufox.com/zh-CN/docs/scripting/functions/GangZoneHideForAll): 为所有玩家隐藏帮派区域
-   [GangZoneFlashForPlayer](https://omp.itsneufox.com/zh-CN/docs/scripting/functions/GangZoneFlashForPlayer): 使帮派区域对玩家闪烁
-   [GangZoneFlashForAll](https://omp.itsneufox.com/zh-CN/docs/scripting/functions/GangZoneFlashForAll): 使帮派区域对所有玩家闪烁
-   [GangZoneStopFlashForPlayer](https://omp.itsneufox.com/zh-CN/docs/scripting/functions/GangZoneStopFlashForPlayer): 停止帮派区域对玩家闪烁
-   [GangZoneStopFlashForAll](https://omp.itsneufox.com/zh-CN/docs/scripting/functions/GangZoneStopFlashForAll): 停止帮派区域对所有玩家闪烁
