this plugin i got from a man so long ago that he doesnt play steam anymore and it stopped working and dont know why.
we had it so it would play a laugh sound when you die but now it just prints error to the console saying.. Failed to load sound "laugh.wav", file probably missing from disk/repository even though the file is there in the right directory on both server and client computer.. can someone please help as to why this isn't working?
Code:
#pragma semicolon 1
#include <sourcemod>
#include <sdktools>
#define PLUGIN_NAME ""
#define PLUGIN_AUTHOR ""
#define PLUGIN_VERSION "1.0"
#define PLUGIN_CONTACT "http://forums.alliedmods.net"
#define PLUGIN_DESCRIPTION ""
#define DIE_LAUGH "laugh.wav"
#define DIE_LAUGH_PATH "sound/laugh/laugh.wav"
public Plugin:myinfo = {
name = PLUGIN_NAME,
author = PLUGIN_AUTHOR,
description = PLUGIN_DESCRIPTION,
version = PLUGIN_VERSION,
url = PLUGIN_CONTACT
};
public OnPluginStart()
{
CreateConVar("laugh_version", PLUGIN_VERSION, "[TF2] laugh version", FCVAR_REPLICATED|FCVAR_NOTIFY | FCVAR_PLUGIN | FCVAR_SPONLY);
//Translations file...
LoadTranslations("common.phrases");
/************************
* Event & Entity Hooks *
************************/
AddNormalSoundHook(SoundHook);
}
public Action:SoundHook(clients[64], &numClients, String:sample[PLATFORM_MAX_PATH], &entity, &channel, &Float:volume, &level, &pitch, &flags)
{
if (StrContains(sample, "death", false) != -1)
{
strcopy(sample, sizeof(sample), DIE_LAUGH);
return Plugin_Changed;
}
return Plugin_Continue;
}
public OnMapStart()
{
if (FileExists(DIE_LAUGH_PATH))
{
PrecacheSound(DIE_LAUGH, true);
AddFileToDownloadsTable(DIE_LAUGH_PATH);
}
}
__________________