Squirrel/Server/Functions/Game/GetGravity

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
m
 
Line 1: Line 1:
__NOTOC__
+
{{Squirrel/Title|GetGravity}}
 
This returns the current gravity value in the server
 
This returns the current gravity value in the server
  

Latest revision as of 10:11, 11 October 2010

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

This returns the current gravity value in the server

[edit] Syntax

  1. float GetGravity()

[edit] Arguments

  • None

[edit] Example

This example will return the current gravity when somebody type /grav

  1.  
  2. function onPlayerCommand( plr, cmd, text )
  3. {
  4. if ( cmd == "grav" )
  5. {
  6. MessagePlayer( "Current gravity in the server is: " + GetGravity(), plr );
  7. }
  8. }
  9.  

[edit] Notes

The function MessagePlayer and call onPlayerCommand were used in in this example. More info about them in corresponding pages.

[edit] Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox