I’m attempting to make a swep to access the “DerpInv” addon.
I have it set up so it runs the command on right click, but it runs the command 2-5 times on 1 click.
function SWEP:Initialize() self:SetWeaponHoldType("normal") end function SWEP:Deploy() if SERVER then self.Owner:DrawViewModel(false) self.Owner:DrawWorldModel(false) end end function SWEP:PrimaryAttack() RunConsoleCommand(""); end function SWEP:SecondaryAttack() if CLIENT then RunConsoleCommand("drp_showinv"); end end
I looked up a wait command for lua but nothing works. I can’t code in lua myself but i can understand it. I learned a little bit of C#, C++ and Python but just the minimum basics.
Any way to make it so it only does it once a click?