hydrant (dumm)kopfentwickler
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* @overview Life of German Reallife - Gui Infobox infobox.js
|
||||
* @author VegaZ
|
||||
* @copyright (c) 2008 - 2018 Life of German
|
||||
*/
|
||||
* @overview Life of German Reallife - Gui Infobox infobox.js
|
||||
* @author VegaZ
|
||||
* @copyright (c) 2008 - 2018 Life of German
|
||||
*/
|
||||
|
||||
import moneyFormat from "../moneyformat";
|
||||
|
||||
@@ -16,6 +16,7 @@ export default function (globalData: IGlobalData): void {
|
||||
var adutyMode = false;
|
||||
var adminUnshow = false;
|
||||
var adminTSupport = false;
|
||||
var noDmZone = false;
|
||||
var dutyMode = false;
|
||||
let jailTime = 0;
|
||||
let att_score = 0;
|
||||
@@ -84,6 +85,10 @@ export default function (globalData: IGlobalData): void {
|
||||
blackScreenMode = toggle;
|
||||
});
|
||||
|
||||
mp.events.add("toggleNoDmZone", (toggle) => {
|
||||
noDmZone = toggle;
|
||||
});
|
||||
|
||||
mp.events.add("jailTime", (time) => {
|
||||
jailTime = JSON.parse(time);
|
||||
});
|
||||
@@ -345,6 +350,17 @@ export default function (globalData: IGlobalData): void {
|
||||
})
|
||||
}
|
||||
|
||||
if (noDmZone) {
|
||||
mp.game.graphics.drawText("~r~NoDM Zone", [0.907, 0.741],
|
||||
{
|
||||
font: 4,
|
||||
color: [255, 255, 255, 255],
|
||||
scale: [0.8, 0.8],
|
||||
outline: true,
|
||||
centre: false
|
||||
})
|
||||
}
|
||||
|
||||
if (countdown > 0) {
|
||||
var now = Date.now();
|
||||
var diff = Math.trunc((now - cdTimestamp) / 1000);
|
||||
@@ -367,4 +383,4 @@ export default function (globalData: IGlobalData): void {
|
||||
mp.game.graphics.drawRect(0, 0, 10000, 100000, 0, 0, 0, 255);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
22
ReallifeGamemode.Client/Player/position.ts
Normal file
22
ReallifeGamemode.Client/Player/position.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
export function isPlayerInNoDMZone(pos) {
|
||||
if (pos.x >= -540 && pos.x <= -531
|
||||
&& pos.y >= -2151 && pos.y <= -2139) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
export default function positionHandler() {
|
||||
|
||||
mp.events.add("checkPosition", (targetEntity) => {
|
||||
|
||||
if (isPlayerInNoDMZone(mp.players.local.position) || isPlayerInNoDMZone(targetEntity.position)) {
|
||||
mp.gui.chat.push("Kein DM in NODM!");
|
||||
}
|
||||
});
|
||||
|
||||
setInterval(() => {
|
||||
mp.events.call('toggleNoDmZone', isPlayerInNoDMZone(mp.players.local.position));
|
||||
}, 200);
|
||||
}
|
||||
@@ -186,6 +186,9 @@ ped();
|
||||
import reportList from './Player/reportmenu';
|
||||
reportList(globalData);
|
||||
|
||||
import positionHandler from './Player/position';
|
||||
positionHandler();
|
||||
|
||||
import checkpointHandle from './util/checkpoint';
|
||||
checkpointHandle(globalData);
|
||||
|
||||
@@ -265,9 +268,6 @@ antiAfk(globalData);
|
||||
import ammunation from './Interaction/ammunation/ammunation';
|
||||
ammunation(globalData);
|
||||
|
||||
import handsup from './Player/handsup';
|
||||
handsup();
|
||||
|
||||
require('./Gui/policedepartment');
|
||||
require('./Gui/helptext');
|
||||
require('./admin/spectate');
|
||||
|
||||
Reference in New Issue
Block a user