setGameSpeed | Multi Theft Auto: Wiki Skip to content

setGameSpeed

Client-side
Server-side
Shared

Manual Review Required

Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.


This function sets the game speed to the given value.

Syntax

bool setGameSpeed ( float value )
Required Arguments
  • value: The float value of the game speed (Range 0 - 10)

Returns

  • bool: value

Returns true if the gamespeed was set successfully, false otherwise. The normal game speed is '1'.

Code Examples

shared
addCommandHandler("setgamespeed",
function(sourcePlayer, command, value)
setGameSpeed(tonumber(value))
end
)

See Also

World Functions