Not convinced I understood what you were asking but this should do what you want
There are also probably better ways of doing it but like I said it should work
PHP Code:
#pragma semicolon 1
#include <sourcemod>
#include <sdkhooks>
#define DMG_SLASH (1 << 2)
#define DMG_SHOCK (1 << 8)
public void OnClientPostAdminCheck(int client)
{
SDKHook(client, SDKHook_OnTakeDamage, OnTakeDamage);
}
public Action OnTakeDamage(int client, int &attacker, int &inflictor, float &damage, int &damagetype)
{
if (damagetype & DMG_SHOCK)
{
return Plugin_Handled;
}
if (damagetype & DMG_SLASH)
{
return Plugin_Handled;
}
return Plugin_Continue;
}