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?