SetGameSpeed: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
 
No edit summary
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{Server client function}}
==Description==
==Description==
This function sets the game speed to the given value
This function sets the game speed to the given value.


==Syntax==
==Syntax==
Line 7: Line 8:


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


==Example==
==Example==
<syntaxhighlight lang="lua">addCommandHandler ( "setgamespeed", "gamespeedfunction")
<syntaxhighlight lang="lua">
function gamespeedfunction ( player, command, value )
function gamespeedfunction ( sourcePlayer, command, value )
setGameSpeed ( tonumber ( value ) )
      setGameSpeed ( tonumber ( value ) )
end</syntaxhighlight>
end
addCommandHandler ( "setgamespeed", gamespeedfunction )
</syntaxhighlight>


==See Also==
==See Also==
{{World functions}}
{{World functions}}

Revision as of 11:44, 16 August 2007

Description

This function sets the game speed to the given value.

Syntax

setGameSpeed ( int value )

Required Arguments

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

Example

function gamespeedfunction ( sourcePlayer, command, value )
      setGameSpeed ( tonumber ( value ) )
end
addCommandHandler ( "setgamespeed", gamespeedfunction )

See Also