registerCommand
This is for SERVER SIDED Only.
Parameters
Paramaters
Type
name
string
data
table
function
function
This Table below represents the "data" parameter parameters.\
param
required
type
example
help
no
string
'This Is A Test Command'
description
no
table
admin
no
boolean
job
no
string or table
gang
no
string or table
jobRank
no
number
gangRank
no
number
jobType
no
string or table
citizenid
no
string or table
**IN USE**
ps.registerCommand('ps-print',{
admin = true,
help = 'Turn On Types Of Prints',
description = { -- gives chat message for args required
{
name = 'script',
help = 'Script Name'
},
{
name = 'type',
help = 'Type of print to turn on'
}
}
}, function(source, args, rawCommand)
local resource = args[1]
local type = args[2]
TriggerClientEvent('ps_lib:client:print', source, key, resource, type)
TriggerEvent('ps_lib:print', resource, type)
end)Last updated