Squirrel/Server/Functions/Game/SetGamespeed
From Liberty Unleashed Wiki
(Difference between revisions)
(Updated old funcs) |
|||
Line 1: | Line 1: | ||
− | + | {{Squirrel/Title|SetGamespeed}} | |
Sets the gamespeed in the server. This affects all players. | Sets the gamespeed in the server. This affects all players. | ||
Revision as of 10:45, 11 October 2010
Sets the gamespeed in the server. This affects all players.
Syntax
bool SetGamespeed( float fSpeed )
Arguments
- fSpeed - The value that you want to set the gamespeed to
Example
This will set the Gamespeed when a player types '/speed 0.5'
function onPlayerCommand( plr, cmd, text ) { if ( cmd == "speed" ) { SetGamespeed( text.tofloat() ); } }
Notes
The call onPlayerCommand was used in this example. More info about this in its corresponding page.
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