[HELP] Change value of variable in SQL fetchAll request

Hi, i’m trying to change the value of a variable to check if player is admin or not, here is the function:

function getPlayerInfo(steamid)
    result = nil
    admin = 0

    MySQL.Async.fetchAll("SELECT * FROM users WHERE identifier = @steamid", { ['@steamid'] = steamid },
    function(result)
        if result[1] == nil then
            print("[ERROR] Player not found in BDD")
            admin = 84
        elseif result[1].permission_level == 4 and result[1].group == "superadmin" then
            admin = 1
        else
            admin = 0
        end
    end)
    print(admin)
    return admin
end

The program pass into the elseif (as i want) but admin do not change. i Just want to get this value by any way.
Any fix?
Thank’s

thats because the callback passed into fetchAll is executed after the return statement of the function
use lua promises with Citizen.Await, its fivem built-in