Sylvek Posted April 25, 2017 Share Posted April 25, 2017 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. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now