SOLVED

Solution

So I kinda got it to work I had to use something else other than group.admin

for this instance i did rhys19.aop and it worked. but admin or group.admin won’t work for some reason.

so to mediate that I did add_ace group.admin rhys19.aop and it works perfectly.

local admin = IsPlayerAceAllowed(source, “rhys19.aop”)
add_ace group.admin rhys19.aop

I’m trying to use ace perms on my server script and it keeps returning false even though ace perms on other scripts work fine

I’m using the group.admin ace perm

RegisteCommand("aop", function(source, args, raw)
    local admin = IsPlayerAceAllowed("admin")
    print(admin)
    if IsPlayerAceAllowed(source, "admin") then
        print("Permission Granted")
    local msg = table.concat(args, " ")
    TriggerClientEvent("sendAOP", msg)
    else
        print("Invalid Permissions")
    end
end)

Client side:

RegisterNetEvent("sendAOP")
AddEventHandler("sendAOP", function(msg)
    aop = msg
end)

I’m aware there are some aop scripts around, I was just trying to get ace perms working.

local admin = IsPlayerAceAllowed("admin")

You didn’t specify player source here

See I tried adding source first like

local admin = IsPlayerAceAllowed(source, "admin")

but it still returns false for some reason.

then maybe you are not allowed, did you add ace permisssion in the cfg?

As far as I know ya.
Other scripts that use group.admin perms like vMenu work just fine for me.

So I kinda got it to work I had to use something else other than group.admin

for this instance i did rhys19.aop and it worked. but admin or group.admin won’t work for some reason.

so to mediate that I did add_ace group.admin rhys19.aop and it works perfectly.

ye about that you need to put group.admin <acces_name>:

local admin = IsPlayerAceAllowed(source, “<acces_name>”)

2 Likes

<acces_name>?

so group.admin would be this value <acces_name> in the IsPlayerAceAllowed() function?

no its whatever after group.admin

example:

add_ace group.admin theaccessname

theaccessname is what you need to put

2 Likes

That’s exactly what I did :man_facepalming:

That’s exactly what I did :man_facepalming:

If you check my post that I marked as the solution…