getGameSpeed | Multi Theft Auto: Wiki Skip to content

getGameSpeed

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 gets the current game speed value.

Syntax

float getGameSpeed ( )

Returns

  • float: value

Returns a float representing the speed of the game.

Code Examples

shared

This example adds a 'gamespeed' console command that prints the game speed to the chatbox.

function gameSpeedValue( )
local speed = getGameSpeed( )
outputChatBox( "Game speed is currently set to " .. speed .. "." )
end
addCommandHandler( "gamespeed", gameSpeedValue )

See Also

World Functions