Squirrel/Server/Functions/Players/SetBoundaries
From Liberty Unleashed Wiki
(Difference between revisions)
(Created page with '{{Squirrel/Title|Player.SetBoundaries}} This function sets the players boundaries. == Syntax == <code>bool player.SetBoundaries( Vector lowerBounds, Vector upperBounds )</code>…') |
|||
Line 13: | Line 13: | ||
== Example == | == Example == | ||
− | + | This example command sets the players world boundaries to (-1000, -1000, -1000), (1000, 1000, 1000). | |
− | + | ||
<code lang="squirrel"> | <code lang="squirrel"> | ||
− | + | function onPlayerCommand( pPlayer, szCommand, szText ) | |
+ | { | ||
+ | if ( szCommand == "setboundaries" ) | ||
+ | { | ||
+ | local up = Vector( -1000.00, -1000.00, 1000.00 ), lower = Vector( -1000.00, -1000.00, -1000.00 ); | ||
+ | pPlayer.SetBoundaries( up, lower ); | ||
+ | } | ||
+ | |||
+ | return 1; | ||
+ | } | ||
</code> | </code> | ||
=== Notes === | === Notes === | ||
− | + | The event [[Squirrel/Server/Events/Player/onPlayerCommand|onPlayerCommand]] was used in this example. More info about this in the corresponding page. | |
== Related Functions == | == Related Functions == | ||
{{Squirrel/Server/Functions/Players}} | {{Squirrel/Server/Functions/Players}} |
Latest revision as of 16:11, 25 October 2010
This function sets the players boundaries.
[edit] Syntax
bool player.SetBoundaries( Vector lowerBounds, Vector upperBounds )
[edit] Arguments
- lowerBounds - The lower boundaries
- upperBounds - The upper boundaries
[edit] Example
This example command sets the players world boundaries to (-1000, -1000, -1000), (1000, 1000, 1000).
function onPlayerCommand( pPlayer, szCommand, szText ) { if ( szCommand == "setboundaries" ) { local up = Vector( -1000.00, -1000.00, 1000.00 ), lower = Vector( -1000.00, -1000.00, -1000.00 ); pPlayer.SetBoundaries( up, lower ); } return 1; }
[edit] Notes
The event onPlayerCommand was used in this example. More info about this in the corresponding page.
[edit] Related Functions
- FindPlayer
- GetClosestPlayer
- Player.Alpha
- Player.Angle
- Player.Armour
- Player.Cash
- Player.Class
- Player.ClearWeapons
- Player.Colour
- Player.ColouredName
- Player.EnterVehicle
- Player.ExitVehicle
- Player.ForceToSpawnScreen
- Player.Frozen
- Player.GetBoundariesLower
- Player.GetBoundariesUpper
- Player.GetIgnored
- Player.Health
- Player.ID
- Player.IP
- Player.Immune
- Player.Island
- Player.LUID
- Player.Marker
- Player.MarkerScale
- Player.MarkerSprite
- Player.Muted
- Player.Name
- Player.Nametag
- Player.NametagColour
- Player.Ping
- Player.Pos
- Player.RemoveFromVehicle
- Player.RemoveLimb
- Player.Score
- Player.SetAnim
- Player.SetBoundaries
- Player.SetIgnored
- Player.SetIgnoredBy
- Player.SetVehicleEnterDoor
- Player.SetWeapon
- Player.Skin
- Player.Spawn
- Player.Spawned
- Player.Team
- Player.Train
- Player.Vehicle
- Player.VehicleSeat
- Player.Velocity
- Player.VirtualWorld
- Player.WantedLevel
- Player.Weapon
- Player.SetWeapon
- Player.WeaponAmmo
- Player.WeaponState