AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to Block the weapon's fire sound ? (https://forums.alliedmods.net/showthread.php?t=154979)

dias 04-16-2011 04:44

How to Block the weapon's fire sound ?
 
How to block the weapon's fire sound ?. make a example code please...:)

Arkshine 04-16-2011 05:00

Re: How to Block the weapon's fire sound ?
 
Just the sound, or the whole weapon (including animation, etc..) ?

dias 04-16-2011 05:01

Re: How to Block the weapon's fire sound ?
 
Just the sound :D
I was using "Ham_Weapon_PlayEmptySound". But it didn't work with me

P/S: and block the weapon animation

Arkshine 04-16-2011 05:11

Re: How to Block the weapon's fire sound ?
 
If sound + animation = blocking the whole weapon.

See the offset m_flNextPrimaryAttack, m_flNextSecondaryAttack, m_flNextAttack.

Just a fast example :

Code:
setNextAttack( const weapon, const player, const Float:nextTime ) {     const m_flNextPrimaryAttack   = 46; // weapon     const m_flNextSecondaryAttack = 47; // weapon     const m_flNextAttack          = 83; // player     const LinuxPlayerExtraOfs     = 4;     set_pdata_float( weapon, m_flNextPrimaryAttack  , nextTime, LinuxWeaponExtraOfs );     set_pdata_float( weapon, m_flNextSecondaryAttack, nextTime, LinuxWeaponExtraOfs );     set_pdata_float( player, m_flNextAttack, nextTime, LinuxPlayerExtraOfs ); }

dias 04-16-2011 05:32

Re: How to Block the weapon's fire sound ?
 
How does it work ?

Arkshine 04-16-2011 05:46

Re: How to Block the weapon's fire sound ?
 
weapon = weapon index
player = player index
nextTime = the next time you can fire. To block enough, just put a number like 9999.0.

dias 04-16-2011 05:49

Re: How to Block the weapon's fire sound ?
 
What about block only fire sound ?. Where did you find the Offset ?

Arkshine 04-16-2011 05:52

Re: How to Block the weapon's fire sound ?
 
You want to do what exactly ?

dias 04-16-2011 06:05

Re: How to Block the weapon's fire sound ?
 
Just Block The Weapon Fire Sound :|

Arkshine 04-16-2011 06:07

Re: How to Block the weapon's fire sound ?
 
So why "P/S: and block the weapon animation".

I mean, you want to create a new weapon ? Altering existing CS weapon ?


All times are GMT -4. The time now is 20:13.

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