FuriouZ Posted May 2, 2015 Posted May 2, 2015 Hello! Is there any way to reset a shader texture to a original one without stopping a resource ? I wan't do to that if i enter to a specific area, then i have a custom texture, if i leave from that area, the custom texture will be removed and the original one will be back ? code addEventHandler("onClientRender", root, function() local zone = getZoneName (getElementPosition(getLocalPlayer())) if zone == "Santa Maria Beach" then dxSetShaderValue(textBeachsandShad,"gTexture",beachSand) engineApplyShaderToWorldTexture(textBeachsandShad,"grass_128hv") else --How to reset original texture?? end end) Homepage @ http://rageresources.blogspot.com/ Offical Facebook @ https://www.facebook.com/pages/Rage-Scr ... fref=photo
Walid Posted May 2, 2015 Posted May 2, 2015 Yes you can. engineRemoveShaderFromWorldTexture () Your code addEventHandler("onClientRender", root, function() local zone = getZoneName (getElementPosition(getLocalPlayer())) if zone == "Santa Maria Beach" then dxSetShaderValue(textBeachsandShad,"gTexture",beachSand) engineApplyShaderToWorldTexture(textBeachsandShad,"grass_128hv") else engineRemoveShaderFromWorldTexture(textBeachsandShad,"grass_128hv") end end) Do not yield your back to your enemy, might feel something strange in your ass. Two things are infinite the universe and human stupidity and i'm not sure about the universe. UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators
FuriouZ Posted May 2, 2015 Author Posted May 2, 2015 oh thanks ! Homepage @ http://rageresources.blogspot.com/ Offical Facebook @ https://www.facebook.com/pages/Rage-Scr ... fref=photo
Walid Posted May 2, 2015 Posted May 2, 2015 oh thanks ! You are welcome Do not yield your back to your enemy, might feel something strange in your ass. Two things are infinite the universe and human stupidity and i'm not sure about the universe. UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators
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