From 8c5bc8b4acc4297e86d8fdd68748b6b416fe5ae1 Mon Sep 17 00:00:00 2001 From: "Alivemonstor [Jayden]" <79489495+Alivemonstor@users.noreply.github.com> Date: Sat, 28 Dec 2024 02:30:36 +0000 Subject: [PATCH] weapon check convention any item even if not weapon containing weapon_ receives serial and quality, also any weapons not containing weapon_ don't receive quality --- server/functions.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/functions.lua b/server/functions.lua index 1307990a..1eb590e5 100644 --- a/server/functions.lua +++ b/server/functions.lua @@ -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