The plugin has no errors when compiling, but fails once tested. Damage doesnt change.
The plugin is to make it so stickybombs do not do damage. (for jumping im guessing)
Can you guys spot anything wrong?
Requires sdkhooks
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:sm_stopsticky_damage = INVALID_HANDLE
public OnPluginStart()
{
sm_stopsticky_damage = CreateConVar("sm_stopsticky_damage", "0", "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(sm_stopsticky_damage))
{
return Plugin_Continue;
}
decl String:sWeapon[32];
GetEdictClassname(inflictor, sWeapon, sizeof(sWeapon));
if(StrEqual(sWeapon, "tf_weapon_pipebomblauncher"))
{
damage = 0.0;
return Plugin_Changed;
}
return Plugin_Continue;
}