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

IsPlayerGangZoneVisible

هشدار

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 قابل مشاهده نیست.

مثال‌ها​

new gGangZoneID[MAX_PLAYERS];

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

// Show the gangzone to player
PlayerGangZoneShow(playerid, gGangZoneID[playerid], 0xFF0000FF);
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp(cmdtext, "/zone", true))
{
if (IsPlayerGangZoneVisible(playerid, gGangZoneID[playerid]))
{
SendClientMessage(playerid, 0x00FF00FF, "Gangzone is visible.");
}
else
{
SendClientMessage(playerid, 0xFF0000FF, "Gangzone is not visible.");
}
return 1;
}
return 0;
}

توابع مرتبط​