RU/setGameSpeed: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with '__NOTOC__ {{RU/Server client function}} Эта функция устанавливает скорость игры. ==Использование== <syntaxhighlight lang="lua">bool setGameSpeed…')
 
No edit summary
Line 12: Line 12:
Returns ''true'' if the gamespeed was set successfully, ''false'' otherwise.
Returns ''true'' if the gamespeed was set successfully, ''false'' otherwise.


==Example==
==Пример==
<section name="Server" class="server" show="true">
<section name="Server" class="server" show="true">
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">

Revision as of 10:48, 7 March 2010

Эта функция устанавливает скорость игры.

Использование

bool setGameSpeed ( int value )

Обязательные величины

  • value: Значение скорости игры ( 0 - 10)

Returns

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

Пример

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
)

Примечание