---
title: "IsPlayerInPlayerGangZone | open.mp"
description: "چک می‌کنه که آیا بازیکن در player gangzone هست یا نه"
canonical: https://omp.itsneufox.com/fa/docs/scripting/functions/IsPlayerInPlayerGangZone
language: fa
---

# IsPlayerInPlayerGangZone

هشدار

This function was added in omp v1.1.0.2612 and will not work in earlier versions!

## توضیحات

چک می‌کنه که آیا بازیکن در player gangzone هست یا نه.

| نام | توضیحات |
| --- | --- |
| playerid | ID بازیکنی که player gangzone بهش متصله. |
| zoneid | ID player gangzone. |

## مقادیر برگشتی

**true** - بازیکن در player gangzone هست.

**false** - بازیکن در player gangzone نیست.

## مثال‌ها

```c
new gGangZoneID[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
    // Create the gangzone
    gGangZoneID[playerid] = CreatePlayerGangZone(playerid, 2236.1475, 2424.7266, 2319.1636, 2502.4348);
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (!strcmp(cmdtext, "/zone", true))
    {
        if (IsPlayerInPlayerGangZone(playerid, gGangZoneID[playerid]))
        {
            SendClientMessage(playerid, 0x00FF00FF, "You are in the gangzone.");
        }
        else
        {
            SendClientMessage(playerid, 0xFF0000FF, "You are not in the gangzone.");
        }
        return 1;
    }
    return 0;
}
```

## توابع مرتبط

-   [CreatePlayerGangZone](https://omp.itsneufox.com/fa/docs/scripting/functions/CreatePlayerGangZone): ساخت player gangzone.
-   [PlayerGangZoneDestroy](https://omp.itsneufox.com/fa/docs/scripting/functions/PlayerGangZoneDestroy): نابود کردن player gangzone.
-   [PlayerGangZoneShow](https://omp.itsneufox.com/fa/docs/scripting/functions/PlayerGangZoneShow): نمایش player gangzone.
-   [PlayerGangZoneHide](https://omp.itsneufox.com/fa/docs/scripting/functions/PlayerGangZoneHide): مخفی کردن player gangzone.
-   [PlayerGangZoneFlash](https://omp.itsneufox.com/fa/docs/scripting/functions/PlayerGangZoneFlash): شروع چشمک زدن player gangzone.
-   [PlayerGangZoneStopFlash](https://omp.itsneufox.com/fa/docs/scripting/functions/PlayerGangZoneStopFlash): متوقف کردن چشمک زدن player gangzone.
-   [PlayerGangZoneGetFlashColour](https://omp.itsneufox.com/fa/docs/scripting/functions/PlayerGangZoneGetFlashColour): دریافت رنگ چشمک زدن player gangzone.
-   [PlayerGangZoneGetColour](https://omp.itsneufox.com/fa/docs/scripting/functions/PlayerGangZoneGetColour): دریافت رنگ player gangzone.
-   [PlayerGangZoneGetPos](https://omp.itsneufox.com/fa/docs/scripting/functions/PlayerGangZoneGetPos): دریافت موقعیت gangzone، که با مختصات minX، minY، maxX، maxY نمایش داده می‌شه.
-   [IsValidPlayerGangZone](https://omp.itsneufox.com/fa/docs/scripting/functions/IsValidPlayerGangZone): چک کردن اینکه player gangzone معتبره یا نه.
-   [IsPlayerGangZoneVisible](https://omp.itsneufox.com/fa/docs/scripting/functions/IsPlayerGangZoneVisible): چک کردن اینکه player gangzone قابل مشاهده هست یا نه.
-   [IsPlayerGangZoneFlashing](https://omp.itsneufox.com/fa/docs/scripting/functions/IsPlayerGangZoneFlashing): چک کردن اینکه player gangzone چشمک می‌زنه یا نه.
-   [UsePlayerGangZoneCheck](https://omp.itsneufox.com/fa/docs/scripting/functions/UsePlayerGangZoneCheck): فعال کردن callback وقتی بازیکن وارد/خارج این zone می‌شه.
