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

Solved disable ambience sounds


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
tarsisd2
Veteran Member
Join Date: Feb 2016
Location: brazil
Old 11-18-2018 , 14:33   disable ambience sounds
Reply With Quote #1

hi guys, how can i remove ambience sounds for everyone on the server?

i use stopsound bind for myself but is annoying to use every time, i could send stopsound for everyone on logevent_round_start, but some ambience sounds starts in some map coordinates, like train and other maps, how can i disable without editing the map?

Last edited by tarsisd2; 11-18-2018 at 19:02. Reason: solved
tarsisd2 is offline
E1_531G
Senior Member
Join Date: Dec 2017
Old 11-18-2018 , 15:07   Re: disable ambience sounds
Reply With Quote #2

Delete all ambient_generic entities from the map.
__________________
My English is A0
E1_531G is offline
tarsisd2
Veteran Member
Join Date: Feb 2016
Location: brazil
Old 11-18-2018 , 15:09   Re: disable ambience sounds
Reply With Quote #3

Quote:
Originally Posted by E1_531G View Post
Delete all ambient_generic entities from the map.
could i use a plugin to disable those entities from the maps instead of editing every single map?
tarsisd2 is offline
E1_531G
Senior Member
Join Date: Dec 2017
Old 11-18-2018 , 16:47   Re: disable ambience sounds
Reply With Quote #4

You don't have to edit the maps. Use a plugin.
From CSDM2:
PHP Code:
stock RemoveEntityAll(name[])
{
    new 
ent engfunc(EngFunc_FindEntityByString0"classname"name)
    new 
temp
    
while (ent)
    {
        
temp engfunc(EngFunc_FindEntityByStringent"classname"name)
        
engfunc(EngFunc_RemoveEntityent)
        
ent temp
    
}

Usage:
PHP Code:
RemoveEntityAll("ambient_generic"
in plugin_cfg() (for example).
__________________
My English is A0
E1_531G is offline
tarsisd2
Veteran Member
Join Date: Feb 2016
Location: brazil
Old 11-18-2018 , 19:01   Re: disable ambience sounds
Reply With Quote #5

if anyone needs this

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

public plugin_precache( ) {
        
RegisterHamHam_Spawn"ambient_generic""CAmbientGeneric_Spawn" );
}

public 
CAmbientGeneric_Spawnent ) {
        
set_peventpev_message);
        return 
HAM_HANDLED;

tarsisd2 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:42.


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