mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-31 18:28:52 +00:00
24 lines
847 B
Lua
24 lines
847 B
Lua
function displayPermissionIssue ()
|
|
TriggerClientEvent('chatMessage', source, 'SYSTEM', { 255, 0, 0 }, 'Insufficienct permissions!')
|
|
end
|
|
|
|
TriggerEvent('es:addGroupCommand', 'whitelist:load', 'admin', function (source, args, user)
|
|
loadWhiteList()
|
|
end, function (source, args, user)
|
|
displayPermissionIssue(source)
|
|
end, { help = _U('help_whitelist_load') })
|
|
|
|
TriggerEvent('es:addGroupCommand', 'whitelist:add', 'admin', function (source, args, user)
|
|
local steamID = 'steam:' .. args[2]
|
|
|
|
MySQL.Async.execute(
|
|
'INSERT INTO whitelist (identifier) VALUES (@identifier)',
|
|
{ ['@identifier'] = tostring(steamID) },
|
|
function ()
|
|
loadWhiteList()
|
|
end
|
|
)
|
|
end, function (source, args, user)
|
|
displayPermissionIssue(source)
|
|
end, { help = _U('help_whitelist_add'), params = { steam = 'SteamID', help = 'SteamID formated to hex' }})
|