跳到主要內容

IsPlayerTeleportAllowed

注意

此函式於 omp v1.1.0.2612 版本中新增,在更早的版本中無法使用!

Description​

Can this player teleport by right-clicking on the map?

NameDescription
playeridThe ID of the player to allow teleport.

Returns​

true - Player is allowed.

false - Player is not allowed.

Examples​

public OnPlayerConnect(playerid)
{
AllowPlayerTeleport(playerid, true);
return 1;
}

public OnPlayerSpawn(playerid)
{
if (IsPlayerTeleportAllowed(playerid))
{
// Do something
}
return 1;
}