SetPlayerWorldBounds

From SA-MP Wiki

Jump to: navigation, search

SetPlayerWorldBounds


This function can be used to change the player's World Boundaries, thus restricting the places he/she can go to.


Parameters:
(playerid,Float:x_max,Float:x_min,Float:y_max,Float:y_min)
playeridThe player you want to set the boundaries of.
Float:x_maxThe max. x-coordinate where the player can go.
Float:x_minThe min. x-coordinate where the player can go.
Float:y_maxThe max. y-coordinate where the player can go.
Float:y_minThe min. y-coordinate where the player can go.
This function does not return a specific value, it's best to simply ignore it.


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