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

Emit sound with exclusion


Post New Thread Reply   
 
Thread Tools Display Modes
baneado
Veteran Member
Join Date: Dec 2012
Location: amxmodx-es.com
Old 06-22-2017 , 16:02   Re: Emit sound with exclusion
Reply With Quote #11

Better register message SendAudio. Try It, should work
baneado is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 06-22-2017 , 16:07   Re: Emit sound with exclusion
Reply With Quote #12

Something similar:

PHP Code:
emit_sound(idCHAN_ITEM"buttons/bell1.wav"VOL_NORMATTN_NORM0PITCH_NORM)

new 
iPlayers[32], iNum
get_players
(iPlayersiNum)
for(new 
iPlayeri;iNum;i++)
{
    
iPlayer iPlayers[i]
    
    if(~
get_user_flags(iPlayer) & ADMIN_LEVEL_H)
    {
        
client_cmd(iPlayer"stopsound")
    }

__________________
• 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 , 16:27   Re: Emit sound with exclusion
Reply With Quote #13

Quote:
Originally Posted by EFFx View Post
Maybe you can use mp3 stop or stopsound if X player ain't able to hear the sound after use the emit_sound().
I'm trying to block the specific emit_sound for one player, not disable all sounds when the sound is emitted, this can be greatly abused since the sound is created a lot of times.

Quote:
Originally Posted by baneado View Post
Better register message SendAudio. Try It, should work
The sound I have emitted doesn't trigger this message. It's the +use sound if it helps.

Last edited by eyal282; 06-22-2017 at 16:44.
eyal282 is offline
PRoSToTeM@
Veteran Member
Join Date: Jan 2010
Location: Russia, Ivanovo
Old 06-22-2017 , 17:07   Re: Emit sound with exclusion
Reply With Quote #14

Quote:
Originally Posted by eyal282 View Post
It's the +use sound if it helps.
Why do you need to block it for the specific player?
__________________
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 , 18:09   Re: Emit sound with exclusion
Reply With Quote #15

Quote:
Originally Posted by EFFx View Post
Something similar:

PHP Code:
emit_sound(idCHAN_ITEM"buttons/bell1.wav"VOL_NORMATTN_NORM0PITCH_NORM)

new 
iPlayers[32], iNum
get_players
(iPlayersiNum)
for(new 
iPlayeri;iNum;i++)
{
    
iPlayer iPlayers[i]
    
    if(~
get_user_flags(iPlayer) & ADMIN_LEVEL_H)
    {
        
client_cmd(iPlayer"stopsound")
    }

This not is a good way, use SND_STOP instead.

Code:
Sound behavior constants #define SND_SPAWNING        (1<<8)      // we're spawing, used in some cases for ambients #define SND_STOP            (1<<5)      // stop sound #define SND_CHANGE_VOL      (1<<6)      // change sound vol #define SND_CHANGE_PITCH    (1<<7)      // change sound pitch

Code:
Example: emit_sound(id, channel, sound, VOL_NORM, ATTN_NORM, SND_STOP, PITCH_NORM)

I think this way will stop the channel of the sound, not the sound directly.
__________________









Last edited by CrazY.; 06-22-2017 at 18:10.
CrazY. is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 06-22-2017 , 18:29   Re: Emit sound with exclusion
Reply With Quote #16

Quote:
Originally Posted by EFFx View Post
Something similar:
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
kristi
Senior Member
Join Date: Nov 2016
Old 06-22-2017 , 20:13   Re: Emit sound with exclusion
Reply With Quote #17

https://forums.alliedmods.net/showthread.php?t=238457
kristi is offline
Send a message via Skype™ to kristi
SpannerSpammer
Member
Join Date: Mar 2006
Old 06-23-2017 , 04:05   Re: Emit sound with exclusion
Reply With Quote #18

1. Hook EmitSound.
2. Copy name of sound file you want to mask.
3. Use get_players() for valid list of HUMAN players (no bots or HLTV).
4. Use client_cmd and exec the play command with the recorded
sound name to only the players you want (All this from inside your hook function).
5. Block EmitSound function.
__________________
[NeoTF|DEV]SpannerSpammer-[AoE]-
NeoTF Development Team.
http://steamcommunity.com/groups/neotf

Last edited by SpannerSpammer; 06-23-2017 at 04:07.
SpannerSpammer is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 06-23-2017 , 04:39   Re: Emit sound with exclusion
Reply With Quote #19

Quote:
Originally Posted by SpannerSpammer View Post
1. Hook EmitSound.
2. Copy name of sound file you want to mask.
3. Use get_players() for valid list of HUMAN players (no bots or HLTV).
4. Use client_cmd and exec the play command with the recorded
sound name to only the players you want (All this from inside your hook function).
5. Block EmitSound function.
Play has a different sound, it's the pitch or something.
eyal282 is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 06-23-2017 , 05:11   Re: Emit sound with exclusion
Reply With Quote #20

Quote:
Originally Posted by SpannerSpammer View Post
1. Hook EmitSound.
2. Copy name of sound file you want to mask.
3. Use get_players() for valid list of HUMAN players (no bots or HLTV).
4. Use client_cmd and exec the play command with the recorded

sound name to only the players you want (All this from inside your hook function).
5. Block EmitSound function.
I recommend to do this...
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
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 07:28.


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