Raised This Month: $32 Target: $400
 8% 

Solved IN_USE Spam


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 11-03-2018 , 08:58   IN_USE Spam
Reply With Quote #1

Hi,

Let's say we press IN_USE and hold it for 1 second, why does it keep triggering Ham_ObjetCaps every frame instead of once?

In my case, I have something that gets called by pressing IN_USE button, so when a player presses it a message that should be printed once gets printed like 50 times..
__________________

Last edited by edon1337; 11-03-2018 at 15:46.
edon1337 is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 11-03-2018 , 09:39   Re: IN_USE Spam
Reply With Quote #2

Then check for pev_oldbuttons. If IN_USE is not in pev_oldbuttons that means that it was just pressed in that frame and not held down before.
__________________
klippy is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 11-03-2018 , 15:46   Re: IN_USE Spam
Reply With Quote #3

Quote:
Originally Posted by KliPPy View Post
Then check for pev_oldbuttons. If IN_USE is not in pev_oldbuttons that means that it was just pressed in that frame and not held down before.
Thanks, solved.
__________________
edon1337 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 22:15.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode