Take Player +attack
Hi, i wanted to know how to hook player primary attack,first of all, discard the ham forward, because it only runs when it fires itself, when you do something else it doesn't run, I just want to get if the player is pressing the primary attack, second, I read somewhere that CMD_Start is very bad for the CPU, so what options do I have to get it?( register_clcmd( "+attack", is blocked or something by the way )
|
Re: Take Player +attack
Hi. There are IN_ATTACK and IN_ATTACK2 flags.
PHP Code:
|
Re: Take Player +attack
Quote:
PreThink is more effective than cmd start? i mean for the cpu PHP Code:
|
Re: Take Player +attack
I have no idea which method is better, but you may try both. I would recommend to count how many times a method is called.
PHP Code:
PS: try to avoid nested "if" whenever possible. |
Re: Take Player +attack
Use cmd start its much better because its called when a player uses a key or hold a key.
|
Re: Take Player +attack
Quote:
https://forums.alliedmods.net/showpo...03&postcount=5 |
Re: Take Player +attack
Quote:
|
Re: Take Player +attack
Quote:
|
Re: Take Player +attack
this ?:
PHP Code:
|
Re: Take Player +attack
Quote:
|
| All times are GMT -4. The time now is 15:40. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.