How do you hide the viewmodel?

Title.

Tried checking the Gmod Lua Wiki?

Lots of weapon hooks there.

[editline]08:00PM[/editline]

Wait sorry, are you making your own weapon or just want to hide your viewmodel in general?

I want to hide it in general, is there a console cmd?

Also is there a command to hide the playermodel?

One second, I think there is…

[editline]08:02PM[/editline]

I can’t find it

[editline]08:03PM[/editline]

try putting this in a file called “hideview.lua” and place into Lua/autorun/server

[LUA]
function SWEP:Deploy()
self.Owner:DrawViewModel(false)
end
[/LUA]

[editline]08:03PM[/editline]

I think that should work.

But it isn’t togglable.

Did it work, if so let me do you a toggleable one.

[editline]08:31PM[/editline]

-snip-

Or you could just, y’know, use this:

r_drawviewmodel 0

[editline]09:54PM[/editline]

:v:

Fuuuuuuu- I knew there was a command I just couldn’t find it, my code didn’t work anyways, will make it work though :argh: