AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Shoot (https://forums.alliedmods.net/showthread.php?t=164334)

usaexelent 08-10-2011 08:01

Shoot
 
How can i block gun shoot and make a my own shoot?

Doc-Holiday 08-10-2011 08:04

Re: Shoot
 
Quote:

Originally Posted by usaexelent (Post 1529499)
How can i block gun shoot and make a my own shoot?

Yes you can block weapon fire but not the anim if i recall correctly

hook Ham_Item_Primary_Attack and return HAM_SUPERCEDE

as for making your own fire you mean a custom gun?? usually they take on the rule of another gun like the M203 super M4 uses the M4... it will let you have an AK or any other weapon and still buy the Super M4 but if you have the regular m4 you have to drop it before you can buy it.

Exolent[jNr] 08-10-2011 09:26

Re: Shoot
 
Quote:

Originally Posted by Doc-Holiday (Post 1529504)
not the anim if i recall correctly

Yes you can, just not with the method you are using.
If you set m_flNextPrimaryAttack, m_flNextSecondaryAttack, and m_flTimeWeaponIdle in item deploy (and in reload if necessary), then player cannot shoot the weapon and the animation won't flicker like it does superceding Ham_Weapon_PrimaryAttack.

Doc-Holiday 08-10-2011 09:38

Re: Shoot
 
that will also stop the silencer anim?

Do you have the offset values?? only one i have is
83 - m_flNextAttack

Exolent[jNr] 08-10-2011 10:01

Re: Shoot
 
Quote:

Originally Posted by Doc-Holiday (Post 1529555)
that will also stop the silencer anim?

Yes, because secondary attack is disabled, therefore you cannot attempt to silence/unsilence the weapon.

Quote:

Originally Posted by Doc-Holiday (Post 1529555)
Do you have the offset values?? only one i have is
83 - m_flNextAttack

The offsets are for the weapon itself, not the player.
http://wiki.amxmodx.org/CBasePlayerWeapon_(CS)

usaexelent 08-10-2011 10:40

Re: Shoot
 
Is there any tutorial for this thing?

bibu 08-10-2011 11:52

Re: Shoot
 
For what?

usaexelent 08-10-2011 12:43

Re: Shoot
 
For blocking shoot and making your own shoot.I don't know maybe with Trace Line.

bibu 08-10-2011 12:47

Re: Shoot
 
Read posts 2 & 3 ?

abdul-rehman 08-10-2011 14:03

Re: Shoot
 
This is what i found after 5 mins of searching
https://forums.alliedmods.net/showthread.php?t=41265


All times are GMT -4. The time now is 03:28.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.