get_user_button spams
hi i put this in client_prethink
Code:
Code:
but when i use it in game it spams the client_print and it auto goes to blah2 and the only way i can make it go to blah i have to hold my use button[/small] |
If the user is holding the button, which is what u coded, it will do what is in blah...
If you do not have the button pushed in at all, it will do what is in blah2 I think you can use returns to stop the spamming. Code:
|
What do you want it to do? If I understand correctly, something like this?
Code:
Also, it's better to cache get_user_button and then use it, but I didn't do it in this. EDIT: SweatyBanana is wrong. returning PLUGIN_HANDLED will not solve it. |
Edit: ): I read that wrong. Nevermind. I thought he was simply telling us what it was going to do in the second part, heh.
|
Quote:
|
Code:
[edit] fixed |
Quote:
|
what about my else part? How would I do that?
|
else part:
Code:
[edit] fixed |
but I want it so when you press the use button once it stays in blah but when you press it again it goes to blah2 not when you release it it goes to blah2
|
| All times are GMT -4. The time now is 16:29. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.