Commands

MSK.RegisterCommand

Parameters commandName - string or table - The Command callback - function - Function to execute restricted - boolean - Check Player Ace Permission properties - boolean or table - Data Properties

Description Parameter: properties

  • showSuggestion - boolean - Show chat suggestion - Optional, default: true

  • help - string - Chat suggestion

  • params - table - Paramter for the command

  • hotkey - table - Register a Hotkey (RegisterKeyMapping) - Optional, default: nil

You can only use the hotkey if no params was set!

Parameter: params

  • name - string - name of the argument

  • type - string - type of the argument - number, string, playerId, any, player - player is only returning the playerData for ESX or QBCore

  • help - string - chat suggestion of the argument

  • optional - boolean? - Is the Argment optional? Has to be the last argument! - Optional, default: false

Parameter: hotkey

  • key - string - Keybind

  • text - string - Description of the Keybind

Last updated