Hi people,
Im probably missing something incredibly obvious, but I just cant get this plugin to work.
All the plugin does, is on player death play a sound file to the victim (supposed to be on sentry kills but Ive commented that out for now):
PHP Code:
#include <sourcemod>
#include <sdktools>
#include <tf2_stocks>
#define sentry_there "sound/muffin/green_scream.wav"
public Plugin:myinfo =
{
name = "",
author = "Mikey McMuffin",
description = "",
version = "0.0.1",
url = "http://www.sourcemod.net"
};
public OnPluginStart()
{
HookEvent("player_death", Event_Death);
}
public OnMapStart()
{
PrecacheSound("muffin/green_scream.wav", true);
AddFileToDownloadsTable("sound/muffin/green_scream.wav");
}
public Action:Event_Death(Handle:event, const String:name[], bool:dontBroadcast)
{
new victim = GetClientOfUserId(GetEventInt(event, "userid"));
//new customkill = GetEventInt(event, "customkill")
//if (customkill == TF_CUSTOM_PLAYER_SENTRY) {
EmitSoundToClient(victim, sentry_there);
PrintToServer("SOUND WORKING");
//}
However when it runs console is saying:
PHP Code:
SV_StartSound: sound/muffin/green_scream.wav not precached (0)
Iv'e looked through a few threads but I can't see anything wrong, the file is being downloaded and I think my PrecacheSound looks ok.
Any ideas?