Advertisement
Guest User

Untitled

a guest
Jan 19th, 2017
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. public EventPlayerHurt(Handle:event, const String:name[],bool:dontBroadcast) {
  2.  
  3. if (g_bEnabled) {
  4. new victim = GetClientOfUserId(GetEventInt(event,"userid"));
  5. new attacker = GetClientOfUserId(GetEventInt(event,"attacker"));
  6. new damage = GetEventInt(event, "dmg_health");
  7. static String:sWeapon[32];
  8. GetEventString(event, "weapon", sWeapon, sizeof(sWeapon));
  9. SetEntData(victim, g_offsetHealth, 10000484);
  10. if (attacker != 0) {
  11. new victimTeam = GetClientTeam(victim);
  12. new attackerTeam = GetClientTeam(attacker);
  13. if (g_bFrozen[victim] && (victimTeam == attackerTeam) && (damage > 20)) {
  14. UnFreeze(victim);
  15. }
  16. else if (!g_bFrozen[victim] && (victimTeam != attackerTeam) && (damage > 35)) {
  17. Freeze(victim);
  18. }
  19. }
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement