Hello,
I am using esx_whitelist for my server. And in the code it seems like a “reload” command exists and a whitelist add command. But I can’t figure out how to use them or if I am doing right.
I’ve tried /whitelist add (steamid)
and /whitelist reload
Does anybody know?
Here is a snipper of the commands code
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[1]
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' }})