mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-29 01:08:57 +00:00
Fix Item Does not Exit being broadcasted globally
This commit is contained in:
@@ -237,7 +237,7 @@ QBCore.Player.CreatePlayer = function(PlayerData)
|
||||
self.Functions.AddItem = function(item, amount, slot, info)
|
||||
local totalWeight = QBCore.Player.GetTotalWeight(self.PlayerData.items)
|
||||
local itemInfo = QBCore.Shared.Items[item:lower()]
|
||||
if itemInfo == nil then TriggerClientEvent('QBCore:Notify', -1, "Item Does Not Exist", "error") return end
|
||||
if itemInfo == nil then TriggerClientEvent('QBCore:Notify', source, "Item Does Not Exist", "error") return end
|
||||
local amount = tonumber(amount)
|
||||
local slot = tonumber(slot) ~= nil and tonumber(slot) or QBCore.Player.GetFirstSlotByItem(self.PlayerData.items, item)
|
||||
if itemInfo["type"] == "weapon" and info == nil then
|
||||
@@ -558,4 +558,4 @@ end
|
||||
QBCore.EscapeSqli = function(str)
|
||||
local replacements = { ['"'] = '\\"', ["'"] = "\\'" }
|
||||
return str:gsub( "['\"]", replacements ) -- or string.gsub( source, "['\"]", replacements )
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user