Raised This Month: $32 Target: $400
 8% 

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


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mewbie222
Senior Member
Join Date: May 2018
Old 10-02-2022 , 04:26   [DOD:s]Block victory playing standard sound...
Reply With Quote #1

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.

Last edited by mewbie222; 10-02-2022 at 04:33.
mewbie222 is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 10-02-2022 , 18:42   Re: [DOD:s]Block victory playing standard sound...
Reply With Quote #2

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;

__________________
Do not Private Message @me
Bacardi is offline
mewbie222
Senior Member
Join Date: May 2018
Old 10-03-2022 , 02:56   Re: [DOD:s]Block victory playing standard sound...
Reply With Quote #3

Quote:
Originally Posted by Bacardi View Post
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 ..
mewbie222 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 21:02.


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