MonSteRDM Posted September 13, 2018 Share Posted September 13, 2018 I want to create a lua for an infernus shader / FX, can someone help me or guide me to do it?, It is usually called "Dynamic Vehicle Overlay". i have the FX, just need to add the commands. I know it adds: dxSetShaderValue (Shader, tex, Texture) But i don't understand. Link to comment
MisterQuestions Posted September 13, 2018 Share Posted September 13, 2018 How about not stealing the shader xd and instead research Link to comment
JeViCo Posted September 14, 2018 Share Posted September 14, 2018 21 hours ago, MisterQuestions said: How about not stealing the shader xd and instead research that's not stealing. This shader still can be found as example on wiki page @MonSteRDM, you should create a shader for this car with dxCreateShader function, apply it on any vehicle texture (your overlay. Mostly "remap" or "vehiclegrunge128") to replace it in future using engineApplyShaderToWorldTexture function. Then you should use dxSetShaderValue to add a texture and that's it. Also you need setElementData, engineRemoveShaderFromWorldTexture functions and onClientElementStreamIn, onClientElementStreamOut to synchronize it with other players 1 Link to comment
MonSteRDM Posted September 20, 2018 Author Share Posted September 20, 2018 To install shader on the lights is very different? Link to comment
JeViCo Posted September 20, 2018 Share Posted September 20, 2018 (edited) 7 hours ago, MonSteRDM said: To install shader on the lights is very different? What do you mean - street lights or car lights? Anyway you should know this: - If you want to apply shader on a single object/car/skin you should add targetElement (3-rd argument of engineApplyShaderToWorldTexture). If you didn't add this, shader would apply on every element with your texture name - If you want to apply shader on several object/cars/skins you should add targetElement which i indicated in the paragraph above AND create own shader for each element (i took both from wiki notes) for example you can use tables vehs = {} vehs["vehicle element"] = "dxCreateShader stuff (shader element)" Edited September 20, 2018 by JeViCo 1 Link to comment
MonSteRDM Posted September 28, 2018 Author Share Posted September 28, 2018 Thanks for the help, I managed to do everything, from the dvo, to the lights and window of the vehicle. I want to make another for the tires, you know the name of the tires specifically ?. Another question, because when you activate the dvo, you see the same in all the players? Any advice? *I am sorry for my bad english* https://i.imgur.com/Sy1mtQr.png 1 Link to comment
JeViCo Posted September 28, 2018 Share Posted September 28, 2018 3 hours ago, MonSteRDM said: I want to make another for the tires, you know the name of the tires specifically ?. not really. You can add tuning part (wheels) to vehicles when they spawn and replace their model. Then you should add tire texture to each wheel (that's really not simple so you can look for finished one). 3 hours ago, MonSteRDM said: Another question, because when you activate the dvo, you see the same in all the players? Any advice? you should use setElementData/getElementData server-side to make it synced (using triggerServerEvent) 3 hours ago, MonSteRDM said: *I am sorry for my bad english* same 1 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