---
title: "GangZoneGetPos | open.mp"
description: "获取帮派区域的坐标位置"
canonical: https://omp.itsneufox.com/zh-CN/docs/scripting/functions/GangZoneGetPos
language: zh-CN
---

# GangZoneGetPos

注意

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

## 描述

获取帮派区域的坐标位置，包括最小 X、最小 Y、最大 X、最大 Y 坐标。

| 参数 | 说明 |
| --- | --- |
| zoneid | 需要获取坐标的帮派区域 ID |
| &Float:minX | 用于存储帮派区域西侧边界 X 坐标的浮点变量（按引用传递） |
| &Float:minY | 用于存储帮派区域南侧边界 Y 坐标的浮点变量（按引用传递） |
| &Float:maxX | 用于存储帮派区域东侧边界 X 坐标的浮点变量（按引用传递） |
| &Float:maxY | 用于存储帮派区域北侧边界 Y 坐标的浮点变量（按引用传递） |

## 返回值

此函数总是返回 **true**。

## 示例

```c
new gangZone;

public OnGameModeInit()
{
    gangZone = GangZoneCreate(1248.011, 2072.804, 1439.348, 2204.319);

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

    GangZoneGetPos(gangZone, minX, minY, maxX, maxY);
    return 1;
}
```

## 相关函数

-   [GangZoneDestroy](https://omp.itsneufox.com/zh-CN/docs/scripting/functions/GangZoneDestroy): 销毁帮派区域
-   [GangZoneShowForPlayer](https://omp.itsneufox.com/zh-CN/docs/scripting/functions/GangZoneShowForPlayer): 为玩家显示帮派区域
-   [GangZoneShowForAll](https://omp.itsneufox.com/zh-CN/docs/scripting/functions/GangZoneShowForAll): 为所有玩家显示帮派区域
-   [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): 停止帮派区域对所有玩家闪烁
-   [IsValidGangZone](https://omp.itsneufox.com/zh-CN/docs/scripting/functions/IsValidGangZone): 检查帮派区域是否有效
-   [IsPlayerInGangZone](https://omp.itsneufox.com/zh-CN/docs/scripting/functions/IsPlayerInGangZone): 检查玩家是否在帮派区域内
-   [IsGangZoneVisibleForPlayer](https://omp.itsneufox.com/zh-CN/docs/scripting/functions/IsGangZoneVisibleForPlayer): 检查帮派区域对玩家是否可见
-   [GangZoneGetFlashColourForPlayer](https://omp.itsneufox.com/zh-CN/docs/scripting/functions/GangZoneGetFlashColourForPlayer): 获取玩家帮派区域的闪烁颜色
-   [IsGangZoneFlashingForPlayer](https://omp.itsneufox.com/zh-CN/docs/scripting/functions/IsGangZoneFlashingForPlayer): 检查帮派区域是否对玩家闪烁
