Jump to content

Remove crosshair


Recommended Posts

Well, you can use both.

And add this to hide it when resource starts:

addEventHandler ( "onResourceStart", resourceRoot, 
    function ( ) 
        for _, player in ipairs ( getElementsByType ( "player" ) ) do 
            showPlayerHudComponent ( player, "crosshair", false ) 
        end 
    end 
) 

Link to comment
Well, you can use both.

And add this to hide it when resource starts:

addEventHandler ( "onResourceStart", resourceRoot, 
    function ( ) 
        for _, player in ipairs ( getElementsByType ( "player" ) ) do 
            showPlayerHudComponent ( player, "crosshair", false ) 
        end 
    end 
) 

Instead of a bunch of functions and events it may be more useful and practical to use it client-sided and onClientResourceStart ;)

Link to comment
Well, you can use both.

And add this to hide it when resource starts:

addEventHandler ( "onResourceStart", resourceRoot, 
    function ( ) 
        for _, player in ipairs ( getElementsByType ( "player" ) ) do 
            showPlayerHudComponent ( player, "crosshair", false ) 
        end 
    end 
) 

Instead of a bunch of functions and events it may be more useful and practical to use it client-sided and onClientResourceStart ;)

Can be done both ways, is up to him.

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...