跳到主要内容

ClearPlayerWorldBounds

注意

This function was added in omp v1.1.0.2612 and will not work in earlier versions!

Description

Reset the player's world boundaries to default world boundaries.

NameDescription
playeridThe ID of the player to reset/clear the world boundaries.

Returns

true - Function executed successfully.

false - Function failed to execute.

Examples

public OnPlayerSpawn(playerid)
{
SetPlayerWorldBounds(playerid, 20.0, 0.0, 20.0, 0.0);
return 1;
}

public OnPlayerDeath(playerid, killerid, WEAPON:reason)
{
ClearPlayerWorldBounds(playerid);
return 1;
}

Notes

提示

A player's world boundaries can also be reset by setting them to 20000.0000, -20000.0000, 20000.0000, -20000.0000. These are the default values. However, we suggest using ClearPlayerWorldBounds to reset the player's world boundaries for clarity.