Console-commands

From FiveM Wikipedia

Консольные команды

Список клиентских команд, которые могут быть полезны для разработки вашего сервера или отладки проблем с ресурсами. Дополнительные команды могут быть добавлены ресурсами; это всего лишь стандартные команды FiveM.

Эти команды можно использовать с консолью клиента, которую можно открыть, нажав клавишу F8. Вы также можете установить дополнительные при желании такие инструменты, как VConsole2. Это позволяет использовать клиентскую консоль вне игры.

Пользовательские команды

Пользовательские команды могут использоваться в клиентской консоли кем угодно и не требуют включения или использования дополнительных параметров режима разработчика.

connect <server>

Подключает к серверу, используя заданный IP-адрес и порт или URL.
Использование: connect 127.0.0.1:30120 connect "https://fivem.net/" connect cfx.re/join/e23ywr

disconnect

Отключает от сервера, к которому Вы подключены, и возвращает в главное меню.

bind

Перечисляет все настроенные привязки.

bind <mapper> <input> <command>

Привязывает клавишу для выполнения указанной команды при нажатии ее в игре.
Использование: bind keyboard F9 "say hi; wait 250; say bye"

rbind <resource> <mapper> <input> <command>

Привязывает клавишу для выполнения указанной команды при нажатии ее в игре, но будет выполняться только в том случае, если указанный ресурс используется на сервере.

unbind <mapper> <input>

Отменяет привязку всех команд, привязанных к указанной кнопке.
Использование: unbind keyboard F9

cl_drawfps <bool>

Включает или отключает счетчик клиентских кадров в секунду в углу экрана.
Использование: cl_drawfps <true|false>

cl_drawperf <bool>

Включает или отключает отображение показателей производительности в углу экрана:

Название (е. изм) Описание
FPS Frames Per Second: сколько кадров рисуется на экране каждую секунду.
Ping (ms) Сколько времени требуется для получения ответа от сервера (время в оба конца).
PL (%) Потеря пакетов: сколько пакетов не смогли вовремя добраться до места назначения.
CPU Usage (%) Какая часть вычислительной мощности центрального процессора используется.
GPU Usage (%) Какая часть вычислительной мощности графического процессора используется.
GPU Temp (°C) Температура графического процессора в градусах Цельсия.

Использование: cl_drawperf <true|false>

quit

Заставит клиент FiveM немедленно закрыться.

quit [reason]

Заставит клиент FiveM немедленно закрыться, указав причину выхода серверу.

loadlevel <level_name>

Запускает локальную игру, загружающую уровень (или обычно известную как карта) по указанному названию.
Использование: loadlevel gta5loadlevel rdr3loadlevel blank-map

storymode

Запускает FiveM story мод.

profile_sfxVolume <0-10+>

Устанавливает громкость SFX для игры. Это значение не имеет верхнего предела, однако нижний предел равен 0, а 100% объем соответствует 10.

profile_musicVolume <0-10+>

Устанавливает громкость музыки для игры в режимах одиночной игры.

profile_musicVolumeInMp <0-10+>

Устанавливает громкость музыки для игры при подключении к сетевой игре.

Команды разработчика

Команды разработчика требуют, чтобы клиент запускался в режиме разработчика, иначе они выдадут ошибку типа: Access denied for command resmonCommand strdbg is disabled in production mode

Этот тип режима разработчика может быть включен несколькими способами:

  1. На любом канале обновления, запустив клиент FiveM/Redmi с использованием аргумента, например, добавив его в ярлык. +set moo 31337
  2. Запуск клиента по непроизводственному каналу обновления (например, бета-версии или последней версии). Обратите внимание, что другие каналы обновления могут быть нестабильными и приводить к проблемам, включая невозможность запуска игры.

cmdlist

Команда отобразит список всех команд, зарегистрированных на клиенте (или сервере). Онf также выведет переменные, которые были установлены с помощью команд cmdlist set sets seta

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

con_miniconChannels

Вы можете использовать для отображения сообщений консоли на экране без необходимости открывать клиентскую консоль.con_miniconChannels

Название канала - это текст внутри цветного поля рядом с сообщением консоли. Фильтр сообщений выполняет полное сопоставление шаблона с названием канала, что означает, что оно должно совпадать без каких-либо дополнительных символов в начале или конце. Звездочка () может использоваться для указания частичного имени канала в качестве заполнителя для 0 или более символов.

Несколько шаблонов можно объединить, используя либо пробел, либо знак плюс ().*+

Использование: con_miniconChannels <pattern>

По умолчанию: minicon:*

Примеры шаблонов:

  • Все сообщения: *
  • Сообщения, исходящие с любого ресурса: script:*
  • Сообщения, исходящие от обоих и ресурсов: bankingracingscript:banking script:racing

developer

Включает некоторое дополнительное ведение журнала для разработчиков. Обычно не используется обычным пользователем.

Использование: developer <true|false>

devgui_cmd <path> <command>

Adds a command to the developer GUI shown above the console. Example: devgui_cmd "Launch/MP/Disconnect" "disconnect"

