well okay i got it, pasted the 2. in a lua and the 1. in a .fx file named "shader_file.fx". so okay, like i said, i pasted all my variables, but when i start it i dont get any errors, but it wont show off, when im now in MTA (in my server) and go to Debugmode 3, i got the error that the technique is wrong. wheres the problem?
here's my .fx -
texture gTexture;
technique replace
{
pass P0
{
Texture[0] = gTexture;
}
}
that's the .lua -
txd = dxCreateTexture( "tshirtwhite.png" );
if not txd then
txd = nil; -- it's best to nil a variable because it'll waste unnecessary memory
return false;
end
shader = dxCreateShader( "shader_file.fx" ); -- the content of this file should be what I included above
if not shader then
destroyElement( txd );
txd = nil;
return false;
end
dxSetShaderValue( shader, "gTexture", texture )
engineApplyShaderToWorldTexture( shader, "tshirtwhite" ); -- this is the name of texture you want to replace eg. "tshirtwhite"
and here's the meta -
<meta>
<info description="Shader - Clothes" version="0.1.3" type="script" />
<script src="clothes.lua" type="client" />
<file src="shader_file.fx" type="client" />
<file src="tshirtwhite.png" type="client" />
</meta>
as a noob i really dont know what to do.