FlacoBey

Untitled

Jan 5th, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.61 KB | None | 0 0
  1. #include <sourcemod>
  2. #include <sdktools>
  3.  
  4. public OnPluginStart()
  5. {
  6.     HookEvent("infected_hurt", _DM_InfectedHurt_Event);
  7. }
  8.  
  9. public Action:_DM_InfectedHurt_Event(Handle:event, const String:name[], bool:dontBroadcast)
  10. {
  11.     new dmg_health = GetEventInt(event,"amount");
  12.     new entity = GetEventInt(event, "entityid");
  13.     new damagetype = GetEventInt(event, "type");
  14.     new eventhealth = GetEntProp(entity, Prop_Data, "m_iHealth");
  15.     new client = GetClientOfUserId(GetEventInt(event,"attacker"));
  16.    
  17.     if(damagetype == 128)
  18.     {
  19.         SetEventInt(event, "amount", 0);
  20.         SetEntProp(entity, Prop_Data, "m_iHealth", 100);
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment