Raised This Month: $ Target: $400
 0% 

Emit sound with exclusion


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
eyal282
Veteran Member
Join Date: Aug 2011
Old 06-22-2017 , 13:00   Emit sound with exclusion
Reply With Quote #1

Is such feature possible to perform? I would like to block a specific player from hearing a sound in emit_sound, while letting the rest hear the sound emitted.
eyal282 is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 06-22-2017 , 13:25   Re: Emit sound with exclusion
Reply With Quote #2

Register a fw_EmitSound, check the played sound, compare the player ID with would you like to block and return a FMRES_SUPERCEDE.
__________________









Last edited by CrazY.; 06-22-2017 at 13:26.
CrazY. is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 06-22-2017 , 13:32   Re: Emit sound with exclusion
Reply With Quote #3

Quote:
Originally Posted by CrazY. View Post
Register a fw_EmitSound, check the played sound, compare the player ID with would you like to block and return a FMRES_SUPERCEDE.
EmitSound is a sound emitted to all players if I'm not wrong. returning FMRES_SUPERCEDE will block the sound to all players.
eyal282 is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 06-22-2017 , 14:24   Re: Emit sound with exclusion
Reply With Quote #4

No,

Code:
public fw_EmitSound(id, channel, const sample[], Float:volume, Float:attn, flags, pitch)

First parameter is the source of the sound as an prostotema said.
__________________









Last edited by CrazY.; 06-22-2017 at 15:55.
CrazY. is offline
PRoSToTeM@
Veteran Member
Join Date: Jan 2010
Location: Russia, Ivanovo
Old 06-22-2017 , 15:10   Re: Emit sound with exclusion
Reply With Quote #5

Quote:
Originally Posted by CrazY. View Post
No,

Code:
public fw_EmitSound(id, channel, const sample[], Float:volume, Float:attn, flags, pitch)

First parameter is the player ID or any entity ID.
First parameter is the source of the sound, not the destination.
__________________
PRoSToTeM@ is offline
Send a message via ICQ to PRoSToTeM@ Send a message via Skype™ to PRoSToTeM@
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 06-22-2017 , 15:50   Re: Emit sound with exclusion
Reply With Quote #6

Quote:
Originally Posted by PRoSToTeM@ View Post
First parameter is the source of the sound, not the destination.
Mmm, my mistake.
__________________









Last edited by CrazY.; 06-22-2017 at 15:50.
CrazY. is offline
baneado
Veteran Member
Join Date: Dec 2012
Location: amxmodx-es.com
Old 06-22-2017 , 15:48   Re: Emit sound with exclusion
Reply With Quote #7

What sound do you want to block?
baneado is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 06-22-2017 , 15:52   Re: Emit sound with exclusion
Reply With Quote #8

Dudes, he just wanna use emit_sound() to emit a sound but only X player(s) can hear it.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 06-22-2017 , 15:56   Re: Emit sound with exclusion
Reply With Quote #9

Quote:
Originally Posted by EFFx View Post
Dudes, he just wanna use emit_sound() to emit a sound but only X player(s) can hear it.
Precisely.
eyal282 is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 06-22-2017 , 16:00   Re: Emit sound with exclusion
Reply With Quote #10

Maybe you can use mp3 stop or stopsound if X player ain't able to hear the sound after use the emit_sound().
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx 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 22:45.


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