Squirrel/Server/Functions/Game/SetGamespeed
From Liberty Unleashed Wiki
(Difference between revisions)
(→Notes) |
|||
Line 26: | Line 26: | ||
=== Notes === | === Notes === | ||
− | The call [[Squirrel/Server/Events/Player/ | + | The call [[Squirrel/Server/Events/Player/onPlayerCommand|onPlayerCommand]] was used in this example. More info about this in its corresponding page. |
== Related Functions == | == Related Functions == | ||
{{Squirrel/Server/Functions/Game}} | {{Squirrel/Server/Functions/Game}} |
Latest revision as of 20:10, 23 June 2013
Sets the gamespeed in the server. This affects all players.
[edit] Syntax
bool SetGamespeed( float fSpeed )
[edit] Arguments
- fSpeed - The value that you want to set the gamespeed to
[edit] Example
This will set the Gamespeed when a player types '/speed 0.5'
function onPlayerCommand( plr, cmd, text ) { if ( cmd == "speed" ) { SetGamespeed( text.tofloat() ); } }
[edit] Notes
The call onPlayerCommand was used in this example. More info about this in its 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