I'm working on a SWEP that hides you from NPCs (they ignore you).
Unfortunately, I barely know anything about LUA.
I'm trying to make this so when the gun is deployed, the NPCs will ignore you. And when it's holstered, the NPCs will bring their attention back to you.
I'm not really sure how to bring console commands into LUA, because like I said, I'm a noob. I do know the console commands like the back of my hand though.
I want to slap something in between:
function SWEP:Deploy()
...
end
- and of course the opposite:
function SWEP:Holster()
...
end
("..."'s meaning whatever the hell I have in there already.)
Help is appreciated :D
Deploy:
[code]self.Owner:SetNoTarget(true)[/code]
Holster:
[code]self.Owner:SetNoTarget(false)[/code]
That should do it.
[QUOTE=Radec;18385700]Deploy:
[code]self.Owner:SetNoTarget(true)[/code]
Holster:
[code]self.Owner:SetNoTarget(false)[/code]
That should do it.[/QUOTE]
Ah! Thanks alot, bro. I was thinking I had to use the gmod command :P
Sorry, you need to Log In to post a reply to this thread.