How to tell if a player is holding the fire button
Hello,
I found code someone posted here for Team Fortress Classic which turned the demoman's green pipes into sticky pipes that stick to players and walls. While the feature is neat, I would like to alter it a bit so that the pipes function as they would normally unless a player presses and holds down the fire button. The idea I have is that the pipes should only stick to things if the player is still holding down the fire button when they pipe makes contact with another player or a map surface. Otherwise if the player just presses the fire button the pipe just does it's usual thing. I'm not sure how exactly to go about this though. Here's the code I found. Any help, pointers, and suggestions are much appreciated. Code:
#include <amxmodx> |
Re: How to tell if a player is holding the fire button
Forward
PHP Code:
PHP Code:
PHP Code:
|
Re: How to tell if a player is holding the fire button
Thank you so much! There's still only one problem I can think of in order to prevent it from being 'buggy' How can I be sure that the player never released the fire button?
For example, a buggy thing that I could forsee being a possible problem is, if a player presses the fire button to shoot a pipe, releases the fire button and goes to press the fire button again as the previous pipe touches another player or a surface. It seems I need a method like what you've provided but I also need to be able to check if the player ever released the fire button. |
Re: How to tell if a player is holding the fire button
Quote:
|
Re: How to tell if a player is holding the fire button
PHP Code:
PHP Code:
|
| All times are GMT -4. The time now is 17:33. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.