• Derma open many times
    3 replies, posted
hello, 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 : [lua] self.Entity:SetUseType( SIMPLE_USE ) [/lua] 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 :) [editline]03:20PM[/editline] Mine was used in a NPC, but here's the timer code: [code]if not timerforbox then timerforbox = true timer.Simple(1, function() timerforbox = false end)[/code] 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. :] [editline]03:21PM[/editline] Oh, and put the code, in the top of the function you use to call it.
nice, it work perfectly, thanks.
Credits to sintwins :]
Sorry, you need to Log In to post a reply to this thread.