GetGameSpeed: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 23: Line 23:
==See Also==
==See Also==
{{World functions}}
{{World functions}}
[[ru:getGameSpeed]]

Revision as of 09:52, 7 March 2010

This function gets the current game speed value.

Syntax

int getGameSpeed()

Returns

Returns a int.

Example

Click to collapse [-]
Server and Client

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

function gamespeedvalue ( )
    local speed = getGameSpeed ( )
    outputChatbox ( "Gamespeed is currently set to " .. speed .. "." )
end
addCommandHandler ( "gamespeed", gamespeedvalue )

See Also