devgui_convar <path> <variable>

Adds a convar to the developer GUI shown above the console. Example: devgui_convar "Game/SFX Volume" profile_sfxVolume

invoke-levelload

An alias for , see the loadlevel command for details.loadlevel

list_aces

Lists all the aces (access control entries) in the console. It creates a list of the relationship between an principal and object and if they're allowed or not allowed to use it. Example output:

builtin.everyone -> command.freecam = ALLOW
group.admin -> command.testbed = DENY
<rest of the aces...>

list_principals

Lists all the principals in the system, it will print out a list of which principals are inherited by others. Example output:

identifier.steam:110000111111111 <- group.admin
identifier.steam:110000111111112 <- group.moderator
<child> <- <parent>

On the left is the child node that belongs to the parent node on the right side.

localGame <name>

Loads a local resource from in a single-player game.usermaps:/resources/[name]

localRestart

Restarts the localGame resource.

modelviewer

Allows you to load in TXDs and drawables via an graphical interface. Usage: modelviewer <true|false>

net_maxPackets

A configuration flag to tell the client how many packets it should send at minimum per second. The default value is 50, minimum is 1 and maximum is 200 per second. Usage: net_maxPackets <number_of_packets>

net_printOwner <objectID>

Prints the owner of a network object ID.

net_showCommands

Internal dev tool. Not of use to a regular user unless asked to run.

net_showDrilldown

Internal dev tool. Not of use to a regular user unless asked to run.

net_showTime

Internal dev tool. Not of use to a regular user unless logging state-awareness data.

netEventLog

Enables a tool displaying all network event traffic.

This command will show any incoming/outgoing event traffic. It shows the direction of the event (e.g. Server -> Client), the event name, and the size of the data sent (e.g. 2 bytes). Usage: neteventlog <true|false>

net_statsFile

The is a command to store the metrics of the network usage/behaviour of the FiveM client.net_statsFile It should keep track of metrics like ping, received packets and bytes, sent packets and bytes and the amount of routing packages. All this information will be stored in a file, using a CSV format. Usage: net_statsFile <file_name> Example: - this will create a CSV file called in your FiveM application data directory.net_statsFile metrics.csvmetrics.csv

netgraph

The command will give you real time metrics about the FiveM client network usage. The netgraph consists of a graph and basic information about the network:netgraph

Field Name Description
ping How long it takes to get a response from the server (round trip time)
in How many packets we received per second.
in (bytes) How many bytes we received per second.
out How much packets we have sent per second.
out (bytes) How much bytes we have sent per second.
rt Routing packets received/sent.
rd Routing packet delay.

The graph represents how many packets have been sent or received of a certain kind. Usage: netgraph <true|false>

netobjviewer

Shows a list of current objects and nodes being synchronized over the network, when game state awareness is enabled. Usage: netobjviewer <true|false>

netobjviewer_syncLog

Used when diagnosing discrepancies in written game state. Not of use to a regular user.

nui_devtools

Opens the NUI dev tools window from the game process.

onesync_logFile <filename>

Used to save client-side logs from the game state awareness subsystem. These files get large, so this command should be used sparingly. Example: onesync_logFile "1s_today.log"; wait 5000; onesync_logfile ""

r_disableRendering

Used for supporting internal tooling. Not of use to a regular user, and can not be toggled at runtime.

resmon

The resmon command will open the resource monitor. The resource monitor monitors the CPU usage and memory usage for each resource and shows this in a nice overview. Comes in handy when you encounter performance issues during gameplay. Usage: resmon <true|false>

save_gta_cache

Saves cache data for a specified resource to the CitizenFX directory in AppData. This is to be used for resources with a significant amount of collision or map files, to speed up initial loading for players. Usage: save_gta_cache <resource name>

se_debug

The command enables verbose logging for security features (like the ACL).se_debug Usage: se_debug <true|false>

Useful to see why some people do or don't have access to certain commands, example output:

TEST ACL [system.console -> command.resmon] ACE [system.console command] -> ALLOW
TEST ACL [system.console -> command.resmon] -> ALLOW

set

Set a variable on the client. Usage: set <key> <value> Example:

set animal snail
animal
  "animal" is "snail"
  default: ""
  type: string

seta

Set an archived variable on the client. The variables are saved in and .%AppData%\CitizenFX\fivem.cfg%AppData%\CitizenFX\redm.cfg Usage: seta <key> <value> Example:

seta food escargot

food
  "food" is "escargot"
  default: ""
  type: string

strdbg

strdbg can be used to see what is currently being loaded in the GTA streamer, to potentially spot any issues with streaming certain items, for example when the world stops loading. Usage: strdbg <true|false>

strlist

strlist is a graphical interface showing the entries registered in the GTA streamer, and their current status. Usage strlist <true|false>

strmem

Shows a listing of streaming memory used by specific streaming assets, as well as a global overview. Usage: strmem <true|false>

test_ace

Tests if a principal is allowed or denied access to a given object. Usage: test_ace <principal> <object> Example: test_ace group.admin command.adminstuff

Руководство по клиенту