Squirrel/Server/Functions/Game/SetBoundaries
From Liberty Unleashed Wiki
(Difference between revisions)
(Created page with '{{Squirrel/Title|SetBoundaries}} This function sets the world boundaries. == Syntax == <code>bool SetBoundaries( Vector vLower, Vector vUpper )</code> == Arguments == * '''vL…') |
m |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 13: | Line 13: | ||
== Example == | == Example == | ||
− | + | This example command sets the server world boundaries to (-1000, -1000, -1000), (1000, 1000, 1000). | |
+ | |||
<code lang="squirrel"> | <code lang="squirrel"> | ||
− | -- | + | function onPlayerCommand( pPlayer, szCommand, szText ) |
+ | { | ||
+ | if ( szCommand == "setboundaries" ) | ||
+ | { | ||
+ | local lower = Vector( -1000.00, -1000.00, -1000.00 ), upper = Vector( 1000.00, 1000.00, 1000.00 ); | ||
+ | SetBoundaries( lower, upper ); | ||
+ | } | ||
+ | |||
+ | 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/Game}} | {{Squirrel/Server/Functions/Game}} |
Latest revision as of 03:15, 12 November 2010
This function sets the world boundaries.
[edit] Syntax
bool SetBoundaries( Vector vLower, Vector vUpper )
[edit] Arguments
- vLower - The lower boundary point as a vector
- vUpper - The upper boundary point as a vector
[edit] Example
This example command sets the server world boundaries to (-1000, -1000, -1000), (1000, 1000, 1000).
function onPlayerCommand( pPlayer, szCommand, szText ) { if ( szCommand == "setboundaries" ) { local lower = Vector( -1000.00, -1000.00, -1000.00 ), upper = Vector( 1000.00, 1000.00, 1000.00 ); SetBoundaries( lower, upper ); } return 1; }
[edit] Notes
The event onPlayerCommand was used in this example. More info about this in the corresponding page.
[edit] Related Functions
- CloseGarage
- CloseSSVBridge
- EnableTrains
- GetBoundariesLower
- GetBoundariesUpper
- GetFriendlyFire
- GetGamespeed
- GetGravity
- GetHour
- GetIslands
- GetMinute
- GetSSVBridgeLock
- GetSSVBridgeUpdateTime
- GetSurfaceTraction
- GetTimeLock
- GetWeather
- GetWeatherLock
- IsSSVBridgeUp
- OpenGarage
- OpenSSVBridge
- SetBoundaries
- SetFriendlyFire
- SetGamespeed
- SetGravity
- SetIslands
- SetSSVBridgeLock
- SetSSVBridgeUpdateTime
- SetSurfaceTraction
- SetTime
- SetTimeLock
- SetWeather
- SetWeatherLock