Big Map
This commit is contained in:
53
ReallifeGamemode.Client/Gui/bigmap.ts
Normal file
53
ReallifeGamemode.Client/Gui/bigmap.ts
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
export default function bigmap() {
|
||||||
|
var bigmap = { status: 0, timer: null };
|
||||||
|
|
||||||
|
bigmap.status = 0;
|
||||||
|
bigmap.timer = null;
|
||||||
|
|
||||||
|
mp.game.ui.setRadarZoom(1.0);
|
||||||
|
mp.game.ui.setRadarBigmapEnabled(false, false);
|
||||||
|
|
||||||
|
mp.events.add("render", () => {
|
||||||
|
mp.game.controls.disableControlAction(0, 48, true);
|
||||||
|
if (mp.game.controls.isDisabledControlJustPressed(0, 48)) {
|
||||||
|
if (bigmap.status === 0) {
|
||||||
|
mp.game.ui.setRadarZoom(0.0);
|
||||||
|
bigmap.status = 1;
|
||||||
|
|
||||||
|
bigmap.timer = setTimeout(() => {
|
||||||
|
mp.game.ui.setRadarBigmapEnabled(false, true);
|
||||||
|
mp.game.ui.setRadarZoom(1.0);
|
||||||
|
|
||||||
|
bigmap.status = 0;
|
||||||
|
bigmap.timer = null;
|
||||||
|
}, 10000);
|
||||||
|
} else if (bigmap.status === 1) {
|
||||||
|
if (bigmap.timer != null) {
|
||||||
|
clearTimeout(bigmap.timer);
|
||||||
|
bigmap.timer = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
mp.game.ui.setRadarBigmapEnabled(true, false);
|
||||||
|
mp.game.ui.setRadarZoom(0.0);
|
||||||
|
bigmap.status = 2;
|
||||||
|
|
||||||
|
bigmap.timer = setTimeout(() => {
|
||||||
|
mp.game.ui.setRadarBigmapEnabled(false, true);
|
||||||
|
mp.game.ui.setRadarZoom(1.0);
|
||||||
|
|
||||||
|
bigmap.status = 0;
|
||||||
|
bigmap.timer = null;
|
||||||
|
}, 10000);
|
||||||
|
} else {
|
||||||
|
if (bigmap.timer != null) {
|
||||||
|
clearTimeout(bigmap.timer);
|
||||||
|
bigmap.timer = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
mp.game.ui.setRadarBigmapEnabled(false, false);
|
||||||
|
mp.game.ui.setRadarZoom(1.0);
|
||||||
|
bigmap.status = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -274,6 +274,8 @@ handsup();
|
|||||||
import spawnschutz from './Player/spawnschutz';
|
import spawnschutz from './Player/spawnschutz';
|
||||||
spawnschutz();
|
spawnschutz();
|
||||||
|
|
||||||
|
import bigmap from './Gui/bigmap';
|
||||||
|
bigmap();
|
||||||
|
|
||||||
require('./Gui/policedepartment');
|
require('./Gui/policedepartment');
|
||||||
require('./Gui/helptext');
|
require('./Gui/helptext');
|
||||||
@@ -287,4 +289,4 @@ interface VehicleData {
|
|||||||
|
|
||||||
export {
|
export {
|
||||||
VehicleData
|
VehicleData
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user