It's an exact copy of another plugin I have and compiled it with a different item, and it works. What am I overlooking?
PHP Code:
public event_WeaponFireAfter(Handle:event, const String:name[], bool:Broadcast)
{
// 10
new WeaponID = GetEventInt(event, "weaponid");
if(WeaponID == 9)
{
CreateMolotovHook();
}
}
CreateMolotovHook()
{
new iEntity = INVALID_ENT_REFERENCE;
while ((iEntity = FindEntityByClassname(iEntity, "molotov_projectile")) != INVALID_ENT_REFERENCE)
{
HookSingleEntityOutput(iEntity, "OnBreak", MolotovBreak, true);
HookSingleEntityOutput(iEntity, "OnIgnite", MolotovBreak);
HookSingleEntityOutput(iEntity, "OnKilled", MolotovBreak);
}
}
MolotovBreak()
{
PrintToChatAll("Molotov Hooked and Broke");
}
__________________