fix(rv-maphold): foloseste QBCore nativ pt HasItem, fara export qb-inventory
This commit is contained in:
@@ -52,11 +52,20 @@ local function SwitchBlips(hide)
|
||||
end
|
||||
end
|
||||
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
|
||||
-----------------------------------------
|
||||
-- Verifică dacă playerul are item 'map'
|
||||
-----------------------------------------
|
||||
local function HasMap()
|
||||
return exports['qb-inventory']:HasItem('map', 1)
|
||||
local PlayerData = QBCore.Functions.GetPlayerData()
|
||||
if not PlayerData or not PlayerData.items then return false end
|
||||
for _, item in pairs(PlayerData.items) do
|
||||
if item and item.name == 'map' and item.amount and item.amount > 0 then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
-----------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user