busfahrer dont allow move when in route selection
This commit is contained in:
@@ -30,6 +30,7 @@ export default function busRouteList(globalData: IGlobalData) {
|
|||||||
skill = jobskill;
|
skill = jobskill;
|
||||||
if (!globalData.InMenu) {
|
if (!globalData.InMenu) {
|
||||||
globalData.InMenu = true;
|
globalData.InMenu = true;
|
||||||
|
globalData.BlockMovement = true;
|
||||||
|
|
||||||
skillSelect = ["Anfänger", "Fortgeschrittener", "Profi"];
|
skillSelect = ["Anfänger", "Fortgeschrittener", "Profi"];
|
||||||
|
|
||||||
@@ -70,7 +71,6 @@ export default function busRouteList(globalData: IGlobalData) {
|
|||||||
} else if (item.Text === "Abbrechen") {
|
} else if (item.Text === "Abbrechen") {
|
||||||
mp.events.callRemote("CLIENT:Job_StopJob");
|
mp.events.callRemote("CLIENT:Job_StopJob");
|
||||||
routeMenu.Close();
|
routeMenu.Close();
|
||||||
globalData.InMenu = false;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -80,6 +80,7 @@ export default function busRouteList(globalData: IGlobalData) {
|
|||||||
}
|
}
|
||||||
routeSelected = false;
|
routeSelected = false;
|
||||||
|
|
||||||
|
globalData.BlockMovement = false;
|
||||||
globalData.InMenu = false;
|
globalData.InMenu = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
1
ReallifeGamemode.Client/global.d.ts
vendored
1
ReallifeGamemode.Client/global.d.ts
vendored
@@ -5,6 +5,7 @@
|
|||||||
InChat: boolean,
|
InChat: boolean,
|
||||||
LoggedIn: boolean,
|
LoggedIn: boolean,
|
||||||
IsAfk: boolean,
|
IsAfk: boolean,
|
||||||
|
BlockMovement: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare type AccountData = {
|
declare type AccountData = {
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ let globalData: IGlobalData = {
|
|||||||
InChat: false,
|
InChat: false,
|
||||||
LoggedIn: false,
|
LoggedIn: false,
|
||||||
IsAfk: false,
|
IsAfk: false,
|
||||||
|
BlockMovement: false,
|
||||||
|
|
||||||
get InMenu(): boolean {
|
get InMenu(): boolean {
|
||||||
return inMenu;
|
return inMenu;
|
||||||
@@ -26,6 +27,13 @@ let globalData: IGlobalData = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
mp.events.add(RageEnums.EventKey.RENDER, (nametags) => {
|
||||||
|
if (globalData.BlockMovement) {
|
||||||
|
mp.game.controls.disableAllControlActions(0);
|
||||||
|
mp.game.controls.disableAllControlActions(27);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
const game: IGame = new RageGame();
|
const game: IGame = new RageGame();
|
||||||
export default game;
|
export default game;
|
||||||
export {
|
export {
|
||||||
|
|||||||
Reference in New Issue
Block a user