ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. getCommandHandlers

Function

getCommandHandlers

ServerInput and controlsIdentical to MTA:SA

Returns the names of commands registered by a resource, or by every resource without an argument.

Syntax

table getCommandHandlers([resource theResource])

Arguments

theResourceresource, optional
The resource.

Returns

A table of command names.

Example

addCommandHandler("komendy", function(player)
    local list = getCommandHandlers(getThisResource())
    outputChatBox("Komendy: /" .. table.concat(list, ", /"), player)
end)

See also