Hi !
Last day I created script which is applying shaders "onClientResourceStart" for all vehs where elementData(vinyl:id). All were working till I had to reconnect then all vehs didn't load any shader ( I mean texture on vehiclegrunge256 ). I think its script need to restart but it isnt. I have to restart mta to again see all applied shaders. I can add that after reconnect I cant see a texture named "vehiclegrunge256" in list of nearby textures.
Starting code
function onStart22()
renderVinyles()
end
addEventHandler("onClientResourceStart",resourceRoot,onStart22)
function Render1Winyl(vinyl,veh,txt2)
if vinyl > 0 and vinyl <= 7 then
local vinyl = tonumber(vinyl)
local shader = dxCreateShader("shader.fx")
local Texture = dxCreateTexture ("txt"..vinyl..".png")
dxSetShaderValue(shader,"TEXTURE_REMAP",Texture)
engineApplyShaderToWorldTexture(shader, txt2, veh)
end
end
addEvent("renderONE",true)
addEventHandler("renderONE",resourceRoot,Render1Winyl)
no errors in db3.