IsPlayerTeleportAllowed
注意
这个函数是在omp v1.1.0.2612中添加的,在以前的版本中不起作用!
描述
检测指定玩家是否拥有地图右键传送权限。
参数名 | 说明 |
---|---|
playerid | 要检测的玩家 ID |
返回值
true - 允许地图传送
false - 禁止地图传送
示例代码
public OnPlayerConnect(playerid)
{
AllowPlayerTeleport(playerid, true);
return 1;
}
public OnPlayerSpawn(playerid)
{
if (IsPlayerTeleportAllowed(playerid))
{
// 执行相关操作
}
return 1;
}
相关函数
- AllowPlayerTeleport: 设置玩家的地图传送权限