It is good when you first time connect the server(or quit the game then reconnect).
if you using disconnect, the custom texture with scaleform will be loss.but HasStreamedTextureDictLoaded(name) returns true
In this example :
‘dlc_sol’ is the original game scaleform file,which is connected with ‘dlc_sol.ytd’
‘phi_maxim’ is the original game scaleform file,which is connected with ‘phi_maxim.ytd’
‘dlc_sol2’ is replaced by the original game scaleform file ‘phi_maxim’,which is connected with ‘dlc_sol2.ytd’
the textures of dlc_sol2.ytd will be loss after disconnect.
Also,If you streamed a custom abc_def.gfx with abc_def.ytd.It will good to play at the firsttime and loss textures after disconnect.
At that moment,to avoid this glitch just replace and rename the custom abc_def.gfx with abc_def.ytd
to a game-base scaleform which have a .ytd together.Such as ‘dlc_sol’,‘www_ammunation_net’,etc…
In this example, ‘phi_maxim’ is replaced by the a new ‘dlc_sol’.It is good after disconnect.
video
blanktest.zip (96.1 KB)
CreateThread(function()
local scaleform = RequestScaleformMovie("dlc_sol")
while not HasScaleformMovieLoaded(scaleform) do
Citizen.Wait(0)
end
while true do Wait(0)
DrawScaleformMovie(scaleform,0.2,0.5,0.5,0.5,255,255,255,255)
end
end)
CreateThread(function()
if not HasStreamedTextureDictLoaded("dlc_sol2") then
RequestStreamedTextureDict("dlc_sol2", true)
while not HasStreamedTextureDictLoaded("dlc_sol2") do
Wait(100)
end
print("i am sure dlc_sol2 texture loaded")
end
local scaleform = RequestScaleformMovie("dlc_sol2") --replaced with game-base phi_maxim
while not HasScaleformMovieLoaded(scaleform) do
Citizen.Wait(0)
end
while true do Wait(0)
DrawScaleformMovie(scaleform,0.5,0.5,0.5,0.5,255,255,255,255)
end
end)
CreateThread(function()
local scaleform = RequestScaleformMovie("phi_maxim") --replaced with game-base dlc_sol
while not HasScaleformMovieLoaded(scaleform) do
Citizen.Wait(0)
end
while true do Wait(0)
DrawScaleformMovie(scaleform,0.8,0.5,0.5,0.5,255,255,255,255)
end
end)