AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Snippets and Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=112)
-   -   EmitSoundAny - Cross-game sound emitting (aka CS:GO compatible) (1.0.2, 2014-03-19) (https://forums.alliedmods.net/showthread.php?t=237045)

Kailo 03-10-2017 04:06

Re: EmitSoundAny - Cross-game sound emitting (aka CS:GO compatible) (1.0.2, 2014-03-1
 
Quote:

Originally Posted by DeagLe.Studio (Post 2500399)
I tested with EmitSoundToClientAny and it didnt work :/

Tested in CS:GO. Working well.
PHP Code:

//  Maxim "Kailo" Telezhenko, 2017

#pragma semicolon 1
#pragma newdecls required

#include <emitsoundany>

stock const char g_sound[] = "ui/csgo_ui_crate_open.wav";

public 
void OnPluginStart()
{
    
RegConsoleCmd("sm_emit"Cmd_Emit);
}

public 
void OnMapStart()
{
    
PrecacheSoundAny(g_sound);
}

// Usage: sm_emit <0|1|2|3>
public Action Cmd_Emit(int clientint args)
{
    if (!
args)
        return 
Plugin_Handled;

    
char arg[4];
    
GetCmdArg(1argsizeof(arg));
    switch (
StringToInt(arg)) {
        case 
0:
            
EmitSoundToClientAny(clientg_sound);
        case 
1:
            
EmitSoundToAllAny(g_sound);
        case 
2: {
            
float origin[3];
            
GetClientAbsOrigin(clientorigin);
            
EmitAmbientSoundAny(g_soundorigin);
        }
        case 
3:
            
StopSoundAny(clientSNDCHAN_AUTOg_sound);
    }

    return 
Plugin_Handled;



TheDS1337 03-14-2017 14:42

Re: EmitSoundAny - Cross-game sound emitting (aka CS:GO compatible) (1.0.2, 2014-03-1
 
Well, I forgot that I was testing in a Listen Server, maybe thats the reason its not working?

iBradleyy 03-18-2017 13:13

Re: EmitSoundAny - Cross-game sound emitting (aka CS:GO compatible) (1.0.2, 2014-03-1
 
I am guessing it doesn't support .wav files.

TheDS1337 03-18-2017 14:55

Re: EmitSoundAny - Cross-game sound emitting (aka CS:GO compatible) (1.0.2, 2014-03-1
 
Quote:

Originally Posted by iBradleyy (Post 2504626)
I am guessing it doesn't support .wav files.

They are mp3, I converted them from wav to mp3.

usla 05-31-2017 07:21

Re: EmitSoundAny - Cross-game sound emitting (aka CS:GO compatible) (1.0.2, 2014-03-1
 
did something changed in csgo with all new updates none of my sounds would precache anymore...

dyxL 06-24-2017 10:02

Re: EmitSoundAny - Cross-game sound emitting (aka CS:GO compatible) (1.0.2, 2014-03-1
 
i uploaded emitsoundany.inc to include folder but still getting cant create mixer am i should to make different thing ?

Kalle801 06-26-2017 09:37

Re: EmitSoundAny - Cross-game sound emitting (aka CS:GO compatible) (1.0.2, 2014-03-1
 
Quote:

Originally Posted by dyxL (Post 2531324)
i uploaded emitsoundany.inc to include folder but still getting cant create mixer am i should to make different thing ?

Same here

ZASTRELIS 09-02-2017 06:14

Re: EmitSoundAny - Cross-game sound emitting (aka CS:GO compatible) (1.0.2, 2014-03-1
 
how works sound dir?

doroemon 11-05-2017 05:19

Re: EmitSoundAny - Cross-game sound emitting (aka CS:GO compatible) (1.0.2, 2014-03-1
 
Does anyone work fine with this?
I using this inc to complie plugins but still getting cant create mixer.....

_GamerX 01-20-2018 07:18

Re: EmitSoundAny - Cross-game sound emitting (aka CS:GO compatible) (1.0.2, 2014-03-1
 
How to stop sound from EmitAmbientSoundAny?


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

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