Raised This Month: $51 Target: $400
 12% 

Block sprayer sound


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Debesėlis
Senior Member
Join Date: Aug 2008
Location: Lithuania
Old 01-11-2011 , 03:33   Block sprayer sound
Reply With Quote #1

My code doesn`t work. Any solution?

PHP Code:
StopSoundclientSNDCHAN_AUTO"player/sprayer.wav" ); 
Debesėlis is offline
Master53
Veteran Member
Join Date: Dec 2009
Old 01-11-2011 , 07:48   Re: Block sprayer sound
Reply With Quote #2

have you tryed blocking the sound from all channels?
__________________
Master(d)



Master53 is offline
Debesėlis
Senior Member
Join Date: Aug 2008
Location: Lithuania
Old 01-11-2011 , 08:56   Re: Block sprayer sound
Reply With Quote #3

No. How to?
Debesėlis is offline
Master53
Veteran Member
Join Date: Dec 2009
Old 01-11-2011 , 08:58   Re: Block sprayer sound
Reply With Quote #4

PHP Code:
//Stop Sound from all Channels:
stock StopSoundPerm(ClientString:sound[])
{

    
//Stop Sound:
    
StopSound(ClientSNDCHAN_AUTOsound);
    
StopSound(ClientSNDCHAN_WEAPONsound);
    
StopSound(ClientSNDCHAN_VOICEsound);
    
StopSound(ClientSNDCHAN_ITEMsound);
    
StopSound(ClientSNDCHAN_BODYsound);
    
StopSound(ClientSNDCHAN_STREAMsound);
    
StopSound(ClientSNDCHAN_VOICE_BASEsound);
    
StopSound(ClientSNDCHAN_USER_BASEsound);

__________________
Master(d)



Master53 is offline
Debesėlis
Senior Member
Join Date: Aug 2008
Location: Lithuania
Old 01-11-2011 , 09:50   Re: Block sprayer sound
Reply With Quote #5

noob question... How to use stock?

PHP Code:
String:sound[] 
Where i must write sound link?
Debesėlis is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 01-11-2011 , 10:16   Re: Block sprayer sound
Reply With Quote #6

u would use it like:
Code:
StopSoundPerm(Client, "player/sprayer.wav");
Mitchell is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 01-11-2011 , 10:30   Re: Block sprayer sound
Reply With Quote #7

You may want to use the SoundHook (callback: NormalSHook) and return Plugin_Stop, if the sample equals to the sprayer sound.
__________________
Peace-Maker is offline
Debesėlis
Senior Member
Join Date: Aug 2008
Location: Lithuania
Old 01-11-2011 , 11:29   Re: Block sprayer sound
Reply With Quote #8

Still with sound...

PHP Code:
StopSoundPermclient"player/sprayer.wav" );


stock StopSoundPermclientString:sound[ ] )
{
    
StopSoundclientSNDCHAN_AUTOsound );
    
StopSoundclientSNDCHAN_WEAPONsound );
    
StopSoundclientSNDCHAN_VOICEsound );
    
StopSoundclientSNDCHAN_ITEMsound );
    
StopSoundclientSNDCHAN_BODYsound);
    
StopSoundclientSNDCHAN_STREAMsound );
    
StopSoundclientSNDCHAN_VOICE_BASEsound );
    
StopSoundclientSNDCHAN_USER_BASEsound );

Debesėlis is offline
blodia
Veteran Member
Join Date: Sep 2009
Location: UK
Old 01-11-2011 , 11:51   Re: Block sprayer sound
Reply With Quote #9

your first line of code should work fine as long as you call it while the sound is playing. you're better off doing what peace-maker said though.
blodia is offline
Debesėlis
Senior Member
Join Date: Aug 2008
Location: Lithuania
Old 01-11-2011 , 11:58   Re: Block sprayer sound
Reply With Quote #10

Quote:
Originally Posted by Peace-Maker View Post
You may want to use the SoundHook (callback: NormalSHook) and return Plugin_Stop, if the sample equals to the sprayer sound.
Works with SoundHook. Thank you.
Debesėlis 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 13:18.


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