Disable Weapon Selection.

Hi!
I would like to know how to disable the weapon selection with numbers.

I already have this but this only disable the change with mouse:

[lua]function GM:PlayerBindPress(ply, bind, pressed)
if bind == “invnext” and pressed then
return true
elseif bind == “invprev” and pressed then
return true
end
end[/lua]

If i press 1, it will change weapon. How can i disable it ?

Thank you.

Easier would be to use **[Gamemode.HUDShouldDraw

http://wiki.garrysmod.com/favicon.ico](wiki.garrysmod.com/?title=Gamemode.HUDShouldDraw)** and return false if the name is CHudWeaponSelection

Oh my god thank you. I didn’t notice that.

That only makes it not show up, you can still select weapons. Might be wrong.

No it works perfectly for what i wanted to do. :slight_smile: