Es_extended 1.2 - Everyone can use admin commands

Hey - I just got back into fivem developing again, and i started where i left on a esx server.
When i stopped working on it a few months ago everything was working flawless, but now everyone can use admin commands /setgroup etc. Ive been googling and youtubing all day yesterday and still stuck.

Anyone got a clue??

Here is my cfg permissions aswell as commands.lua

Example:

ESX.RegisterCommand(‘car’, ‘admin’, function(xPlayer, args, showError)
xPlayer.triggerEvent(‘esx:spawnVehicle’, args.car)
end, false, {help = _U(‘command_car’), validate = false, arguments = {
{name = ‘car’, help = _U(‘command_car_car’), type = ‘any’}
}})

add_ace group.superadmin command allow # allow all commands
add_ace group.superadmin command.quit deny
add_principal group.mod group.user
add_principal group.admin group.mod
add_principal group.superadmin group.admin
add_ace resource.es_extended command.add_ace allow
add_ace resource.es_extended command.add_principal allow
add_ace resource.es_extended command.remove_principal allow
add_ace resource.es_extended command.stop allow

Thanks in advance

You only should only have this “ add_ace group.admin command allow # allow all commands” for ace perms. Use a admin menu like EasyAdmin menu to give admin perms.

Thanks for your reply.

So i tried only setting “add_ace group.admin command allow”
And still same thing

Only solution i have found so far is

add_ace group.superadmin command allow
add_ace group.superadmin command.quit deny
add_principal group.mod group.user
add_principal group.admin group.mod
add_principal group.superadmin group.admin
add_ace resource.es_extended command.add_ace allow
add_ace resource.es_extended command.add_principal allow
add_ace resource.es_extended command.remove_principal allow
add_ace resource.es_extended command.stop allow
add_ace group.user command deny

This aparently prevents everybody for using commands user or admin.
Other resources like tpm, works. If the player is set as user in database they can´t use this command. ViceVersa

  • Example

RegisterCommand(“tpm”, function(source, args, rawCommand)
if source ~= 0 then
local xPlayer = ESX.GetPlayerFromId(source)
if havePermission(xPlayer) then
xPlayer.triggerEvent(“esx_admin:tpm”)
end
end
end, false)

  • Example 2 (This command is one of the issues)

ESX.RegisterCommand(‘car’, ‘admin’, function(xPlayer, args, showError)

xPlayer.triggerEvent('esx:spawnVehicle', args.car)

end, false, {help = _U(‘command_car’), validate = false, arguments = {

{name = 'car', help = _U('command_car_car'), type = 'any'}

}})

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.