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;
|
||||
if (!globalData.InMenu) {
|
||||
globalData.InMenu = true;
|
||||
globalData.BlockMovement = true;
|
||||
|
||||
skillSelect = ["Anfänger", "Fortgeschrittener", "Profi"];
|
||||
|
||||
@@ -70,7 +71,6 @@ export default function busRouteList(globalData: IGlobalData) {
|
||||
} else if (item.Text === "Abbrechen") {
|
||||
mp.events.callRemote("CLIENT:Job_StopJob");
|
||||
routeMenu.Close();
|
||||
globalData.InMenu = false;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -79,7 +79,8 @@ export default function busRouteList(globalData: IGlobalData) {
|
||||
mp.events.callRemote("CLIENT:Job_StopJob");
|
||||
}
|
||||
routeSelected = false;
|
||||
|
||||
|
||||
globalData.BlockMovement = false;
|
||||
globalData.InMenu = false;
|
||||
});
|
||||
}
|
||||
|
||||
1
ReallifeGamemode.Client/global.d.ts
vendored
1
ReallifeGamemode.Client/global.d.ts
vendored
@@ -5,6 +5,7 @@
|
||||
InChat: boolean,
|
||||
LoggedIn: boolean,
|
||||
IsAfk: boolean,
|
||||
BlockMovement: boolean;
|
||||
}
|
||||
|
||||
declare type AccountData = {
|
||||
|
||||
@@ -15,6 +15,7 @@ let globalData: IGlobalData = {
|
||||
InChat: false,
|
||||
LoggedIn: false,
|
||||
IsAfk: false,
|
||||
BlockMovement: false,
|
||||
|
||||
get InMenu(): boolean {
|
||||
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();
|
||||
export default game;
|
||||
export {
|
||||
|
||||
Reference in New Issue
Block a user