SetGameSpeed: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
Line 7: Line 7:


===Required Arguments===
===Required Arguments===
*'''value''': The int value of the game speed (Range 0 - 10)
*'''value''': The float value of the game speed (Range 0 - 10)


===Returns===
===Returns===

Revision as of 21:44, 22 February 2010

This function sets the game speed to the given value.

Syntax

bool setGameSpeed ( int value )

Required Arguments

  • value: The float value of the game speed (Range 0 - 10)

Returns

Returns true if the gamespeed was set successfully, false otherwise.

Example

Click to collapse [-]
Server
addCommandHandler("setgamespeed",
  function(sourcePlayer, command, value)
    setGameSpeed(tonumber(value))
  end
)
Click to collapse [-]
Client
addCommandHandler("setgamespeed",
  function(command, value)
    setGameSpeed(tonumber(value))
  end
)

See Also