ronaldoguedess Posted October 18, 2014 Share Posted October 18, 2014 Friends, I wonder if there is any smoke shader for me to put on the fire? Link to comment
Tails Posted October 18, 2014 Share Posted October 18, 2014 Hello Ronaldo, The code below will create a smoke effect at the player's position. It only lasts for a couple of seconds but there are plenty of other smoke effects you can choose from that will last until you destroy it. Check out this list: https://wiki.multitheftauto.com/wiki/El ... fects_list https://wiki.multitheftauto.com/wiki/CreateEffect addEventHandler("onClientResourceStart",root, function() local x, y, z = getElementPosition(localPlayer) local effect = createEffect("riot_smoke",x,y,z) end ) This one will follow the player: local x,y,z = getElementPosition(localPlayer) eff = createEffect("riot_smoke",x,y,z,-90,0,0) function render() if not eff then return false end local x,y,z = getElementPosition(localPlayer) setElementPosition(eff,x,y,z) end addEventHandler("onClientRender",root,render) Link to comment
ronaldoguedess Posted October 20, 2014 Author Share Posted October 20, 2014 Thank you friend! Thank same! was granade help ... now I would like to set an effect to a vehicle. I noticed that there is a "AttachEffect" function that would be better than the "onclientRender": https://wiki.multitheftauto.com/wiki/AttachEffect q u think? however I could not make it work! hugs Link to comment
lopezloo Posted October 20, 2014 Share Posted October 20, 2014 attachEffect is useful function. You need declare it in your script (copy and paste source code). Also only change is this func use onClientPreRender instead of onClientRender so updating position will be smoother. And remember you need use vector, ex. attachEffect(effect, vehicle, Vector3(0, 0, 0)) Link to comment
Tails Posted October 20, 2014 Share Posted October 20, 2014 That function looks pretty complicated. But glad to have helped you out. Link to comment
ronaldoguedess Posted October 22, 2014 Author Share Posted October 22, 2014 Thank lopezloo , it worked! get it now ! Tails , Thank you too! gave everything right here! ^^ Now my system has become much more sophisticated! heheh 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