fix(rv-maphold): foloseste QBCore nativ pt HasItem, fara export qb-inventory

This commit is contained in:
2026-04-01 22:42:06 +03:00
parent 6112500590
commit ddc4d116db
705 changed files with 10 additions and 1 deletions

View File

@@ -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
-----------------------------------------