From 62a423cd427c83fad38c4a219ec80cd7396f7fca Mon Sep 17 00:00:00 2001 From: hydrant Date: Sun, 6 Jun 2021 15:57:14 +0200 Subject: [PATCH] HIT DAMAGE --- ReallifeGamemode.Client/util/weapondamage.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ReallifeGamemode.Client/util/weapondamage.ts b/ReallifeGamemode.Client/util/weapondamage.ts index 4790bd42..71494df6 100644 --- a/ReallifeGamemode.Client/util/weapondamage.ts +++ b/ReallifeGamemode.Client/util/weapondamage.ts @@ -14,7 +14,7 @@ function isTargetInPolygon(pos): boolean { } }); if (found) return true; - + return false; } @@ -23,7 +23,7 @@ export default function weapondamageUtil(globalData: IGlobalData) { mp.players.local.setSuffersCriticalHits(false); - + mp.players.forEachInStreamRange((player) => { player.setSuffersCriticalHits(false); @@ -47,6 +47,10 @@ export default function weapondamageUtil(globalData: IGlobalData) { if (spawnschutzEnabled && getWantedCount() === 0) { return true; } + + if (targetEntity.type === 'player') { + Hits.add(damage, targetEntity.position); + } }); mp.events.add("render", () => {