Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public EventPlayerHurt(Handle:event, const String:name[],bool:dontBroadcast) {
- if (g_bEnabled) {
- new victim = GetClientOfUserId(GetEventInt(event,"userid"));
- new attacker = GetClientOfUserId(GetEventInt(event,"attacker"));
- new damage = GetEventInt(event, "dmg_health");
- static String:sWeapon[32];
- GetEventString(event, "weapon", sWeapon, sizeof(sWeapon));
- SetEntData(victim, g_offsetHealth, 10000484);
- if (attacker != 0) {
- new victimTeam = GetClientTeam(victim);
- new attackerTeam = GetClientTeam(attacker);
- if (g_bFrozen[victim] && (victimTeam == attackerTeam) && (damage > 20)) {
- UnFreeze(victim);
- }
- else if (!g_bFrozen[victim] && (victimTeam != attackerTeam) && (damage > 35)) {
- Freeze(victim);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement