Client
RegCommand
Function to register a command with multiple options such as suggestions, more return value in the callback function for better optimization when using different player informations
function HRLib.RegCommand(
name: string|string[],
cb: fun(
args: string[]|{},
rawCommand: any,
IPlayer: HRLibClientIPlayer,
FPlayer: HRLibClientFPlayer
),
suggestions: { help: string?, args: { name: string, help: string }[] }
)
Parameters description
name
- the command name, has the option to enter multiple names for the same command in a listcb
- the callback function to trigger when player triggers the commandsuggestions
- the command suggestions, command help and args help texts
Last updated