Raised This Month: $ Target: $400
 0% 

How to Block the weapon's fire sound ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
dias
BANNED
Join Date: Jul 2009
Location: South Vietnam
Old 04-16-2011 , 04:44   How to Block the weapon's fire sound ?
Reply With Quote #1

How to block the weapon's fire sound ?. make a example code please...
dias is offline
Send a message via Yahoo to dias Send a message via Skype™ to dias
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-16-2011 , 05:00   Re: How to Block the weapon's fire sound ?
Reply With Quote #2

Just the sound, or the whole weapon (including animation, etc..) ?
__________________
Arkshine is offline
dias
BANNED
Join Date: Jul 2009
Location: South Vietnam
Old 04-16-2011 , 05:01   Re: How to Block the weapon's fire sound ?
Reply With Quote #3

Just the sound
I was using "Ham_Weapon_PlayEmptySound". But it didn't work with me

P/S: and block the weapon animation
dias is offline
Send a message via Yahoo to dias Send a message via Skype™ to dias
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-16-2011 , 05:11   Re: How to Block the weapon's fire sound ?
Reply With Quote #4

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 ); }
__________________
Arkshine is offline
dias
BANNED
Join Date: Jul 2009
Location: South Vietnam
Old 04-16-2011 , 05:32   Re: How to Block the weapon's fire sound ?
Reply With Quote #5

How does it work ?

Last edited by dias; 04-16-2011 at 05:50.
dias is offline
Send a message via Yahoo to dias Send a message via Skype™ to dias
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-16-2011 , 05:46   Re: How to Block the weapon's fire sound ?
Reply With Quote #6

weapon = weapon index
player = player index
nextTime = the next time you can fire. To block enough, just put a number like 9999.0.
__________________
Arkshine is offline
dias
BANNED
Join Date: Jul 2009
Location: South Vietnam
Old 04-16-2011 , 05:49   Re: How to Block the weapon's fire sound ?
Reply With Quote #7

What about block only fire sound ?. Where did you find the Offset ?
dias is offline
Send a message via Yahoo to dias Send a message via Skype™ to dias
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-16-2011 , 05:52   Re: How to Block the weapon's fire sound ?
Reply With Quote #8

You want to do what exactly ?
__________________
Arkshine is offline
dias
BANNED
Join Date: Jul 2009
Location: South Vietnam
Old 04-16-2011 , 06:05   Re: How to Block the weapon's fire sound ?
Reply With Quote #9

Just Block The Weapon Fire Sound
dias is offline
Send a message via Yahoo to dias Send a message via Skype™ to dias
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-16-2011 , 06:07   Re: How to Block the weapon's fire sound ?
Reply With Quote #10

So why "P/S: and block the weapon animation".

I mean, you want to create a new weapon ? Altering existing CS weapon ?
__________________
Arkshine is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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