SetGameSpeed

From Multi Theft Auto: Wiki
Revision as of 18:43, 16 November 2011 by X86dev (talk | contribs) (Undo revision 27921 by The Kid (talk))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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

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

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