Skip to Content
ResourcesChatEventschat:addSuggestion

Triggering this event adds a command suggestion to the local client’s chat autocomplete. Trigger it after registering the matching command so players see argument hints while typing.

Event Name

chat:addSuggestion

Parameters

  • string commandName: The command to suggest, including the leading /
  • string commandDescription: Help text shown for the command
  • object commandParameters: Array of { name, help } objects describing each argument

Example

-- Note, the command has to start with `/`. TriggerEvent('chat:addSuggestion', '/command', 'help text', { { name = 'paramName1', help = 'param description 1' }, { name = 'paramName2', help = 'param description 2' } })