Derma open many times

I have a little problem with a SWEP
the SWEP open a derma menu when I hit left click but the SWEP open the derma 5 or 6 times.
I fix the same problem on an entity with :
self.Entity:SetUseType( SIMPLE_USE )
is there a way to do the same with a SWEP ?

thanks in advance for your help

sintwins helped me out with this one, I had the same problem, lemme find code :slight_smile:


Mine was used in a NPC, but here’s the timer code:

if not timerforbox then
        timerforbox = true timer.Simple(1, function() timerforbox = false end)

It’s something with the Menu opening, as many times, as you hold down the E key for every frame, or something like that, so even when you click it - it opens several times. The timer prevents it from getting opened each second. :]


Oh, and put the code, in the top of the function you use to call it.

nice, it work perfectly, thanks.

Credits to sintwins :]