test: nodm zone mit polygons
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { isPlayerInNoDMZone } from "../Player/nodm";
|
||||
import { isInAnyPolygon, isTargetInPolygon } from "../Player/nodm";
|
||||
import polygons from "../polygons";
|
||||
|
||||
export default function weapondamageUtil() {
|
||||
let blockInput = false;
|
||||
@@ -10,7 +11,8 @@ export default function weapondamageUtil() {
|
||||
});
|
||||
|
||||
mp.events.add('outgoingDamage', (sourceEntity, targetEntity, sourcePlayer, weapon, boneIndex, damage) => {
|
||||
if (isPlayerInNoDMZone(targetEntity.position) || isPlayerInNoDMZone(sourceEntity.position)) {
|
||||
if (isInAnyPolygon || isTargetInPolygon(targetEntity.position)) {
|
||||
mp.gui.chat.push("Kein DM in NODM");
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user