qb-target migration + DrawText suppression + time freeze

- qb-core/client/drawtext.lua: Global [E] prompt suppression (all DrawText functions are no-ops) - qs-housing/qb.lua: DrawText3D/DrawText3Ds/DrawTextBoard no-ops when UseTarget=true - qs-housing/qb-target.lua: Added BoxZone target on Real Estate NPC (executes /housebrowser) - qb-weathersync: Time freeze at 14:00 (BaseTime=14, FreezeTime=true)
This commit is contained in:
2026-04-03 04:12:32 +03:00
parent e756e29294
commit 4d73d4a013
5 changed files with 87 additions and 60 deletions

View File

@@ -61,7 +61,12 @@ function ShowHelpNotification(msg)
end
local texts = {}
if GetResourceState('qs-textui') == 'started' then
if Config.UseTarget then
-- RED VALLEY: Suprimăm DrawText3D când folosim qb-target (dot target)
function DrawText3D(x, y, z, text, id, key) end
function DrawText3Ds(x, y, z, text) end
function DrawTextBoard(x, y, z, text) end
elseif GetResourceState('qs-textui') == 'started' then
function DrawText3D(x, y, z, text, id, key)
local _id = id
if not texts[_id] then
@@ -96,32 +101,34 @@ else
end
end
function DrawText3Ds(x, y, z, text)
SetTextScale(0.35, 0.35)
SetTextFont(4)
SetTextProportional(1)
SetTextColour(255, 255, 255, 215)
SetTextEntry('STRING')
SetTextCentre(true)
AddTextComponentString(text)
SetDrawOrigin(x, y, z, 0)
DrawText(0.0, 0.0)
local factor = text:len() / 370
DrawRect(0.0, 0.0 + 0.0125, 0.017 + factor, 0.03, 0, 0, 0, 75)
ClearDrawOrigin()
end
if not Config.UseTarget then
function DrawText3Ds(x, y, z, text)
SetTextScale(0.35, 0.35)
SetTextFont(4)
SetTextProportional(1)
SetTextColour(255, 255, 255, 215)
SetTextEntry('STRING')
SetTextCentre(true)
AddTextComponentString(text)
SetDrawOrigin(x, y, z, 0)
DrawText(0.0, 0.0)
local factor = text:len() / 370
DrawRect(0.0, 0.0 + 0.0125, 0.017 + factor, 0.03, 0, 0, 0, 75)
ClearDrawOrigin()
end
function DrawTextBoard(x, y, z, text)
SetTextScale(0.45, 0.45)
SetTextFont(1)
SetTextProportional(1)
SetTextColour(0, 0, 0, 215)
SetTextEntry('STRING')
SetTextCentre(true)
AddTextComponentString(text)
SetDrawOrigin(x, y, z, 0)
DrawText(0.0, 0.0)
ClearDrawOrigin()
function DrawTextBoard(x, y, z, text)
SetTextScale(0.45, 0.45)
SetTextFont(1)
SetTextProportional(1)
SetTextColour(0, 0, 0, 215)
SetTextEntry('STRING')
SetTextCentre(true)
AddTextComponentString(text)
SetDrawOrigin(x, y, z, 0)
DrawText(0.0, 0.0)
ClearDrawOrigin()
end
end
function DrawGenericText(text)

View File

@@ -920,3 +920,31 @@ RegisterNetEvent('housing:initHouses', function(houseConfig)
end
end
end)
-- ============================================================================
-- RED VALLEY: qb-target pe NPC-ul Real Estate (înlocuiește [E] - Open House Browser)
-- ============================================================================
if Config.RealeStateNPC and Config.RealeStateNPC.enabled then
CreateThread(function()
Wait(3000) -- Așteptăm ca NPC-ul să fie spawnat de codul encrypted
local npcCoords = Config.RealeStateNPC.location
exports[target_name]:AddBoxZone('rv_realestate_npc', vec3(npcCoords.x, npcCoords.y, npcCoords.z), 1.5, 1.5, {
name = 'rv_realestate_npc',
heading = npcCoords.w,
debugPoly = false,
minZ = npcCoords.z - 1.0,
maxZ = npcCoords.z + 2.0,
}, {
options = {
{
icon = 'fa-solid fa-house',
label = 'Open House Browser',
action = function()
ExecuteCommand('housebrowser')
end,
},
},
distance = 2.5,
})
end)
end