Squirrel/Server/Functions/Game/SetBoundaries

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(Created page with '{{Squirrel/Title|SetBoundaries}} This function sets the world boundaries. == Syntax == <code>bool SetBoundaries( Vector vLower, Vector vUpper )</code> == Arguments == * '''vL…')
 
(Example)
Line 13: Line 13:
 
== Example ==
 
== Example ==
  
{{Squirrel/NeedsExample}}
 
 
<code lang="squirrel">
 
<code lang="squirrel">
-- todo
+
function onPlayerCommand( pPlayer, szCommand, szText )
 +
{
 +
if ( szCommand == "setboundaries" )
 +
{
 +
local up = Vector( -1000.00, -1000.00, 0.00 ), lower = Vector( -1000.00, -1000.00, 0.00 );
 +
SetBoundaries( up, lower );
 +
}
 +
 +
return 1;
 +
}
 
</code>
 
</code>
  
 
=== Notes ===
 
=== Notes ===
  
Example notes and used functions here.
+
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}}

Revision as of 15:43, 29 September 2010

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

This function sets the world boundaries.

Syntax

  1. bool SetBoundaries( Vector vLower, Vector vUpper )

Arguments

  • vLower - The lower boundary point as a vector
  • vUpper - The upper boundary point as a vector

Example

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

Notes

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

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox