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

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


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Kailo
Senior Member
Join Date: Sep 2014
Location: Moscow, Russia
Old 03-10-2017 , 04:06   Re: EmitSoundAny - Cross-game sound emitting (aka CS:GO compatible) (1.0.2, 2014-03-1
Reply With Quote #16

Quote:
Originally Posted by DeagLe.Studio View Post
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;


Last edited by Kailo; 03-10-2017 at 04:09.
Kailo is offline
 



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 22:31.


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