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

IsPlayerInPlayerGangZone

هشدار

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

توابع مرتبط