ClearPlayerWorldBounds
cảnh báo
Đã thêm hàm trong phiên bản omp v1.1.0.2612. Mục này không hoạt động trên các phiên bản cũ hơn!
Description
Reset the player's world boundaries to default world boundaries.
| Name | Description |
|---|---|
| playerid | The 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;
}
Good to know
mẹo
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.
Related Functions
- SetPlayerWorldBounds: Set the world boundaries for a player. Players can not go out of the boundaries (they will be pushed back in).
- GetPlayerWorldBounds: Get a player's world boundaries.