I am trying to write a basic script that will play music on a client's command. I am running into a wall because I am getting a console error `[Sound] S_StartSound(): Failed to load sound 'everything_she_wants.mp3'. File is missing from disk or is invalid.` Is anyone able to give me some insight into what I am doing wrong?
PHP Code:
public void OnPluginStart()
{
RegConsoleCmd("sm_wham", Wham, "plays Wham");
}
public void OnMapStart()
{
AddFileToDownloadsTable("sound/everything_she_wants.mp3");
PrecacheSound("everything_she_wants.mp3", true);
}
public Action Wham(int client, int args)
{
EmitSoundToClient(client, "everything_she_wants.mp3");
return Plugin_Handled;
}
My mp3 file is in my csgo_server/csgo/sound directory, I have tried everything from putting a `#` before my sound paths, changing the name of the file, putting the file in my local csgo directory; I am not getting any results. I either get the "missing file" error or my server console will say that the song file is not precached. Please if anyone can help me solve this blocker I would much appreciate it.