SetPlayerWorldBounds

From SA-MP Wiki

Jump to: navigation, search

SetPlayerWorldBounds


Set the world boundaries for a player - players can not go out of the boundaries.


Parameters:
(playerid,Float:x_max,Float:x_min,Float:y_max,Float:y_min)
playeridThe ID of the player to set the boundaries of.
Float:x_maxThe maximum Y coordinate the player can go to.
Float:x_minThe minimum X coordinate the player can go to.
Float:y_maxThe maximum Y coordinate the player can go to.
Float:y_minThe maximum X coordinate the player can go to.


This function does not return a specific value.


Note: You can reset the player world bounds by setting the parameters to 20000.0000, -20000.0000, 20000.0000, -20000.0000.


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