From the reference libraryFiveM

rconCommand

fivem-docs/docs/scripting-reference/events/list/rconCommand.md

rconCommand


title: rconCommand

Parameters

{{% alert color="warning" %}} This event is deprecated. Please use {{% native_link "REGISTER_COMMAND" %}} instead, and use the restricted flag. {{% /alert %}}

string command, table/array arguments
  • command: A string containing the command name that was executed.
  • arguments: A list containing all arguments passed to the command.

Examples

JavaScript Example:
on('rconCommand', (command, args) => {
    console.log(`${command} called over RCON with ${args}`)
});

title: rconCommand

Parameters

{{% alert color="warning" %}} This event is deprecated. Please use {{% native_link "REGISTER_COMMAND" %}} instead, and use the restricted flag. {{% /alert %}}

string command, table/array arguments
  • command: A string containing the command name that was executed.
  • arguments: A list containing all arguments passed to the command.

Examples

JavaScript Example:
on('rconCommand', (command, args) => {
    console.log(`${command} called over RCON with ${args}`)
});
Back to documentation