Squirrel/Sandbox
From Liberty Unleashed Wiki
(Difference between revisions)
m (A sandbox page to test stuff) |
|||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:Sandbox}} | {{DISPLAYTITLE:Sandbox}} | ||
+ | |||
__NOTOC__ | __NOTOC__ | ||
This is a 'sandbox' page to test different stuff. | This is a 'sandbox' page to test different stuff. | ||
Line 23: | Line 24: | ||
{ | { | ||
SetGravity( text.tofloat() ); | SetGravity( text.tofloat() ); | ||
+ | |||
+ | return 1; | ||
} | } | ||
} | } |
Latest revision as of 22:59, 11 April 2010
This is a 'sandbox' page to test different stuff.
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() ); return 1; } }
[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