---
title: "OnPlayerLeavePlayerGangZone | open.mp"
description: "当玩家退出玩家帮派区域时触发此回调函数"
canonical: https://omp.itsneufox.com/zh-CN/docs/scripting/callbacks/OnPlayerLeavePlayerGangZone
language: zh-CN
---

# OnPlayerLeavePlayerGangZone

注意

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

## 描述

当玩家退出玩家帮派区域时触发此回调函数

| 参数 | 说明 |
| --- | --- |
| playerid | 退出玩家帮派区域的玩家ID |
| zoneid | 玩家退出的玩家帮派区域ID |

## 返回值

此回调始终在游戏模式中优先触发

## 示例

```c
public OnPlayerLeavePlayerGangZone(playerid, zoneid)
{
    new string[128];
    format(string, sizeof(string), "你正在退出玩家帮派区域 %i", zoneid);
    SendClientMessage(playerid, 0xFFFFFFFF, string);
    return 1;
}
```

## 相关回调

以下回调函数可能与此回调相关：

-   [OnPlayerEnterPlayerGangZone](https://omp.itsneufox.com/zh-CN/docs/scripting/callbacks/OnPlayerEnterPlayerGangZone): 当玩家进入玩家帮派区域时触发

## 相关函数

以下函数可能与此回调函数相关：

-   [CreatePlayerGangZone](https://omp.itsneufox.com/zh-CN/docs/scripting/functions/CreatePlayerGangZone): 创建玩家帮派区域
-   [PlayerGangZoneDestroy](https://omp.itsneufox.com/zh-CN/docs/scripting/functions/PlayerGangZoneDestroy): 销毁玩家帮派区域
-   [UsePlayerGangZoneCheck](https://omp.itsneufox.com/zh-CN/docs/scripting/functions/UsePlayerGangZoneCheck): 启用玩家退出该区域时的回调检测
