Squirrel/Server/Functions/Game/SetGravity
From Liberty Unleashed Wiki
(Difference between revisions)
(New page: __NOTOC__ Sets the gravity in the server. This affects all players. == Syntax == <code>bool SetGravity( float fGravity )</code> == Arguments == * '''fGravity''' - The value that you wa...) |
m (Squirrel/Functions/Game/SetGravity moved to Squirrel/Server/Functions/Game/SetGravity: Server-side scripting only) |
Revision as of 20:07, 26 November 2009
Sets the gravity in the server. This affects all players.
Syntax
bool SetGravity( float fGravity )
Arguments
- fGravity - The value that you want to set the gravity to
Example
This will set the Gravity when a player types '/grav 0.001'
function OnPlayerCommand( id, cmd, text ) { if ( cmd == "grav" ) { SetGravity( text.tofloat() ); } }
Notes
The call OnPlayerCommand was used in in this example. More info about this in the corresponding page.