From 895136bc726a45e6c8ee5b0d41e90f898077a8fe Mon Sep 17 00:00:00 2001 From: kookroach <62265045+kookroach@users.noreply.github.com> Date: Sat, 3 Apr 2021 19:46:56 +0200 Subject: [PATCH 1/3] Fix I O M --- ReallifeGamemode.Client/Gui/playerlist.ts | 4 +++- ReallifeGamemode.Client/inventory/inventory.ts | 6 +++++- ReallifeGamemode.Client/util/attachmentMngr.ts | 11 ++--------- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/ReallifeGamemode.Client/Gui/playerlist.ts b/ReallifeGamemode.Client/Gui/playerlist.ts index 454b0df0..aabc8714 100644 --- a/ReallifeGamemode.Client/Gui/playerlist.ts +++ b/ReallifeGamemode.Client/Gui/playerlist.ts @@ -15,11 +15,13 @@ export default function playerList(globalData: IGlobalData): void { playerlistBrowser.destroy(); playerlistBrowser = null; globalData.InInput = false; + globalData.InMenu = false; mp.gui.cursor.show(false, false); mp.gui.chat.activate(true); } - else if (!globalData.InInput) { + else if (!globalData.InMenu) { globalData.InInput = true; + globalData.InMenu = true; playerlistBrowser = mp.browsers.new('package://assets/html/Playerlist/Tabliste.html'); mp.gui.chat.activate(false); mp.gui.cursor.show(true, true); diff --git a/ReallifeGamemode.Client/inventory/inventory.ts b/ReallifeGamemode.Client/inventory/inventory.ts index 5b47fcb2..af7b28d7 100644 --- a/ReallifeGamemode.Client/inventory/inventory.ts +++ b/ReallifeGamemode.Client/inventory/inventory.ts @@ -16,12 +16,14 @@ invBrowser.destroy() invBrowser = null; globalData.InInput = false; + globalData.InMenu = false; loaded = false; mp.gui.cursor.show(false, false); return; } - if (!globalData.InInput) { + if (!globalData.InMenu) { globalData.InInput = true; + globalData.InMenu = true; mp.gui.cursor.show(true, true); itemArr = []; vehItemArr = []; @@ -37,6 +39,7 @@ mp.events.add('openInventory', () => { globalData.InInput = true; + globalData.InMenu = true; mp.gui.cursor.show(true, true); itemArr = []; vehItemArr = []; @@ -46,6 +49,7 @@ invBrowser.destroy() invBrowser = null; globalData.InInput = false; + globalData.InMenu = false; loaded = false; mp.gui.cursor.show(false, false); return; diff --git a/ReallifeGamemode.Client/util/attachmentMngr.ts b/ReallifeGamemode.Client/util/attachmentMngr.ts index 60ba0235..1cc1579f 100644 --- a/ReallifeGamemode.Client/util/attachmentMngr.ts +++ b/ReallifeGamemode.Client/util/attachmentMngr.ts @@ -32,13 +32,7 @@ export default function attachmentManager(game: IGame) { } else if (entityRage.type === "vehicle") { var vehicle = game.vehicles.at(entityRage.remoteId); entity = vehicle; - var realName = mp.game.ui.getLabelText(mp.game.vehicle.getDisplayNameFromVehicleModel(entityRage.model)); - } else if (entityRage.type === "object") { - return; - } - - - + } let e = game.attachments.get(entity); @@ -65,7 +59,7 @@ export default function attachmentManager(game: IGame) { rotation: attInfo.rotation }; - game.objects.setData(rageObject, attachmentData); // hier hakt es mein freund + game.objects.setData(rageObject, attachmentData); let object = game.objects.at(rageObject.remoteId); @@ -264,7 +258,6 @@ export default function attachmentManager(game: IGame) { if (e != null) { if (e.__attachmentObjects) { - //game.wait(2500); attachmentMngr.shutdownFor(entityRage); } } From 8abec2866aa0ef0df07da70d17cc38376912c76c Mon Sep 17 00:00:00 2001 From: VegaZ Date: Sat, 3 Apr 2021 20:04:23 +0200 Subject: [PATCH 2/3] Fix EInzahlen Minusbetrag --- ReallifeGamemode.Server/Managers/ATMManager.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ReallifeGamemode.Server/Managers/ATMManager.cs b/ReallifeGamemode.Server/Managers/ATMManager.cs index 927fc88e..2fab284c 100644 --- a/ReallifeGamemode.Server/Managers/ATMManager.cs +++ b/ReallifeGamemode.Server/Managers/ATMManager.cs @@ -112,7 +112,11 @@ namespace ReallifeGamemode.Server.Managers //client.TriggerEvent("SERVER:WORLD_INTERACTION:ATM_ERROR", 0, checkATM.Balance); client.SendNotification("~r~Nicht genügend Geld auf der Hand!"); } - else + else if(inputField1 < 0) + { + client.SendNotification("~r~Ungültiger Betrag!"); + } + else { var updateBankMoneyIn = user.BankAccount; var updateATMBalanceIn = dbContext.ATMs.FirstOrDefault(a => a.Id == nearATM); From ee305b78ec7636648696968d4dd852e370ef067c Mon Sep 17 00:00:00 2001 From: hydrant Date: Sat, 3 Apr 2021 20:08:39 +0200 Subject: [PATCH 3/3] Revert "Fix I O M" This reverts commit 895136bc726a45e6c8ee5b0d41e90f898077a8fe --- ReallifeGamemode.Client/Gui/playerlist.ts | 4 +--- ReallifeGamemode.Client/inventory/inventory.ts | 6 +----- ReallifeGamemode.Client/util/attachmentMngr.ts | 11 +++++++++-- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/ReallifeGamemode.Client/Gui/playerlist.ts b/ReallifeGamemode.Client/Gui/playerlist.ts index aabc8714..454b0df0 100644 --- a/ReallifeGamemode.Client/Gui/playerlist.ts +++ b/ReallifeGamemode.Client/Gui/playerlist.ts @@ -15,13 +15,11 @@ export default function playerList(globalData: IGlobalData): void { playerlistBrowser.destroy(); playerlistBrowser = null; globalData.InInput = false; - globalData.InMenu = false; mp.gui.cursor.show(false, false); mp.gui.chat.activate(true); } - else if (!globalData.InMenu) { + else if (!globalData.InInput) { globalData.InInput = true; - globalData.InMenu = true; playerlistBrowser = mp.browsers.new('package://assets/html/Playerlist/Tabliste.html'); mp.gui.chat.activate(false); mp.gui.cursor.show(true, true); diff --git a/ReallifeGamemode.Client/inventory/inventory.ts b/ReallifeGamemode.Client/inventory/inventory.ts index af7b28d7..5b47fcb2 100644 --- a/ReallifeGamemode.Client/inventory/inventory.ts +++ b/ReallifeGamemode.Client/inventory/inventory.ts @@ -16,14 +16,12 @@ invBrowser.destroy() invBrowser = null; globalData.InInput = false; - globalData.InMenu = false; loaded = false; mp.gui.cursor.show(false, false); return; } - if (!globalData.InMenu) { + if (!globalData.InInput) { globalData.InInput = true; - globalData.InMenu = true; mp.gui.cursor.show(true, true); itemArr = []; vehItemArr = []; @@ -39,7 +37,6 @@ mp.events.add('openInventory', () => { globalData.InInput = true; - globalData.InMenu = true; mp.gui.cursor.show(true, true); itemArr = []; vehItemArr = []; @@ -49,7 +46,6 @@ invBrowser.destroy() invBrowser = null; globalData.InInput = false; - globalData.InMenu = false; loaded = false; mp.gui.cursor.show(false, false); return; diff --git a/ReallifeGamemode.Client/util/attachmentMngr.ts b/ReallifeGamemode.Client/util/attachmentMngr.ts index 1cc1579f..60ba0235 100644 --- a/ReallifeGamemode.Client/util/attachmentMngr.ts +++ b/ReallifeGamemode.Client/util/attachmentMngr.ts @@ -32,7 +32,13 @@ export default function attachmentManager(game: IGame) { } else if (entityRage.type === "vehicle") { var vehicle = game.vehicles.at(entityRage.remoteId); entity = vehicle; - } + var realName = mp.game.ui.getLabelText(mp.game.vehicle.getDisplayNameFromVehicleModel(entityRage.model)); + } else if (entityRage.type === "object") { + return; + } + + + let e = game.attachments.get(entity); @@ -59,7 +65,7 @@ export default function attachmentManager(game: IGame) { rotation: attInfo.rotation }; - game.objects.setData(rageObject, attachmentData); + game.objects.setData(rageObject, attachmentData); // hier hakt es mein freund let object = game.objects.at(rageObject.remoteId); @@ -258,6 +264,7 @@ export default function attachmentManager(game: IGame) { if (e != null) { if (e.__attachmentObjects) { + //game.wait(2500); attachmentMngr.shutdownFor(entityRage); } }