NoDM: Nicht für Leude mit Wanteds
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { isInAnyNoDMPolygon, listNoDMZones } from "../Player/nodm";
|
||||
import polygons from "../polygons";
|
||||
import { getWantedCount } from "../Gui/wanteds";
|
||||
|
||||
|
||||
function isTargetInPolygon(pos): boolean {
|
||||
@@ -25,8 +26,8 @@ export default function weapondamageUtil() {
|
||||
player.setSuffersCriticalHits(false);
|
||||
});
|
||||
|
||||
mp.events.add('outgoingDamage', (sourceEntity, targetEntity, sourcePlayer, weapon, boneIndex, damage) => {
|
||||
if (isTargetInPolygon(targetEntity.position) || isInAnyNoDMPolygon) {
|
||||
mp.events.add(RageEnums.EventKey.INCOMING_DAMAGE, (sourceEntity: EntityMp, sourcePlayer: PlayerMp, targetEntity: EntityMp, weapon: number, boneIndex: number, damage: number) => {
|
||||
if ((isTargetInPolygon(sourceEntity.position) || isInAnyNoDMPolygon) && getWantedCount() === 0) {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user