+/- Command
Is it normal that when I create a command, for example +ultimate/-ultimate, the -ultimate command is being executed constantly? I tried it with a print and it is being executed several times
|
Re: +/- Command
What game are you playing? I just tested in Day of Defeat and it works as expected (the + command executes when I press the button and the - command executes when I release the button).
Did you properly bind your key and properly code your plugin? Write a test plugin like I did and make sure it works there to either rule in our out your primary plugin. |
Re: +/- Command
Quote:
PHP Code:
edit: is called when you open the menu with escape and close it, i dont know why, it is normal? |
Re: +/- Command
I don't play Half-Life 1 but I did get a server set up and downloaded the game and I was able to reproduce what you're talking about.
You should be able to add a workaround for this. Since you can never see the "-command" without first seeing the "+command", you can simply check in your "-command" if the "+command" was used just prior to the execution. In other words, you simply prevent multiple executions of the "-command" in a row. To do this, simply keep track of the state for each player. At the end of your "+command", set it to true. In your "-command", only execute the code if the state is true. Then unconditionally set the state back to false at the end of the "-command". |
| All times are GMT -4. The time now is 15:42. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.