GetGameSpeed

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

This function gets the current game speed value.

Syntax

float getGameSpeed ( )

Returns

Returns a float representing the speed of the game.

Example

Click to collapse [-]
Server and Client

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