Squirrel/Server/Functions/Game/SetBoundaries
From Liberty Unleashed Wiki
(Difference between revisions)
(→Example) |
m (The players aint flat!) |
||
Line 12: | Line 12: | ||
== Example == | == Example == | ||
+ | |||
+ | This example command sets the server world boundaries to (-1000, -1000, -1000), (1000, 1000, 1000). | ||
<code lang="squirrel"> | <code lang="squirrel"> | ||
Line 18: | Line 20: | ||
if ( szCommand == "setboundaries" ) | if ( szCommand == "setboundaries" ) | ||
{ | { | ||
− | local up = Vector( -1000.00, -1000.00, | + | local up = Vector( -1000.00, -1000.00, 1000.00 ), lower = Vector( -1000.00, -1000.00, -1000.00 ); |
SetBoundaries( up, lower ); | SetBoundaries( up, lower ); | ||
} | } |
Revision as of 18:44, 29 September 2010
This function sets the world boundaries.
Syntax
bool SetBoundaries( Vector vLower, Vector vUpper )
Arguments
- vLower - The lower boundary point as a vector
- vUpper - The upper boundary point as a vector
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 up = Vector( -1000.00, -1000.00, 1000.00 ), lower = Vector( -1000.00, -1000.00, -1000.00 ); SetBoundaries( up, lower ); } return 1; }
Notes
The event onPlayerCommand was used in this example. More info about this in the corresponding page.
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