Do spray from any weapon (CS)
Hello.
I want to do spray from any weapon. If weapon == automatic (AK47, AWP, etc.), then I can do: PHP Code:
But, how I can do same for Pistols? How I can make player shot very fast as far as it possible from Pistol? |
Re: Do spray from any weapon (CS)
client_cmd(id, "+attack") -> ExecuteHam( Ham_Weapon_PrimaryAttack , pEntity );
https://forums.alliedmods.net/showthread.php?t=138972 |
Re: Do spray from any weapon (CS)
PHP Code:
|
Re: Do spray from any weapon (CS)
Thanks. And now I need to hook moment, when player can shot from current weapon.
For execute this command (Ham_Weapon_PrimaryAttack) in this moment. UPD: Oh, ConnorMcLeod, thanks you. I will test it. |
Re: Do spray from any weapon (CS)
You can use arkshine's plugin that is handling all pistols, but take care he forgot to set the correct linux offset difference.
|
Re: Do spray from any weapon (CS)
Quote:
Another question: In function "OnCUSP_PrimaryAttack_P" can I check ammo (in magazine) of current weapon? I want check If ammo == 0, then I send "-attack", for reloading, and after reloading, send +attack for continue spraying (new magazine). Or better do it in CurWeapon? |
Re: Do spray from any weapon (CS)
I don't know, try it.
Also, client_cmd is usually a poor way for that kind of stuff, would be better to force IN_ATTACK button in CmdStart , or in PostThink. |
Re: Do spray from any weapon (CS)
Quote:
I think need to use get_pdata_int() or something like that, but question in offsets... UPD, DONE: PHP Code:
|
Re: Do spray from any weapon (CS)
Example.
PHP Code:
|
| All times are GMT -4. The time now is 10:07. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.