[Project Sloth][FREE] PS Adminmenu

I have the same problem but still no fix…

“add_principal identifier.fivem:1377891 group.admin #DripJacker

Otherwise try to change from “group.admin” to “qbcore.admin”

2 Likes

thanks, solved

how you solved this problem dude?

hi sir, I want to ask, how do I manually add items that are not yet in the giveitem list command, because I want to add certain items manually so that they can be used to spawn items in the giveitem menu in the ps-adminmenu?

this thing just doesnt want to acknowledge that im an admin… and all i see in comments is constant people having the same issue. bit of a shame noone is helping with this

does it work with ox invintory

can someone help me when i type /addpermission 1 god or /setjob.
message pop up player not online

this fixes your issue :slight_smile:

yes, i have it working with ox inventory. if having issue with admin perm, see my above comment from someone else noting the fix :slight_smile:

still having issues?

it has esx version

1 Like

Everything works so far except with ox inventory, when giving an item to a player it says its giving the item but nothing is being added to their inventory. Any idea how to fix this? Giving cash works just fine.

i had the same issue but didnt hav rtime to look into it so i just added all my ox items to qb-core items list with AI and its fine for now. just have to do that every time you add new items if you want adminmenu spawn. you should be able to spawn via /giveitem now still though.

Yes we can spawn through /giveitem but not through the admin menu

I figured it out, in ps-adminmenu/server/inventory.lua replace the give item function with this for ox:
– Give Item
RegisterNetEvent(‘ps-adminmenu:server:GiveItem’, function(data, selectedData)
local data = CheckDataFromKey(data)
if not data or not CheckPerms(source, data.perms) then return end

local src = source
local target = selectedData["Player"].value
local item = selectedData["Item"].value
local amount = tonumber(selectedData["Amount"].value)

if not item or not amount or amount <= 0 then return end

local targetPlayer = QBCore.Functions.GetPlayer(target)
if not targetPlayer then
    TriggerClientEvent('ox_lib:notify', src, {
        title = 'Admin Menu',
        description = locale("not_online"),
        type = 'error'
    })
    return
end

local success, reason = exports.ox_inventory:AddItem(target, item, amount)

if success then
    TriggerClientEvent('ox_lib:notify', src, {
        title = 'Admin Menu',
        description = locale("give_item", tonumber(amount) .. " " .. item,
            targetPlayer.PlayerData.charinfo.firstname .. " " .. targetPlayer.PlayerData.charinfo.lastname),
        type = 'success'
    })
    TriggerClientEvent('ox_lib:notify', target, {
        title = 'Inventory',
        description = ("You received %sx %s from an admin."):format(amount, item),
        type = 'inform'
    })
else
    TriggerClientEvent('ox_lib:notify', src, {
        title = 'Admin Menu',
        description = ('Failed to give item: %s'):format(reason or 'unknown error'),
        type = 'error'
    })
end

end)

1 Like