Git Product home page Git Product logo

inventory's People

Contributors

jay-fivem avatar millusion avatar qwerty1verified avatar xoomer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

inventory's Issues

Items going into other inventorys.

I had a member report a gun going from his 6th slot to his trunk replacing the coke in the trunk.

I had a different member report when searching a suspect half his inventory ended up in the suspects inventory including a gun from the 6th slot. - checked logs and it said they swapped items, when i watched his stream back he never put his guns/ids in the suspects inventory.

also after the officer searched the suspect he was in his inventory moving items around and it said, you don't have this item!

floor items

so when you place items on the ground once you leave the area they just go and not stay there till restart

Can convert any item to another

If you take an item from the inventory and drop it, having an item on 1-5 slots if you swap the item inventory with dropped inventory it will convert one of the items, works with all items.

chat.-.Discord.2022-05-31.02-26-44_Trim.mp4

Item Duplication

I apologize in advance since I haven't used this inventory but since it's based on lj-inventory and it has that issue I'm letting you know. If you try to give an item to another player that doesn't have enough room in his pockets for it,that item will drop on the ground as a duplicate but you will still have it in your pockets as well. So people can just duplicate items non-stop.

stash decay not working

decay is working on player's pocket only but when you put item in any stash/trunk/glovebox decay will still remain the same as before. Is there any fix ?

Garage Phone App

[ script:qb-core] SCRIPT ERROR: SCRIPT ERROR: @qb-phone/server/main.lua:200: attempt to index a nil value (global 'Garages')
[ script:qb-core] > ref (@qb-phone/server/main.lua:200)
[ script:qb-core] > Query.onResult (@oxmysql/dist/build.js:21715)
[ script:qb-core] > (@oxmysql/dist/build.js:11918)
[ script:qb-core] > processTicksAndRejections (node:internal/process/task_queues:78)
[ script:qb-core]

how do i fix this

[BUG] Glovebox decay not working

Decay doesn't seem to be working for the glovebox.
I noticed when I put an item into the glovebox everything seems fine, but when I close inventory and reopen, the description will say "undefined."
My print statements in the decay script show the item is in the glovebox, but the item quality does not get updated.

More a question than an issue

How do you do with weapons? Like i don't want weapons to decay in the server, what should i do? Put like 99999 days?

Issue when purchasing items from shops

Hello,

Before getting to the issue I would just like to thank you for the resource.

When purchasing items from shops the decay does not work. The items also do not identify properly. For example I can give myself a item or receive a item via a function with no issue, the decay is displayed and the description shows properly. When purchasing a item from the shop it displays the last item you hovered over when hovering over the newly purchased item. Any suggestions on how I can fix this issue?

Thanks again

Decay kinda works

The decay works but only if you fly out and fly back in with items in your inventory that decays

Descriptions of items

The description of everything else than weapon is actually a copy of the description of the weapons.


image

The error I get in live console:
[ script:qb-core] SCRIPT ERROR: @qb-core/server/player.lua:302: attempt to index a nil value (local 'itemInfo')
[ script:qb-core] > ref (@qb-core/server/player.lua:302)
[ script:qb-core] > GiveStarterItems (@qb-multicharacter/server/main.lua:24)
[ script:qb-core] > handler (@qb-multicharacter/server/main.lua:104)
[ script:qb-core] > query_default (@oxmysql/dist/server/build.js:16108)
[ script:qb-core] > runMicrotasks (:0)
[ script:qb-core] > processTicksAndRejections (node:internal/process/task_queues:96)
[script:qb-multichara] SCRIPT ERROR: error object is not a string

