nodmzone, COMMIT NUR ZUM TESTEN

This commit is contained in:
Fabian
2021-04-21 22:41:42 +02:00
parent 3edd6b5560
commit 6e1aed1926

View File

@@ -1,7 +1,8 @@
 
export function isPlayerInNoDMZone(pos) { export function isPlayerInNoDMZone(pos) {
if (pos.x >= -540 && pos.x <= -531 if (pos.x >= -540 && pos.x <= -531
&& pos.y >= -2151 && pos.y <= -2139) { && pos.y >= -2151 && pos.y <= -2139
&& pos.z >= 0 && pos.z <= 30) {
return true; return true;
} }
return false; return false;
@@ -10,7 +11,6 @@ export function isPlayerInNoDMZone(pos) {
export default function positionHandler() { export default function positionHandler() {
mp.events.add("checkPosition", (targetEntity) => { mp.events.add("checkPosition", (targetEntity) => {
if (isPlayerInNoDMZone(mp.players.local.position) || isPlayerInNoDMZone(targetEntity.position)) { if (isPlayerInNoDMZone(mp.players.local.position) || isPlayerInNoDMZone(targetEntity.position)) {
mp.gui.chat.push("Kein DM in NODM!"); mp.gui.chat.push("Kein DM in NODM!");
} }