I have never written a plugin before. This is my first one. Tested, and stickies no longer do any damage. Please note that this requires SDK hooks to be compiled, found above
PHP Code:
#include <sourcemod>
#include <sdkhooks>
public Plugin:myinfo =
{
name = "Stickybomb Damage Blocker",
author = "iSimon",
description = "Stop's Demoman Stickybomb Damage",
version = "1.0.0.0",
url = "http://www.sourcemod.net/"
};
new Handle:vEnable = INVALID_HANDLE
public OnPluginStart()
{
vEnable = CreateConVar("sm_stopsticky_damage", "1", "No sticky damage")
AutoExecConfig(true, "plugin_stopsticky")
}
public OnClientPutInServer(client)
{
SDKHook(client, SDKHook_OnTakeDamage, OnTakeDamage);
}
public Action:OnTakeDamage(victim, &attacker, &inflictor, &Float:damage, &damagetype)
{
if (!GetConVarBool(vEnable))
{
return Plugin_Continue;
}
decl String:sWeapon[32];
GetEdictClassname(inflictor, sWeapon, sizeof(sWeapon));
if(StrEqual(sWeapon, "tf_projectile_pipe_remote"))
{
damage = 0.0;
return Plugin_Handled;
}
return Plugin_Continue;
}