Please help! I cannot get this plugin to work.
The file downloads correctly, I can join the server and it transfers the file. But when I type the sm_haha command I do not hear the file play.
When I check my sound folder it created the tchalo directory and transfered the .wav file successfully. I am able to play the .wav in a media player.
Typing: 'play tchalo/haha3.wav' in the console does not work. Failed to load file...
Any ideas?
PHP Code:
#include <sourcemod>
#include <sdktools>
#define VERSION "1.1"
#define HAHASOUND "tchalo/haha3.wav"
public Plugin:myinfo =
{
name = "L4D2 Sound Loader Test",
author = "B-man",
description = "TCHalo Servers",
version = VERSION,
url = "http://www.tchalo.com"
}
public OnPluginStart()
{
RegAdminCmd("sm_haha", playerLaugh, ADMFLAG_GENERIC, "Nelsons' Ha-ha!");
}
public OnMapStart()
{
AddFileToDownloadsTable("sound\\tchalo\\haha3.wav");
CallCacheSounds();
}
public Action:playerLaugh(client, args)
{
EmitSoundToAll(HAHASOUND);
PrintToChat(client, "Hah-ha!");
}
public CallCacheSounds()
{
PrecacheSound(HAHASOUND, false);
}