Jump to content

Crosshair


Baseplate

Recommended Posts

Use shaders.

the crosshair needs to be 1/4 off the whole crosshair

evrything:

client:

addEventHandler( "onClientResourceStart", resourceRoot, 
    function() 
        if getVersion ().sortable < "1.1.0" then 
            outputChatBox( "resource wont work on this client." ) 
            return 
        end 
    local texture = dxCreateTexture ("images/aimer.png") 
    local shader = dxCreateShader ( "shader.fx" ) 
dxSetShaderValue ( shader, "gTexture", texture ) 
engineApplyShaderToWorldTexture ( shader, "sitem16") 
        end 
) 

meta.xml:

<meta> 
    <script src="cscripted.lua" type="client" /> 
    <file src="shader.fx" type="client" /> 
<file src="images/aimer.png" type="client" /> 
</meta> 
  

shader:

texture gTexture; 
technique TexReplace 
{ 
    pass P0 
    { 
        Texture[0] = gTexture;   
    } 
} 

and then the croshair:

http://denz.comuf.com/apps/aimer.png

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...