SycroX Posted November 19, 2016 Share Posted November 19, 2016 (edited) Hi all , today i have a small question , : can i replace a weapon shape by using shader and with out using txd , i have made it but there is a problem, the shader had replaced the weapon but not the weapon that is in my hand , it has replaced the weapon that i created it by createWeapon how can i solve this Edited November 19, 2016 by #Skrillex Link to comment
MIKI785 Posted November 19, 2016 Share Posted November 19, 2016 Shaders replace textures, not the models. Do you want to replace just one weapon (element) and not all of them that are of the same weapon ID? For example that two players have an M4 and you want it to be changed for just one player? I don't know if that's possible, since the weapons that are held by players are not elements of their own. createWeapon does create elements, that's why it's possible to change it per element there. Link to comment
SycroX Posted November 20, 2016 Author Share Posted November 20, 2016 i have solved it but i don't know how to do this part " For example that two players have an M4 and you want it to be changed for just one player? " what i must do ? i want to change the texture of the weapon and i made it but how can i make this " For example that two players have an M4 and you want it to be changed for just one player? " Link to comment
MIKI785 Posted November 20, 2016 Share Posted November 20, 2016 Yeah i told you it cannot be done, since the weapon the player is holding is not an element. You know what i mean? In engineApplyShaderToWorldTexture the targetElement argument, what do you set it to? There's no element for the weapon the player is holding but you could try setting it to be the player element, see what that does. If that doesn't solve it then I'm afraid it's not possible or maybe I just don't know how myself, so wait for someone else to reply. But try the player element first. 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