Removing default crosshair when people join the server?

Hello there guys.
I wanna know how do I make people remove the default gmod crosshair when they join my server.

Thanks in advanced

Sorry for all the stupid questions I make



local function HideThings( name )
	if(name == "CHudCrosshair") then
             return false
        end
        -- We don't return anything here otherwise it will overwrite all other 
        -- HUDShouldDraw hooks.
end
hook.Add( "HUDShouldDraw", "HideThings", HideThings )


Should still be relevant

Where do I put this exactly? Sorry for my incredibly dumb question… I’m really nub at lua.

Go to garrysmod/lua/autorun/server/ and make a lua file with any name and put the code in that lua file and restart the server.

aight man… Ill try it out.

[editline]27th January 2014[/editline]

Ok… So this is my way of doing it and it worked…(For other users who don’t know)

Create a new lua file in: garrysmod/lua/autorun(not in client or server file)
and Type in this code:


if (CLIENT) then
     local function HideThings( name )
          if (name == "CHudCrosshair) then
               return false
          end
     end
hook.Add( "HUDShouldDraw", "HideThings", HideThings )
end

Thanks for helping me guys! Cheers :smiley: