Skip to content

Commit

Permalink
weapon check convention
Browse files Browse the repository at this point in the history
any item even if not weapon containing weapon_ receives serial and quality, also any weapons not containing weapon_ don't receive quality
  • Loading branch information
Alivemonstor authored Dec 28, 2024
1 parent 48ed1ed commit 8c5bc8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ function AddItem(identifier, item, amount, slot, info, reason)
combinable = itemInfo.combinable
}

if QBCore.Shared.SplitStr(item, '_')[1] == 'weapon' then
if itemInfo.type == 'weapon' then
if not inventory[slot].info.serie then
inventory[slot].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
Expand Down

0 comments on commit 8c5bc8b

Please sign in to comment.