fix(qb-core): post-update recovery + centralizare notify 17mov_Hud

Restaurat jobs.lua din git (Quasar fork a suprascris joburile 17mov). Adăugat item map în items.lua (lipsea, rupt rv-maphold). Setat licences.driver = false în config.lua. Override QBCore.Functions.Notify + QBCore:Notify event → 17mov_Hud:ShowNotification (toate notificările merg automat prin 17mov_Hud).
This commit is contained in:
2026-04-03 02:47:59 +03:00
parent 06414ed181
commit e756e29294
1539 changed files with 51926 additions and 39806 deletions
@@ -5,8 +5,9 @@
Funcționalitate:
- Fără item 'map' → blipurile ascunse (harta goală), ESC merge normal
- Cu item 'map' → blipuri vizibile + animație hartă în mână la ESC
- Playerul se spawnează cu harta automat (server.lua)
- Cu item 'map' → blipuri vizibile + animație hartă în mână la USE din inventar
- Playerul se spawnează cu harta automat (StarterItems qb-core)
- QS Inventory pause menu: compatible (NUI-based detection)
]]
local hiddenBlips = {}
@@ -58,14 +59,8 @@ local QBCore = exports['qb-core']:GetCoreObject()
-- Verifică dacă playerul are item 'map'
-----------------------------------------
local function HasMap()
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
local hasItem = QBCore.Functions.HasItem('map')
return hasItem
end
-----------------------------------------
@@ -89,11 +84,12 @@ local function ActivateMap()
-- Scenario: playerul ține harta fizică în mâini
TaskStartScenarioInPlace(ped, "WORLD_HUMAN_TOURIST_MAP", 0, true)
-- Monitorizează închiderea meniului
-- Monitorizează închiderea meniului (GTA pause SAU QS NUI pause)
CreateThread(function()
while mapActive do
Wait(200)
if not IsPauseMenuActive() then
-- Verificăm ambele: pause nativ GTA + NUI focus (QS inventory pause)
if not IsPauseMenuActive() and not IsNuiFocused() then
ClearPedTasks(ped)
TaskPlayAnim(ped, "melee@holster", "holster", 4.0, -4.0, 300, 1, 1.0)
mapActive = false
@@ -104,14 +100,21 @@ local function ActivateMap()
end
-----------------------------------------
-- Detectează ESC / P → animație hartă
-- Detectează ESC → animație hartă
-- ESC NU se blochează niciodată
-- Suportă atât GTA pause menu cât și QS pause menu (NUI)
-----------------------------------------
CreateThread(function()
while true do
Wait(0)
if not IsPauseMenuActive() and (IsControlJustPressed(0, 200) or IsControlJustPressed(0, 199)) then
ActivateMap()
-- Control 200 = ESC, Control 199 = P
if IsControlJustPressed(0, 200) or IsControlJustPressed(0, 199) then
-- Delay mic ca să se apuce QS să-și deschidă NUI-ul
Wait(100)
-- Dacă s-a deschis fie pause nativ fie NUI (QS pause menu)
if IsPauseMenuActive() or IsNuiFocused() then
ActivateMap()
end
end
end
end)