Squirrel/Server/Functions/Game/SetBoundaries

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(Example)
m
 
(One intermediate revision by one user not shown)
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, 0.00 ), lower = Vector( -1000.00, -1000.00, 0.00 );
+
local lower = Vector( -1000.00, -1000.00, -1000.00 ), upper = Vector( 1000.00, 1000.00, 1000.00 );
SetBoundaries( up, lower );
+
SetBoundaries( lower, upper );
 
}
 
}
 
 

Latest revision as of 03:15, 12 November 2010

Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This function sets the world boundaries.

[edit] Syntax

  1. 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).

  1.  
  2. function onPlayerCommand( pPlayer, szCommand, szText )
  3. {
  4. if ( szCommand == "setboundaries" )
  5. {
  6. local lower = Vector( -1000.00, -1000.00, -1000.00 ), upper = Vector( 1000.00, 1000.00, 1000.00 );
  7. SetBoundaries( lower, upper );
  8. }
  9. return 1;
  10. }
  11.  

[edit] Notes

The event onPlayerCommand was used in this example. More info about this in the corresponding page.

[edit] Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox