ahmedo01 Posted July 9, 2014 Share Posted July 9, 2014 First. I need this. If i am in the AF group i can get 285 skin but 285 skin have a shader. But normal people get 285 skin no shader. Why i can do this? Sorry for my bad english. I try this shader.lua addEventHandler( "onClientResourceStart", resourceRoot, function() texture = dxCreateTexture ( "swat.png" ) shader, tec = dxCreateShader( "swat.fx" ) --bit of sanity checking if not shader then outputConsole( "Could not create shader. Please use debugscript 3" ) destroyElement( texture ) return elseif not texture then outputConsole( "loading texture failed" ) destroyElement ( shader ) tec = nil return else engineApplyShaderToWorldTexture ( shader, "swat" ) dxSetShaderValue ( shader, "Tex0", texture ) end end ) swat.fx //-- Declare the texture. These are set using dxSetShaderValue( shader, "Tex0", texture ) texture Tex0; technique simple { pass P0 { //-- Set up texture stage 0 Texture[0] = Tex0; //-- Leave the rest of the states to the default settings } } swat.png swat png is testing. meta.xml <meta> <info author="Ahmet Eren Bilgili" name="Shader" version="1.0" type="misc"/> <script src="shader.lua"/> <file src="swat.png"/> <file src="swat.fx"/> </meta> Link to comment
MTA Team botder Posted July 9, 2014 MTA Team Share Posted July 9, 2014 engineApplyShaderToWorldTexture ( shader, "swat" ) dxSetShaderValue ( shader, "Tex0", texture ) So let's think about the calling order. Your blank shader with a blank "Tex0" variable is trying to apply the blank value to the world texture "swat". After that pointless call you are setting the shader variable "Tex0" and pass the loaded texture to it. And are you sure that the world texture you have to replace is called swat? Link to comment
ahmedo01 Posted July 9, 2014 Author Share Posted July 9, 2014 İ am opened gta3.img i see swat.txd opened it and i see swat. Why i can custom for groups 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