Update dui.lua

This commit is contained in:
Michachatz
2025-11-02 00:31:41 +01:00
committed by GitHub
parent 42152a844e
commit 95ec3294b8

View File

@@ -12,28 +12,11 @@ function CreateNamedRenderTargetForModel(name, model)
return handle
end
function RequestTextureDictionary(dict)
RequestStreamedTextureDict(dict)
while not HasStreamedTextureDictLoaded(dict) do Wait(0) end
return dict
end
function LoadModel(model)
if not IsModelInCdimage(model) then return end
RequestModel(model)
while not HasModelLoaded(model) do Wait(0) end
return model
end
function RenderScaleformTV(renderTarget, scaleform, entity)
SetTextRenderId(renderTarget) -- set render target
Set_2dLayer(4)
SetScriptGfxDrawBehindPausemenu(1)
--DrawRect(0.5, 0.5, 1.0, 0.5, 255, 0, 0, 255); -- WOAH!
local coords = GetEntityCoords(entity)
local rot = GetEntityRotation(entity)
SetTextRenderId(renderTarget)
SetScriptGfxDrawOrder(4)
SetScriptGfxDrawBehindPausemenu(true)
DrawSprite("ptelevision_b_dict", "ptelevision_b_txd", 0.5, 0.5, 1.0, 1.0, 0.0, 255, 255, 255, 255)
SetTextRenderId(GetDefaultScriptRendertargetRenderId()) -- reset
SetScriptGfxDrawBehindPausemenu(0)
SetTextRenderId(GetDefaultScriptRendertargetRenderId())
SetScriptGfxDrawBehindPausemenu(false)
end