qb-core/server/player.lua:302 refers to the snippets provide in your readme: (itemInfo['created'] = time)
self.Functions.AddItem = function(item, amount, slot, info, created)
local totalWeight = QBCore.Player.GetTotalWeight(self.PlayerData.items)
local itemInfo = QBCore.Shared.Items[item:lower()]
local time = os.time()
if not created then
itemInfo['created'] = time
else
itemInfo['created'] = created
end
-- itemInfo['created'] = time
if itemInfo["type"] == 'item' and info == nil then
info = { quality = 100 }
end
if itemInfo == nil then
TriggerClientEvent('QBCore:Notify', self.PlayerData.source, Lang:t('error.item_not_exist'), 'error')
return
end
local amount = tonumber(amount)
local slot = tonumber(slot) or QBCore.Player.GetFirstSlotByItem(self.PlayerData.items, item)
if itemInfo['type'] == 'weapon' and info == nil then
info = {
serie = tostring(QBCore.Shared.RandomInt(2) .. QBCore.Shared.RandomStr(3) .. QBCore.Shared.RandomInt(1) .. QBCore.Shared.RandomStr(2) .. QBCore.Shared.RandomInt(3) .. QBCore.Shared.RandomStr(4)),
}
end
if (totalWeight + (itemInfo['weight'] * amount)) <= QBCore.Config.Player.MaxWeight then
if (slot and self.PlayerData.items[slot]) and (self.PlayerData.items[slot].name:lower() == item:lower()) and (itemInfo['type'] == 'item' and not itemInfo['unique']) then
self.PlayerData.items[slot].amount = self.PlayerData.items[slot].amount + amount
self.Functions.UpdatePlayerData()
TriggerEvent('qb-log:server:CreateLog', 'playerinventory', 'AddItem', 'green', '' .. GetPlayerName(self.PlayerData.source) .. ' (citizenid: ' .. self.PlayerData.citizenid .. ' | id: ' .. self.PlayerData.source .. ') got item: [slot:' .. slot .. '], itemname: ' .. self.PlayerData.items[slot].name .. ', added amount: ' .. amount .. ', new total amount: ' .. self.PlayerData.items[slot].amount)
return true
elseif (not itemInfo['unique'] and slot or slot and self.PlayerData.items[slot] == nil) then
self.PlayerData.items[slot] = { name = itemInfo['name'], amount = amount, info = info or '', label = itemInfo['label'], description = itemInfo['description'] or '', weight = itemInfo['weight'], type = itemInfo['type'], unique = itemInfo['unique'], useable = itemInfo['useable'], image = itemInfo['image'], shouldClose = itemInfo['shouldClose'], slot = slot, combinable = itemInfo['combinable'], itemInfo['created'] }
self.Functions.UpdatePlayerData()
TriggerEvent('qb-log:server:CreateLog', 'playerinventory', 'AddItem', 'green', '' .. GetPlayerName(self.PlayerData.source) .. ' (citizenid: ' .. self.PlayerData.citizenid .. ' | id: ' .. self.PlayerData.source .. ') got item: [slot:' .. slot .. '], itemname: ' .. self.PlayerData.items[slot].name .. ', added amount: ' .. amount .. ', new total amount: ' .. self.PlayerData.items[slot].amount)
return true
elseif (itemInfo['unique']) or (not slot or slot == nil) or (itemInfo['type'] == 'weapon') then
for i = 1, QBConfig.Player.MaxInvSlots, 1 do
if self.PlayerData.items[i] == nil then
self.PlayerData.items[i] = { name = itemInfo['name'], amount = amount, info = info or '', label = itemInfo['label'], description = itemInfo['description'] or '', weight = itemInfo['weight'], type = itemInfo['type'], unique = itemInfo['unique'], useable = itemInfo['useable'], image = itemInfo['image'], shouldClose = itemInfo['shouldClose'], slot = i, combinable = itemInfo['combinable'], created = itemInfo['created'] }
self.Functions.UpdatePlayerData()
TriggerEvent('qb-log:server:CreateLog', 'playerinventory', 'AddItem', 'green', '' .. GetPlayerName(self.PlayerData.source) .. ' (citizenid: ' .. self.PlayerData.citizenid .. ' | id: ' .. self.PlayerData.source .. ') got item: [slot:' .. i .. '], itemname: ' .. self.PlayerData.items[i].name .. ', added amount: ' .. amount .. ', new total amount: ' .. self.PlayerData.items[i].amount)
return true
end
end
end
else
TriggerClientEvent('QBCore:Notify', self.PlayerData.source, Lang:t('error.too_heavy'), 'error')
end
return false
end

quality stucked on 1

When the quality is at 1, the item can still be used and it doesn't get destroyed. it's just at quality 1 which doesn't change

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.