پرش به مطلب اصلی

IsValidPlayerGangZone

هشدار

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

توضیحات

چک کردن اینکه player gangzone معتبره یا نه.

نامتوضیحات
playeridID بازیکنی که player gangzone بهش متصله.
zoneidID player gangzone.

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

true - player gangzone معتبره.

false - player gangzone معتبر نیست.

مثال‌ها

// 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;
}
}

توابع مرتبط