N’ayant pas ton esadmin sous les yeux voila l’event qui fonctionne chez moi
RegisterServerEvent(‘es_admin:quick’)
AddEventHandler(‘es_admin:quick’, function(id, type)
local Source = source
TriggerEvent(‘es:getPlayerFromId’, source, function(user)
TriggerEvent(‘es:getPlayerFromId’, id, function(target)
TriggerEvent(‘es:canGroupTarget’, user.getGroup(), groupsRequired[type], function(available)
print('Available?: ’ … tostring(available))
TriggerEvent(‘es:canGroupTarget’, user.getGroup(), target.getGroup(), function(canTarget)
if canTarget and available then
if type == “slay” then TriggerClientEvent(‘es_admin:quick’, id, type) end
if type == “noclip” then TriggerClientEvent(‘es_admin:quick’, id, type) end
if type == “freeze” then TriggerClientEvent(‘es_admin:quick’, id, type) end
if type == “crash” then TriggerClientEvent(‘es_admin:quick’, id, type) end
if type == “bring” then TriggerClientEvent(‘es_admin:quick’, id, type, Source) end
if type == “goto” then TriggerClientEvent(‘es_admin:quick’, Source, type, id) end
if type == “slap” then TriggerClientEvent(‘es_admin:quick’, id, type) end
if type == “slay” then TriggerClientEvent(‘es_admin:quick’, id, type) end
if type == “kick” then DropPlayer(id, ‘Kicked by es_admin GUI’) end
if type == "ban" then
for k,v in ipairs(GetPlayerIdentifiers(id))do
banUser(v)
end
DropPlayer(id, GetConvar("es_admin_banreason", "You were banned from this server"))
end
else
if not available then
TriggerClientEvent('chatMessage', Source, 'SYSTEM', {255, 0, 0}, "Your group can not use this command.")
else
TriggerClientEvent('chatMessage', Source, 'SYSTEM', {255, 0, 0}, "Permission denied.")
end
end
end)
end)
end)
end)
end)