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

# IsValidPlayerGangZone

هشدار

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
// This variable is used to store the id of the gangzone
// so that we can use it throught the script
new gGangZoneID[MAX_PLAYERS] = {INVALID_GANG_ZONE, ...};

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

public OnPlayerSpawn(playerid)
{
    // Check if this gangzone exists
    if (IsValidPlayerGangZone(playerid, gGangZoneID[playerid]))
    {
        PlayerGangZoneDestroy(playerid, gGangZoneID[playerid]);
        gGangZoneID[playerid] = INVALID_GANG_ZONE;
    }
}
```

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

-   [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 نمایش داده می‌شه.
-   [IsPlayerInPlayerGangZone](https://omp.itsneufox.com/fa/docs/scripting/functions/IsPlayerInPlayerGangZone): چک کردن اینکه بازیکن در 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 می‌شه.
