Squirrel/Server/Functions/Game/GetGravity

From Liberty Unleashed Wiki
Revision as of 23:13, 26 November 2009 by Juppi (Talk | contribs)

Jump to: navigation, search

This returns the current gravity value in the server

Syntax

  1. float GetGravity()

Arguments

  • None

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.  

Notes

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

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox