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

map music mod


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
vukixako
New Member
Join Date: Aug 2021
Old 08-17-2021 , 02:49   map music mod
Reply With Quote #1

Hello, only here you can find the best porn sites that give access to content for free https://freepornsites.mobi/
I'm currently using this to stop map music:
PHP Code:
#include <sourcemod>
#include <sdktools>

#pragma semicolon 1

#define PLUGIN_NAME     "Stop All Music"
#define PLUGIN_VERSION     "1.0"

public Plugin:myinfo =
{
    
name PLUGIN_NAME,
    
description "Stops ambient sounds played by the map",
    
version PLUGIN_VERSION,
};

public 
OnPluginStart()
{
    
AddAmbientSoundHook(AmbientSHook);
}



public 
Action:AmbientSHook(String:sample[PLATFORM_MAX_PATH], &entity, &Float:volume, &level, &pitchFloat:pos[3], &flags, &Float:delay)
{    
    return 
Plugin_Stop;

However, it's also stopping the sourcemod sounds like the beacon sounds. How can I fix this?

Last edited by vukixako; 12-07-2021 at 03:26.
vukixako is offline
MAGNAT2645
Senior Member
Join Date: Nov 2015
Location: AlliedMods.net
Old 08-26-2021 , 16:42   Re: map music mod
Reply With Quote #2

In the AmbientSHook you can check if the sample is the beacon sound and such, and then return Plugin_Continue;

Code:
public Action:AmbientSHook(String:sample[PLATFORM_MAX_PATH], &entity, &Float:volume, &level, &pitch, Float:pos[3], &flags, &Float:delay)
{
	if ( StrEqual( sample, "buttons/button17.wav" ) ) return Plugin_Continue;
	return Plugin_Stop;
}
But in this case the beacon sound path (from funcommands plugin) depends on SoundBlip value in gamedata/funcommands.games.txt
__________________

Last edited by MAGNAT2645; 08-26-2021 at 16:43.
MAGNAT2645 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 13:17.


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