跳到主要内容

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

相关函数