I couldn't get it to fire either using the code below. I was on koth_lakeside_event, spawned all bosses and skeletons using bossspawns.
Hook Events not working: "halloween_skeleton_killed" and "halloween_boss_killed"
Hook Event working: "escaped_loot_island"
PHP Code:
#pragma semicolon 1
public Plugin:myinfo = {
name = "Test of Skeleton Death",
author = "PC Gamer",
description = "Tests the firing of events",
version = "1.0",
url = "http://www.sourcemod.net"
};
public OnPluginStart()
{
HookEvent("halloween_skeleton_killed", OnSkeletonDeath, EventHookMode_Post);
HookEvent("halloween_boss_killed", OnBossDeath, EventHookMode_Post);
HookEvent("escaped_loot_island", OnEscapeIsland, EventHookMode_Post);
}
public OnMapEnd()
{
UnhookEvent("halloween_skeleton_killed", OnSkeletonDeath);
UnhookEvent("halloween_boss_killed", OnBossDeath);
UnhookEvent("escaped_loot_island", OnEscapeIsland);
}
public Action:OnSkeletonDeath(Handle:event, const String:name[], bool:dontBroadcast)
{
new client = GetClientOfUserId(GetEventInt(event,"player"));
PrintToChatAll("Event Fired: halloween_skeleton_killed");
PrintToChatAll("Event Notice: Skeleton was killed by %N", client);
PrintToServer("Event Notice: Skeleton was killed by %N", client);
}
public Action:OnBossDeath(Handle:event, const String:name[], bool:dontBroadcast)
{
new client = GetClientOfUserId(GetEventInt(event,"killer"));
int bosstype = GetEventInt(event,"boss");
PrintToChatAll("Event Fired: halloween_boss_killed");
PrintToChatAll("Event Notice: Boss Type: %i was killed by %N", bosstype, client);
PrintToServer("Event Notice: Boss Type: %i was killed by %N", bosstype,client);
}
public Action:OnEscapeIsland(Handle:event, const String:name[], bool:dontBroadcast)
{
new client = GetClientOfUserId(GetEventInt(event,"player"));
PrintToChatAll("Event Fired: escaped_loot_island");
PrintToChatAll("Event Notice: %N Escaped Loot Island", client);
PrintToServer("Event Notice: %N Escaped Loot Island", client);
}