Ulysses

General => Off-Topic => Topic started by: genkaix1000 on January 22, 2017, 07:05:31 PM

Title: How to remove crosshair
Post by: genkaix1000 on January 22, 2017, 07:05:31 PM
Hi everyone!
Anyone know how to remove the crosshair on all weapons?

(For all users of the server)
Title: Re: How to remove crosshair
Post by: BlueNova on January 22, 2017, 07:24:33 PM
Code: [Select]
crosshair 1 is for the crosshair on
Code: [Select]
crosshair 0 is for the crosshair off

Just put those in console.
Title: Re: How to remove crosshair
Post by: MrPresident on January 22, 2017, 08:01:15 PM
That's clientside, he might want to disable it for all players.

Also, this is off-topic. Moving.
Title: Re: How to remove crosshair
Post by: genkaix1000 on January 22, 2017, 08:32:45 PM
Sorry, I was wrong about the section.
I need to remove the crosshair from all players and can not activate it
Title: Re: How to remove crosshair
Post by: MrPresident on January 22, 2017, 09:06:25 PM
Throw this in a lua file and save it to garrysmod/lua/autorun

Code: [Select]
AddCSLuaFile()
if SERVER then return end
function HideHUD(name)
for k, v in pairs( { "CHudCrosshair" } ) do
if name == v then return false end
end
end
hook.Add( "HUDShouldDraw", "HideHUD", HideHUD)


or alternatively, you could explore the use of:

http://wiki.garrysmod.com/page/Player/CrosshairDisable
Title: Re: How to remove crosshair
Post by: genkaix1000 on January 23, 2017, 05:06:21 PM
Thanks! Works fine!