- Documentation
- Server functions
- setGameSpeed
Function
setGameSpeed
Changes the game speed for every player: 1 is normal, 0.5 slow motion, 2 twice as fast (at most 10). It affects movement, animations and physics.
Syntax
bool setGameSpeed(float value)Arguments
valuefloat- Speed 0-10.
Returns
true on success.
Example
addCommandHandler("matrix", function()
setGameSpeed(0.4)
setTimer(setGameSpeed, 5000, 1, 1)
end)
See also
getGameSpeedReturns the game speed set withsetGameSpeed(1 by default).setSlowMotionEnabledTurns the game's slow motion on or off: at the weapon wheel ("wheel") and during stunt jumps ("stunt"). Both are off by default, because in multiplayer slowing down one player breaks the game. On the server the setting applies to every player, on the client only to that game.