Squirrel/Server/Functions/Game/SetGravity
From Liberty Unleashed Wiki
(Difference between revisions)
(Still updating old functions...) |
|||
Line 1: | Line 1: | ||
− | + | {{Squirrel/Title|SetGravity}} | |
Sets the gravity in the server. This affects all players. | Sets the gravity in the server. This affects all players. | ||
Latest revision as of 10:45, 11 October 2010
Sets the gravity in the server. This affects all players.
[edit] Syntax
bool SetGravity( float fGravity )
[edit] Arguments
- fGravity - The value that you want to set the gravity to
[edit] Example
This will set the gravity when a player types '/grav 0.001'
function onPlayerCommand( plr, cmd, text ) { if ( cmd == "grav" ) { SetGravity( text.tofloat() ); } }
[edit] Notes
The call onPlayerCommand was used in in this example. More info about this in the corresponding page.
[edit] Related Functions
- CloseGarage
- CloseSSVBridge
- EnableTrains
- GetBoundariesLower
- GetBoundariesUpper
- GetFriendlyFire
- GetGamespeed
- GetGravity
- GetHour
- GetIslands
- GetMinute
- GetSSVBridgeLock
- GetSSVBridgeUpdateTime
- GetSurfaceTraction
- GetTimeLock
- GetWeather
- GetWeatherLock
- IsSSVBridgeUp
- OpenGarage
- OpenSSVBridge
- SetBoundaries
- SetFriendlyFire
- SetGamespeed
- SetGravity
- SetIslands
- SetSSVBridgeLock
- SetSSVBridgeUpdateTime
- SetSurfaceTraction
- SetTime
- SetTimeLock
- SetWeather
- SetWeatherLock