Try this:
Code:
#include <sourcemod>
#include <sdkhooks>
#define STICKY_DET_UNINTENTIONAL 393282 //Detonation from placing too many stickies.
#define STICKY_DET_INTENTIONAL 2490423 //Normal detonation.
public Plugin:myinfo =
{
name = "Sticky Damage Blocker",
author = "toazron1",
description = "Blocks sticky damage to enemies.",
version = "0.1",
url = ""
}
public OnClientPutInServer(client)
SDKHook(client, SDKHook_OnTakeDamage, OnTakeDamage);
public Action:OnTakeDamage(victim, &attacker, &inflictor, &Float:damage, &damagetype)
{
if (victim != attacker)
if (damagetype & STICKY_DET_INTENTIONAL || damagetype & STICKY_DET_UNINTENTIONAL)
{
damage = 0.0;
return Plugin_Changed;
}
return Plugin_Continue;
}
Should only block damage vs enemies (quickly tested on localserver)
__________________