#Notes

1 messages · Page 1 of 1 (latest)

runic moth
#

I have installed the note script for qbcore and ox inventory but when i use the note item it just gives me a cursor but no image or nothing

waxen glen
#

You 100% sure your config is set up for ox inv?

#

Also, like the post about posting here mentions, did you enable debug?

#

Also, if your folder for the resource still has a "-main" you gotta remove that, as for like every other script out there

runic moth
waxen glen
#

Did you just delete your message just so you could @ me with the same one and ignore the other 2 things I said AGAIN? kek

runic moth
#

I have done all the things above

#

Nothing shows

waxen glen
#

Ah good. then provide the debug logs from the print outs

runic moth
waxen glen
#

There you go. Now you have to check that error and see what's wrong. Your qbcore does not match the latest online so I cant help you there. It says the file and what line

#

Something aint working with your QBCore.Functions.HasItem

runic moth
#

Does this help?

function QBCore.Functions.HasItem(items, amount)
    local isTable = type(items) == 'table'
    local isArray = isTable and table.type(items) == 'array' or false
    local totalItems = #items
    local count = 0
    local kvIndex = 2
    if isTable and not isArray then
        totalItems = 0
        for _ in pairs(items) do totalItems += 1 end
        kvIndex = 1
    end
    for _, itemData in pairs(QBCore.PlayerData.items) do
        if isTable then
            for k, v in pairs(items) do
                local itemKV = {k, v}
                if itemData and itemData.name == itemKV[kvIndex] and ((not amount and not isArray and itemData.amount >= v) or (isArray and amount and itemData.amount >= amount) or (not amount and isArray)) then
                    count += 1
                end
            end
            if count == totalItems then
                return true
            end
        else -- Single item as string
            if itemData and itemData.name == items and (not amount or (amount and itemData.amount >= amount)) then
                return true
            end
        end
    end
    return false
end