Difference between revisions of "RU/get"

From Multi Theft Auto: Wiki
Jump to: navigation, search
Line 1: Line 1:
{{RU/Server function}}
{{RU/Server function}}

Revision as of 07:03, 18 November 2011


Статью необходимо перевести на русский язык. Если страница не будет переведена в разумные сроки, она будет удалена.

This function gets a setting's value, or a group of settings' values, from the settings registry.


var get ( string settingName )

Необходимые параметры

settingName: The name of the setting you want to set. See setting names for information on settings names.

Что возвращается

Returns the value of the setting if a single setting was specified and found, or a table (in associative-array form) containing:

  • the list of global setting name/value pairs if "." is passed as a setting name,
  • the list of resource settings if a resource name followed by a "." is passed,
  • the list of the script's resource settings if an empty string is passed.

It returns false if the specified setting or settings group doesn't exist, or if the settings group you are trying to retrieve doesn't have any public or protected settings.


В этом примере показывается величина из параметров реестра с названием "respwnTime".

function getMySetting()
    if get ( "respawnTime" ) then
        return get ( "respawnTime" )
    return false

Смотри также