---
title: "PlayerGangZoneGetPos | open.mp"
description: "获取帮派区域的坐标范围（最小X/Y，最大X/Y）"
canonical: https://omp.itsneufox.com/zh-CN/docs/scripting/functions/PlayerGangZoneHide
language: zh-CN
---

# PlayerGangZoneGetPos

注意

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

## 描述

用于获取玩家专属帮派区域的坐标范围（西/南/东/北边界）

| 参数 | 说明 |
| --- | --- |
| playerid | 目标玩家 ID |
| zoneid | 要查询的帮派区域 ID |
| &Float:minX | 用于存储西侧 X 坐标的浮点变量（通过引用传递） |
| &Float:minY | 用于存储南侧 Y 坐标的浮点变量（通过引用传递） |
| &Float:maxX | 用于存储东侧 X 坐标的浮点变量（通过引用传递） |
| &Float:maxY | 用于存储北侧 Y 坐标的浮点变量（通过引用传递） |

## 返回值

此函数始终返回 **true**

## 示例

```c
new gGangZoneID[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
    // 创建玩家专属帮派区域（坐标范围：2236.1475,2424.7266 至 2319.1636,2502.4348）
    gGangZoneID[playerid] = CreatePlayerGangZone(playerid, 2236.1475, 2424.7266, 2319.1636, 2502.4348);

    new
        Float:minX,
        Float:minY,
        Float:maxX,
        Float:maxY;

    // 获取区域四至坐标
    PlayerGangZoneGetPos(playerid, gGangZoneID[playerid], minX, minY, maxX, maxY);
    return 1;
}
```

## 相关函数

-   [CreatePlayerGangZone](https://omp.itsneufox.com/zh-CN/docs/scripting/functions/CreatePlayerGangZone): 创建玩家专属帮派区域
-   [PlayerGangZoneDestroy](https://omp.itsneufox.com/zh-CN/docs/scripting/functions/PlayerGangZoneDestroy): 销毁帮派区域
-   [PlayerGangZoneShow](https://omp.itsneufox.com/zh-CN/docs/scripting/functions/PlayerGangZoneShow): 显示指定颜色的帮派区域
-   [PlayerGangZoneHide](https://omp.itsneufox.com/zh-CN/docs/scripting/functions/PlayerGangZoneHide): 隐藏帮派区域
-   [PlayerGangZoneFlash](https://omp.itsneufox.com/zh-CN/docs/scripting/functions/PlayerGangZoneFlash): 启动闪烁效果
-   [PlayerGangZoneStopFlash](https://omp.itsneufox.com/zh-CN/docs/scripting/functions/PlayerGangZoneStopFlash): 停止闪烁
-   [PlayerGangZoneGetFlashColour](https://omp.itsneufox.com/zh-CN/docs/scripting/functions/PlayerGangZoneGetFlashColour): 获取闪烁颜色值
-   [PlayerGangZoneGetColour](https://omp.itsneufox.com/zh-CN/docs/scripting/functions/PlayerGangZoneGetColour): 获取基础颜色值
-   [IsValidPlayerGangZone](https://omp.itsneufox.com/zh-CN/docs/scripting/functions/IsValidPlayerGangZone): 验证区域有效性
-   [IsPlayerInPlayerGangZone](https://omp.itsneufox.com/zh-CN/docs/scripting/functions/IsPlayerInPlayerGangZone): 检测玩家是否在区域内
-   [IsPlayerGangZoneVisible](https://omp.itsneufox.com/zh-CN/docs/scripting/functions/IsPlayerGangZoneVisible): 检测区域可见性
-   [IsPlayerGangZoneFlashing](https://omp.itsneufox.com/zh-CN/docs/scripting/functions/IsPlayerGangZoneFlashing): 检测区域闪烁状态
-   [UsePlayerGangZoneCheck](https://omp.itsneufox.com/zh-CN/docs/scripting/functions/UsePlayerGangZoneCheck): 启用区域进出回调检测
