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>