Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma semicolon 1
- #include <sourcemod>
- #define HITGROUP_HEAD 0
- #define ZC_SMOKER 1
- #define ZC_HUNTER 3
- public OnPluginStart()
- {
- HookEvent("player_hurt", Event_PlayerHurt);
- }
- public Action:Event_PlayerHurt(Handle:event, const String:name[], bool:dontBrodcast)
- {
- new client = GetClientOfUserId(GetEventInt(event, "userid"));
- new attacker = GetClientOfUserId(GetEventInt(event, "attacker"));
- new iClass = GetEntProp(client, Prop_Send, "m_zombieClass");
- new dmg = GetClientOfUserId(GetEventInt(event, "dmg_health"));
- if (attacker && attacker != client)
- {
- new hitgroup = GetEventInt(event, "hitgroup");
- if (hitgroup == HITGROUP_HEAD && iClass == ZC_SMOKER & ZC_HUNTER)
- {
- dmg *= 0.1;
- }
- }
- return Plugin_Changed;
- }
Advertisement
Add Comment
Please, Sign In to add comment