RegCommand

Register a command

Parameters description

Parameter
Type
Description
Default

name

string

command's name

yes

cb

function?

params: args, rawCommand, IPlayer, FPlayer

----

suggestions

table?

table format: { help: string, args = { name: string, help: string } }[]

----

Example

HRLib.RegCommand('id', function(_, _, IPlayer, FPlayer)
    FPlayer.Notify(('Your ID: %s'):format(IPlayer.source)) -- Shows an informational notification
end, { help = 'Show Your Id' })

Last updated