Raised This Month: $64 Target: $400
 16% 

Solved Problem with AddNormalSoundHook


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ShadowMarioBR
Member
Join Date: Feb 2018
Old 11-09-2018 , 17:17   Problem with AddNormalSoundHook
Reply With Quote #1

Ok, this is a weird thing that i have no idea how to fix so...
On my local match/listen server, i had no problems with my plugin and others that used "AddNormalSoundHook" hooks, but when my friend tried installing my plugin and another one called Voice Commands Pitch on his dedicated server, the Sound Hook parts weren't working, i have no idea what's happening.

Last edited by ShadowMarioBR; 11-12-2018 at 10:03. Reason: Kind of solved
ShadowMarioBR is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 11-09-2018 , 17:54   Re: Problem with AddNormalSoundHook
Reply With Quote #2

look like voicepitch change this channel SNDCHAN_VOICE from player
PHP Code:
public Action:NormalSoundHook(clients[64], &numClientsString:sSample[PLATFORM_MAX_PATH], &entity, &channel, &Float:volume, &level, &pitch, &flags)
{
    
//entity = client
    
if(channel == SNDCHAN_VOICE && entity >= && entity <= MaxClients)
    {
        if(
g_VoicePitchActive[entity])
        {
            
pitch g_VoicePitchValue[entity];
            
flags |= SND_CHANGEPITCH;
            return 
Plugin_Changed;
        }
    }
    return 
Plugin_Continue;

And your plugin play sound from channel SNDCHAN_AUTO https://sm.alliedmods.net/new-api/sdktools_sound/__raw
PHP Code:
EmitSoundToAll(danceMusicclient_____clientposition); 
So game decide for now to choose VOICE channel when it is set to AUTO setting.


*Just guessing
__________________

Last edited by Bacardi; 11-09-2018 at 17:55.
Bacardi is offline
ShadowMarioBR
Member
Join Date: Feb 2018
Old 11-10-2018 , 10:39   Re: Problem with AddNormalSoundHook
Reply With Quote #3

The problem is not on sound emitting, it's in the Sound Hook part, where i stop the character laughing sound.
ShadowMarioBR is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 11-10-2018 , 10:47   Re: Problem with AddNormalSoundHook
Reply With Quote #4

Ou you try stop 'laughing' ?

Well, you should install SRCDS through SteamCMD and run server with addons.

Because there differences between in-game server (listenserver) and dedicated server.

When player is playing in dedicated server, server can't block all sounds from player.
There are so called "client side" effects, ex. sounds, decals and so on.

*edit
After all, SourceMod not support listenserver. Use SRCDS

*edit
I go check that 'laughing' part now...

*edit
Ok, that sound could be played by server, should stop.
__________________

Last edited by Bacardi; 11-10-2018 at 11:29.
Bacardi is offline
ShadowMarioBR
Member
Join Date: Feb 2018
Old 11-10-2018 , 17:10   Re: Problem with AddNormalSoundHook
Reply With Quote #5

Sourcemod does work on Listen Server though, i could run it perfectly with -insecure on Game Launch Options, but if the "Laughing stop" part don't work, what should i do to fix it?
ShadowMarioBR is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 11-11-2018 , 16:29   Re: Problem with AddNormalSoundHook
Reply With Quote #6

Quote:
Originally Posted by ShadowMarioBR View Post
what should i do to fix it?
Run it from a proper installation of SRCDS as a dedicated server
__________________
Neuro Toxin is online now
ShadowMarioBR
Member
Join Date: Feb 2018
Old 11-12-2018 , 10:03   Re: Problem with AddNormalSoundHook
Reply With Quote #7

Ok so, i have no idea what my friend did with his server, but he somehow fixed it. This is now closed and marked as Solved.
ShadowMarioBR is offline
Reply


Thread Tools
Display Modes

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 21:40.


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