AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   [DOD:s]Block victory playing standard sound... (https://forums.alliedmods.net/showthread.php?t=339799)

mewbie222 10-02-2022 04:26

[DOD:s]Block victory playing standard sound...
 
Prohibited from playing standard music...
You can do something to prohibit the playback of any music by event or .. in this case, you are interested in the block for playing standard music at the end of the round (victory).

Game Day Of Defeat Source. I saw the implementation in this plugin https://forums.alliedmods.net/showthread.php?p=2033800 , just for DOD:s .
Well, for the sake of this, I don’t want to install the whole plugin, maybe I can implement such functionality separately ?!
ps: Maybe there is a ready-made plugin?!!!
otherwise I can’t find it, there is already one for DOD:s.

Bacardi 10-02-2022 18:42

Re: [DOD:s]Block victory playing standard sound...
 
Server send event to players
Code:

Server event "dod_broadcast_audio", Tick 12770:
- "sound" = "Game.USWin" // or "Game.GermanWin"

You can stop server broadcast event to clients
PHP Code:

public void OnPluginStart()
{
    
HookEventEx("dod_broadcast_audio"dod_broadcast_audioEventHookMode_Pre);
}

public 
Action dod_broadcast_audio(Event event, const char[] namebool dontBroadcast)
{
    
event.BroadcastDisabled true;
    return 
Plugin_Continue;



mewbie222 10-03-2022 02:56

Re: [DOD:s]Block victory playing standard sound...
 
Quote:

Originally Posted by Bacardi (Post 2790231)
Server send event to players
Code:

Server event "dod_broadcast_audio", Tick 12770:
- "sound" = "Game.USWin" // or "Game.GermanWin"

You can stop server broadcast event to clients
PHP Code:

public void OnPluginStart()
{
    
HookEventEx("dod_broadcast_audio"dod_broadcast_audioEventHookMode_Pre);
}

public 
Action dod_broadcast_audio(Event event, const char[] namebool dontBroadcast)
{
    
event.BroadcastDisabled true;
    return 
Plugin_Continue;



Thanks , it turns out there is an event for the sound, I didn’t look at something .. I thought not .. Thank you, we will know and find out what and how next .. thanks again ..


All times are GMT -4. The time now is 05:41.

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