跳到主要内容

IsPlayerGangZoneVisible

注意

这个函数是在omp v1.1.0.2612中添加的,在以前的版本中不起作用!

描述

检查玩家帮派区域是否可见

参数名说明
playerid绑定玩家帮派区域的玩家 ID
zoneid玩家帮派区域 ID

返回值

true - 玩家帮派区域可见

false - 玩家帮派区域不可见

示例代码

new gGangZoneID[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
// 创建帮派区域
gGangZoneID[playerid] = CreatePlayerGangZone(playerid, 2236.1475, 2424.7266, 2319.1636, 2502.4348);

// 向玩家显示帮派区域
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;
}

相关函数