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

[CS:GO] EmitSoundToAll


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GinNNy
Senior Member
Join Date: Mar 2014
Old 06-06-2015 , 00:25   [CS:GO] EmitSoundToAll
Reply With Quote #1

I tried using EmitSoundToAll here is the code:
PHP Code:
#pragma semicolon 1

#define DEBUG

#define PLUGIN_AUTHOR "GinNNy"
#define PLUGIN_VERSION "0.00"

#include <sourcemod>
#include <cstrike>
#include <sdktools>


public Plugin myinfo 
{
    
name "Emit sound test",
    
author PLUGIN_AUTHOR,
    
description "",
    
version PLUGIN_VERSION,
    
url ""
}

public 
void OnPluginStart()
{
    
    
HookEvent("round_start",NewRoundCallBack);
    
}
public 
OnMapStart()
{
    
PrecacheSound("test/test_start.wav"true);
    
AddFileToDownloadsTable("sound/test/test_start.wav");  
}
public 
Action:NewRoundCallBack(Handle:hEvent,cons String:sConVar[],bool:bDontBroadCast)
{
    
PrintToChatAll("Round start event been called");
    
EmitSoundToAll("test/test_start.wav");

I downloaded the file by the server but the problem when round_start event been called the sound never been played am i doing something wrong there?

Last edited by GinNNy; 06-06-2015 at 00:25.
GinNNy is offline
KissLick
Veteran Member
Join Date: Nov 2012
Location: void
Old 06-06-2015 , 05:21   Re: [CS:GO] EmitSoundToAll
Reply With Quote #2

CS:GO quirks... :-/ https://wiki.alliedmods.net/Csgo_quirks#Workarounds
KissLick is offline
DabuDos
Junior Member
Join Date: Feb 2015
Location: Germany
Old 06-06-2015 , 07:24   Re: [CS:GO] EmitSoundToAll
Reply With Quote #3

From my knowledge you need to create a little timer for the RoundStart Event to play sounds.
Also take a look at the csgo quirks as KissLick said. I also would recommend you to use EmitSoundAny for csgo ;)
DabuDos 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 14:15.


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