From c62a9a0a88a093493b784b3e4469be21cc0fb9f7 Mon Sep 17 00:00:00 2001 From: Fabian Date: Tue, 4 May 2021 17:45:28 +0200 Subject: [PATCH 01/27] beifahrer fahrer waypoint --- ReallifeGamemode.Client/util/waypoint.ts | 21 ++++++++++- ReallifeGamemode.Server/Events/Waypoint.cs | 43 ++++++++++++++++++++++ 2 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 ReallifeGamemode.Server/Events/Waypoint.cs diff --git a/ReallifeGamemode.Client/util/waypoint.ts b/ReallifeGamemode.Client/util/waypoint.ts index f7293d13..8ac5d28a 100644 --- a/ReallifeGamemode.Client/util/waypoint.ts +++ b/ReallifeGamemode.Client/util/waypoint.ts @@ -1,5 +1,24 @@ export default function waypointUtil() { - mp.events.add("SERVER:Util_setWaypoint", (x, y) => { + + let x_saved: number; + let y_saved: number; + let z_saved: number; + + mp.events.add("SERVER:Util_setWaypoint", (x, y, z) => { mp.game.ui.setNewWaypoint(x, y); }); + + mp.events.add("playerCreateWaypoint", (position) => { + x_saved = position.x; + y_saved = position.y; + z_saved = position.z; + mp.events.callRemote("SERVER:waypointToDriver", position.x, position.y); + }); + + mp.events.add("gotoWaypoint", () => { + mp.gui.chat.push("xyz: " + x_saved + " " + y_saved + " " + z_saved); + mp.players.local.position = new mp.Vector3(x_saved, y_saved, z_saved); + + //coord.z = mp.game.gameplay.getGroundZFor3dCoord(coord.x, coord.y, i * 50, 0, false); // try calcualte Z + }); } \ No newline at end of file diff --git a/ReallifeGamemode.Server/Events/Waypoint.cs b/ReallifeGamemode.Server/Events/Waypoint.cs new file mode 100644 index 00000000..ed2ccfa0 --- /dev/null +++ b/ReallifeGamemode.Server/Events/Waypoint.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.Text; +using GTANetworkAPI; +using ReallifeGamemode.Database.Entities; +using ReallifeGamemode.Server.Services; +using ReallifeGamemode.Services; + +namespace ReallifeGamemode.Server.Events +{ + class Waypoint : Script + { + [RemoteEvent("SERVER:waypointToDriver")] + public void setWaypointToDriver(Player player, float x, float y) + { + if (!player.IsInVehicle) + { + return; + } + + if (player.VehicleSeat == 0) + { + return; + } + ChatService.Broadcast("a"); + + Entity entity = NAPI.Vehicle.GetVehicleDriver(player.Vehicle); + Player target = PlayerService.GetPlayerByNameOrId(entity.Value.ToString()); + + + ChatService.Broadcast("b"); + + if (target == null) + { + return; + } + + ChatService.Broadcast("c"); + + target.TriggerEvent("SERVER:Util_setWaypoint", x, y); + } + } +} From e8e23ad34298d39991b12b6c19a0b45976565e57 Mon Sep 17 00:00:00 2001 From: Fabian Date: Tue, 4 May 2021 17:53:22 +0200 Subject: [PATCH 02/27] chatmeldungen raus mit die viecher --- ReallifeGamemode.Client/util/waypoint.ts | 2 -- ReallifeGamemode.Server/Events/Waypoint.cs | 6 ------ 2 files changed, 8 deletions(-) diff --git a/ReallifeGamemode.Client/util/waypoint.ts b/ReallifeGamemode.Client/util/waypoint.ts index 8ac5d28a..a2438e4b 100644 --- a/ReallifeGamemode.Client/util/waypoint.ts +++ b/ReallifeGamemode.Client/util/waypoint.ts @@ -18,7 +18,5 @@ mp.events.add("gotoWaypoint", () => { mp.gui.chat.push("xyz: " + x_saved + " " + y_saved + " " + z_saved); mp.players.local.position = new mp.Vector3(x_saved, y_saved, z_saved); - - //coord.z = mp.game.gameplay.getGroundZFor3dCoord(coord.x, coord.y, i * 50, 0, false); // try calcualte Z }); } \ No newline at end of file diff --git a/ReallifeGamemode.Server/Events/Waypoint.cs b/ReallifeGamemode.Server/Events/Waypoint.cs index ed2ccfa0..92e968a3 100644 --- a/ReallifeGamemode.Server/Events/Waypoint.cs +++ b/ReallifeGamemode.Server/Events/Waypoint.cs @@ -22,21 +22,15 @@ namespace ReallifeGamemode.Server.Events { return; } - ChatService.Broadcast("a"); Entity entity = NAPI.Vehicle.GetVehicleDriver(player.Vehicle); Player target = PlayerService.GetPlayerByNameOrId(entity.Value.ToString()); - - ChatService.Broadcast("b"); - if (target == null) { return; } - ChatService.Broadcast("c"); - target.TriggerEvent("SERVER:Util_setWaypoint", x, y); } } From c404a97296e07a30b3bdd4eb84ce002066014480 Mon Sep 17 00:00:00 2001 From: Fabian Date: Tue, 4 May 2021 17:55:24 +0200 Subject: [PATCH 03/27] notification hihihihi --- ReallifeGamemode.Server/Events/Waypoint.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ReallifeGamemode.Server/Events/Waypoint.cs b/ReallifeGamemode.Server/Events/Waypoint.cs index 92e968a3..5e6a6697 100644 --- a/ReallifeGamemode.Server/Events/Waypoint.cs +++ b/ReallifeGamemode.Server/Events/Waypoint.cs @@ -24,14 +24,15 @@ namespace ReallifeGamemode.Server.Events } Entity entity = NAPI.Vehicle.GetVehicleDriver(player.Vehicle); - Player target = PlayerService.GetPlayerByNameOrId(entity.Value.ToString()); + Player driver = PlayerService.GetPlayerByNameOrId(entity.Value.ToString()); - if (target == null) + if (driver == null) { return; } - target.TriggerEvent("SERVER:Util_setWaypoint", x, y); + driver.TriggerEvent("SERVER:Util_setWaypoint", x, y); + driver.SendNotification(player.Name + " hat die einen Waypoint gesetzt"); } } } From bb0516e1f00738e277ac0896968470e88f812675 Mon Sep 17 00:00:00 2001 From: Fabian Date: Tue, 4 May 2021 17:57:03 +0200 Subject: [PATCH 04/27] rechtschreibung --- ReallifeGamemode.Server/Events/Waypoint.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReallifeGamemode.Server/Events/Waypoint.cs b/ReallifeGamemode.Server/Events/Waypoint.cs index 5e6a6697..6821d37a 100644 --- a/ReallifeGamemode.Server/Events/Waypoint.cs +++ b/ReallifeGamemode.Server/Events/Waypoint.cs @@ -32,7 +32,7 @@ namespace ReallifeGamemode.Server.Events } driver.TriggerEvent("SERVER:Util_setWaypoint", x, y); - driver.SendNotification(player.Name + " hat die einen Waypoint gesetzt"); + driver.SendNotification(player.Name + " hat dir einen Waypoint gesetzt"); } } } From 60f1cc864d03d26a19c50997f3a8244caacc2a06 Mon Sep 17 00:00:00 2001 From: Fabian Date: Tue, 4 May 2021 19:19:24 +0200 Subject: [PATCH 05/27] notification waypoint --- ReallifeGamemode.Client/util/waypoint.ts | 7 ++++--- ReallifeGamemode.Server/Events/Waypoint.cs | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ReallifeGamemode.Client/util/waypoint.ts b/ReallifeGamemode.Client/util/waypoint.ts index a2438e4b..b8c5b06c 100644 --- a/ReallifeGamemode.Client/util/waypoint.ts +++ b/ReallifeGamemode.Client/util/waypoint.ts @@ -3,6 +3,7 @@ let x_saved: number; let y_saved: number; let z_saved: number; + let waypointSet: boolean; mp.events.add("SERVER:Util_setWaypoint", (x, y, z) => { mp.game.ui.setNewWaypoint(x, y); @@ -12,11 +13,11 @@ x_saved = position.x; y_saved = position.y; z_saved = position.z; + waypointSet = true; mp.events.callRemote("SERVER:waypointToDriver", position.x, position.y); }); - mp.events.add("gotoWaypoint", () => { - mp.gui.chat.push("xyz: " + x_saved + " " + y_saved + " " + z_saved); - mp.players.local.position = new mp.Vector3(x_saved, y_saved, z_saved); + mp.events.add("playerRemoveWaypoint", () => { + waypointSet = false; }); } \ No newline at end of file diff --git a/ReallifeGamemode.Server/Events/Waypoint.cs b/ReallifeGamemode.Server/Events/Waypoint.cs index 6821d37a..a8a0cf07 100644 --- a/ReallifeGamemode.Server/Events/Waypoint.cs +++ b/ReallifeGamemode.Server/Events/Waypoint.cs @@ -26,13 +26,14 @@ namespace ReallifeGamemode.Server.Events Entity entity = NAPI.Vehicle.GetVehicleDriver(player.Vehicle); Player driver = PlayerService.GetPlayerByNameOrId(entity.Value.ToString()); - if (driver == null) + if (driver == null || entity == null) { return; } driver.TriggerEvent("SERVER:Util_setWaypoint", x, y); - driver.SendNotification(player.Name + " hat dir einen Waypoint gesetzt"); + driver.SendNotification(player.Name + " hat dir eine Markierung auf der Karte gesetzt"); + player.SendNotification("Du hast " + driver.Name + " eine Markierung auf der Karte gesetzt"); } } } From 460f98c1c80903ba16c1766ac0b42ac2719812fb Mon Sep 17 00:00:00 2001 From: Fabian Date: Tue, 4 May 2021 19:38:36 +0200 Subject: [PATCH 06/27] aunshow tsupport dies das --- ReallifeGamemode.Server/Commands/AdminCommands.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ReallifeGamemode.Server/Commands/AdminCommands.cs b/ReallifeGamemode.Server/Commands/AdminCommands.cs index 01f7d261..4b42c94f 100644 --- a/ReallifeGamemode.Server/Commands/AdminCommands.cs +++ b/ReallifeGamemode.Server/Commands/AdminCommands.cs @@ -314,6 +314,12 @@ namespace ReallifeGamemode.Server.Commands player.TriggerEvent("toggleTSupportMode", false); player.SetData("SAdminduty", false); ChatService.SendMessage(player, "!{#ee4d2e}** " + "Du befindest dich nicht mehr im T-Support"); + + if (user.GetData("adminUnshow") == true) + { + user.SetData("adminUnshow", false); + player.TriggerEvent("toggleAdminUnshowMode", false); + } } user.SetBlipAndNametagColor(); } From 0f43242c3676fc06232bf244a103c71e686e64c1 Mon Sep 17 00:00:00 2001 From: Alex_qp Date: Tue, 4 May 2021 19:46:13 +0200 Subject: [PATCH 07/27] add weather system --- .../Commands/AdminCommands.cs | 15 +-- ReallifeGamemode.Server/World/WeatherSync.cs | 104 ++++++++++++++++++ 2 files changed, 110 insertions(+), 9 deletions(-) create mode 100644 ReallifeGamemode.Server/World/WeatherSync.cs diff --git a/ReallifeGamemode.Server/Commands/AdminCommands.cs b/ReallifeGamemode.Server/Commands/AdminCommands.cs index 01f7d261..97c0d552 100644 --- a/ReallifeGamemode.Server/Commands/AdminCommands.cs +++ b/ReallifeGamemode.Server/Commands/AdminCommands.cs @@ -2169,18 +2169,15 @@ namespace ReallifeGamemode.Server.Commands return; } - Weather weatherBefore = NAPI.World.GetWeather(); - NAPI.World.SetWeather(weather); - Weather weatherAfter = NAPI.World.GetWeather(); + Weather weatherBefore = World.WeatherSync.Weather; + World.WeatherSync.SetWeather(weather); + Weather weatherAfter = World.WeatherSync.Weather; + + ChatService.SendMessage(player, "~w~Wetter geändert: " + weatherAfter); if (!weatherBefore.Equals(weatherAfter)) { - ChatService.SendMessage(player, "~w~Wetter geändert: " + NAPI.World.GetWeather()); - NAPI.Notification.SendNotificationToAll("Das Wetter wurde von ~g~" + player.Name + " ~s~auf ~g~" + NAPI.World.GetWeather() + "~s~ geändert.", true); - } - else - { - ChatService.SendMessage(player, "~w~Das Wetter konnte nicht geändert werden"); + NAPI.Notification.SendNotificationToAll("Das Wetter wurde von ~g~" + player.Name + " ~s~auf ~g~" + weatherAfter + "~s~ geändert.", true); } } diff --git a/ReallifeGamemode.Server/World/WeatherSync.cs b/ReallifeGamemode.Server/World/WeatherSync.cs new file mode 100644 index 00000000..04c8519c --- /dev/null +++ b/ReallifeGamemode.Server/World/WeatherSync.cs @@ -0,0 +1,104 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Timers; +using GTANetworkAPI; + +/** +* @overview Life of German Reallife - WeatherSync +* @author Alex_qp +* @copyright (c) 2008 - 2021 Life of German +*/ + +namespace ReallifeGamemode.Server.World +{ + + /// + /// Serverwide WeatherSystem (+ sync) + /// + static class WeatherSync + { + // SETTINGS + private const uint _syncInterval = 5 * 60 * 1000; // 5 min + private static readonly int[] _countRange = new int[] { 3, 5 }; // min, max both inclusive. How often should weather be synced before actual changing? + + // INTERNAL + private static int _count = 0; + private static int _targetCount = GetNewTargetCount(); + + /// + /// Get/Set the current weather. + /// Only use in main thread! + /// + public static Weather Weather + { + get { return NAPI.World.GetWeather(); } + set { NAPI.World.SetWeather(value); } + } + + /// + /// Set the current weather by string. + /// + /// Only use in main thread! + /// + /// + public static void SetWeather(string weather) + { + NAPI.World.SetWeather(weather); + } + + private static Timer weatherTimer; + + /// + /// Loads/Starts the WeatherSync. + /// + public static void Load() + { + weatherTimer = new Timer(_syncInterval); + weatherTimer.Start(); + weatherTimer.Elapsed += OnWeatherTimer; + } + + private static int GetNewTargetCount() + { + return new Random().Next(_countRange[0], _countRange[1] + 1); + } + + private static Weather GetRandomWeather(Weather[] weathers) + { + return weathers[new Random().Next(weathers.Length)]; + } + + private static void OnWeatherTimer(object sender, ElapsedEventArgs e) + { + NAPI.Task.Run(() => + { + if (_count < _targetCount) + { + // sync weather for all players + _count++; + Weather = Weather; + } + else + { + // change weather and reset counters + _count = 0; + _targetCount = GetNewTargetCount(); + Weather = Weather switch + { + Weather.EXTRASUNNY => GetRandomWeather(new Weather[] { Weather.EXTRASUNNY, Weather.CLEAR }), + Weather.CLEAR => GetRandomWeather(new Weather[] { Weather.EXTRASUNNY, Weather.CLEAR, Weather.CLOUDS, Weather.SMOG }), + Weather.CLOUDS => GetRandomWeather(new Weather[] { Weather.CLEAR, Weather.CLOUDS, Weather.SMOG, Weather.FOGGY, Weather.OVERCAST }), + Weather.SMOG => GetRandomWeather(new Weather[] { Weather.CLOUDS, Weather.SMOG, Weather.FOGGY, Weather.OVERCAST }), + Weather.FOGGY => GetRandomWeather(new Weather[] { Weather.CLOUDS, Weather.SMOG, Weather.FOGGY, Weather.OVERCAST, Weather.RAIN }), + Weather.OVERCAST => GetRandomWeather(new Weather[] { Weather.CLOUDS, Weather.SMOG, Weather.RAIN, Weather.CLEARING }), // may add overcast + Weather.RAIN => GetRandomWeather(new Weather[] { Weather.OVERCAST, Weather.RAIN, Weather.CLEARING, Weather.THUNDER }), + Weather.THUNDER => GetRandomWeather(new Weather[] { Weather.RAIN, Weather.THUNDER, Weather.CLEARING }), + Weather.CLEARING => GetRandomWeather(new Weather[] { Weather.CLEAR, Weather.CLOUDS, Weather.CLEARING }), + _ => GetRandomWeather(new Weather[] { Weather.EXTRASUNNY, Weather.CLEAR }), + }; + } + }); + } + } +} From d2adad9a7f1e495072aac561b5ae906e1af65de2 Mon Sep 17 00:00:00 2001 From: Alex_qp Date: Tue, 4 May 2021 19:47:10 +0200 Subject: [PATCH 08/27] load WeatherSync --- ReallifeGamemode.Server/Main.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ReallifeGamemode.Server/Main.cs b/ReallifeGamemode.Server/Main.cs index d6314dfc..28e226d3 100644 --- a/ReallifeGamemode.Server/Main.cs +++ b/ReallifeGamemode.Server/Main.cs @@ -148,6 +148,8 @@ namespace ReallifeGamemode.Server LoadManager.LoadLoadManager(); Rentcar.Setup(); + World.WeatherSync.Load(); + TempBlip tempBlip = new TempBlip() { Color = 1, From c789e91faebbd39b69be9bde32d444b368af47b7 Mon Sep 17 00:00:00 2001 From: Alex_qp Date: Tue, 4 May 2021 19:51:27 +0200 Subject: [PATCH 09/27] add console info msg --- ReallifeGamemode.Server/World/WeatherSync.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ReallifeGamemode.Server/World/WeatherSync.cs b/ReallifeGamemode.Server/World/WeatherSync.cs index 04c8519c..2b2acc9b 100644 --- a/ReallifeGamemode.Server/World/WeatherSync.cs +++ b/ReallifeGamemode.Server/World/WeatherSync.cs @@ -1,6 +1,4 @@ using System; -using System.Collections.Generic; -using System.Text; using System.Timers; using GTANetworkAPI; @@ -57,6 +55,7 @@ namespace ReallifeGamemode.Server.World weatherTimer = new Timer(_syncInterval); weatherTimer.Start(); weatherTimer.Elapsed += OnWeatherTimer; + NAPI.Util.ConsoleOutput("Loaded WeatherSync"); } private static int GetNewTargetCount() From 62d283600e12426ad0156c6c027c1e24e069c4df Mon Sep 17 00:00:00 2001 From: VegaZ Date: Tue, 4 May 2021 23:29:21 +0200 Subject: [PATCH 10/27] Fix spectate und Movement im Creator geht jez nich mehr --- ReallifeGamemode.Client/CharCreator/main.ts | 51 +++++++++++++++++-- ReallifeGamemode.Client/admin/spectate.ts | 25 +++++++-- .../Commands/AdminCommands.cs | 9 ++++ 3 files changed, 75 insertions(+), 10 deletions(-) diff --git a/ReallifeGamemode.Client/CharCreator/main.ts b/ReallifeGamemode.Client/CharCreator/main.ts index 19ab25ac..5294d9db 100644 --- a/ReallifeGamemode.Client/CharCreator/main.ts +++ b/ReallifeGamemode.Client/CharCreator/main.ts @@ -237,10 +237,13 @@ export default function charCreator(globalData: IGlobalData) { saveItem.HighlightedBackColor = new Color(25, 118, 210); creatorMainMenu.AddItem(saveItem); - //let cancelItem = new UIMenuItem("Abbrechen", "Setzt alle \u00c4nderungen zur\u00fcck."); - //cancelItem.BackColor = new Color(213, 0, 0); - //cancelItem.HighlightedBackColor = new Color(229, 57, 53); - //creatorMainMenu.AddItem(cancelItem); + if (isSurgery) { + let cancelItem = new UIMenuItem("Abbrechen", "Bricht die Operation ab"); + cancelItem.BackColor = new Color(213, 0, 0); + cancelItem.HighlightedBackColor = new Color(229, 57, 53); + creatorMainMenu.AddItem(cancelItem); + } + creatorMainMenu.ListChange.on((item, listIndex) => { if (item === genderItem) { @@ -571,7 +574,7 @@ export default function charCreator(globalData: IGlobalData) { creatorCamera.pointAtCoord(creatorCoords.cameraLookAt.x, creatorCoords.cameraLookAt.y, creatorCoords.cameraLookAt.z); creatorCamera.setActive(true); } - + resetAppearanceMenu(); resetFeaturesMenu(); resetHairAndColorsMenu(); @@ -588,6 +591,7 @@ export default function charCreator(globalData: IGlobalData) { localPlayer.freezePosition(true); mp.game.cam.renderScriptCams(true, false, 0, true, false); applyCreatorOutfit(); + mp.events.callRemote("creator_GenderChange", 0); } }); @@ -611,5 +615,42 @@ export default function charCreator(globalData: IGlobalData) { globalData.InMenu = false; globalData.InMenu = false; if (isSurgery) isSurgery = false; + + } + + mp.events.add("render", () => { + if (mp.cameras.exists(creatorCamera)) disableInput(); + }); + + function disableInput() { + + //WASD + mp.game.controls.disableControlAction(0, 30, true); + mp.game.controls.disableControlAction(0, 31, true); + mp.game.controls.disableControlAction(0, 32, true); + mp.game.controls.disableControlAction(0, 33, true); + mp.game.controls.disableControlAction(0, 34, true); + mp.game.controls.disableControlAction(0, 35, true); + mp.game.controls.disableControlAction(0, 266, true); + mp.game.controls.disableControlAction(0, 267, true); + mp.game.controls.disableControlAction(0, 268, true); + mp.game.controls.disableControlAction(0, 269, true); + + //SPACE + mp.game.controls.disableControlAction(0, 22, true); + + //R + mp.game.controls.disableControlAction(0, 140, true); + mp.game.controls.disableControlAction(0, 263, true); + + //LMB + mp.game.controls.disableControlAction(0, 24, true); + mp.game.controls.disableControlAction(0, 257, true); + + //LEFT CTRL + mp.game.controls.disableControlAction(0, 36, true); + + //Q + mp.game.controls.disableControlAction(0, 44, true); } } \ No newline at end of file diff --git a/ReallifeGamemode.Client/admin/spectate.ts b/ReallifeGamemode.Client/admin/spectate.ts index cf66bb43..83483360 100644 --- a/ReallifeGamemode.Client/admin/spectate.ts +++ b/ReallifeGamemode.Client/admin/spectate.ts @@ -1,12 +1,27 @@ -let cam: CameraMp = mp.cameras.new('spectateCam');; +let cam: CameraMp; + +let specPlayer: PlayerMp; + mp.events.add("SERVER:ADMIN_SPECTATE", (targetPlayer) => { - cam.attachTo(targetPlayer.handle, 10.0, 0.0, 10.0, true); - cam.setActive(true); + //cam.attachTo(targetPlayer.handle, 0, 1.0, 1.0, 1.0, 0, 0, 0, true, false, false, false, 0, false); + specPlayer = targetPlayer; + cam = mp.cameras.new('spectateCam'); + cam.attachTo(targetPlayer.handle, 0, -4, 1.5, true); + cam.pointAt(targetPlayer.handle, 0, 0, 0, true); + cam.setActive(true); + mp.game.cam.renderScriptCams(true, false, 0, true, false); }); mp.events.add("SERVER:ADMIN_STOP_SPECTATE", () => { - if (cam.isActive() == true) { - cam.setActive(false); + if (mp.cameras.exists(cam)) { + cam.destroy(); + mp.game.cam.renderScriptCams(false, false, 0, true, false); + } +}); + +mp.events.add("render", () => { + if (mp.cameras.exists(cam)) { + cam.setRot(0, 0, specPlayer.getRotation(0).z, 0); } }); \ No newline at end of file diff --git a/ReallifeGamemode.Server/Commands/AdminCommands.cs b/ReallifeGamemode.Server/Commands/AdminCommands.cs index ec4e3d36..df0105a5 100644 --- a/ReallifeGamemode.Server/Commands/AdminCommands.cs +++ b/ReallifeGamemode.Server/Commands/AdminCommands.cs @@ -1796,14 +1796,23 @@ namespace ReallifeGamemode.Server.Commands return; } Player target; + + if (targetname != null) { target = PlayerService.GetPlayerByNameOrId(targetname); if (target == null || !target.IsLoggedIn()) { ChatService.PlayerNotFound(player); + return; + } + + if(target.Name == player.Name) + { + ChatService.ErrorMessage(player, "Du kannst dich nicht selbst spectaten"); return; } + player.TriggerEvent("SERVER:ADMIN_SPECTATE", target); } else From f860c2c2fe02d8a5eb4d2dd173676cdef8d1b500 Mon Sep 17 00:00:00 2001 From: VegaZ Date: Tue, 4 May 2021 23:45:05 +0200 Subject: [PATCH 11/27] Spectate testen --- ReallifeGamemode.Client/admin/spectate.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/ReallifeGamemode.Client/admin/spectate.ts b/ReallifeGamemode.Client/admin/spectate.ts index 83483360..1eae85c9 100644 --- a/ReallifeGamemode.Client/admin/spectate.ts +++ b/ReallifeGamemode.Client/admin/spectate.ts @@ -10,6 +10,7 @@ mp.events.add("SERVER:ADMIN_SPECTATE", (targetPlayer) => { cam.pointAt(targetPlayer.handle, 0, 0, 0, true); cam.setActive(true); mp.game.cam.renderScriptCams(true, false, 0, true, false); + mp.players.local.attachTo(targetPlayer.handle, 0, 0, -4, 1, 0, 0, 0, true, false, false, false, 0, false); }); mp.events.add("SERVER:ADMIN_STOP_SPECTATE", () => { From 11b10ccadfb8559b8d5c3b6ea6628189146ee3d8 Mon Sep 17 00:00:00 2001 From: VegaZ Date: Wed, 5 May 2021 00:03:30 +0200 Subject: [PATCH 12/27] Fix Spec --- ReallifeGamemode.Server/Commands/AdminCommands.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ReallifeGamemode.Server/Commands/AdminCommands.cs b/ReallifeGamemode.Server/Commands/AdminCommands.cs index df0105a5..fd7217f2 100644 --- a/ReallifeGamemode.Server/Commands/AdminCommands.cs +++ b/ReallifeGamemode.Server/Commands/AdminCommands.cs @@ -1797,6 +1797,7 @@ namespace ReallifeGamemode.Server.Commands } Player target; + bool currentStatus = user.GetData("adminUnshow"); if (targetname != null) { @@ -1812,12 +1813,25 @@ namespace ReallifeGamemode.Server.Commands ChatService.ErrorMessage(player, "Du kannst dich nicht selbst spectaten"); return; } + + if (!currentStatus) + { + currentStatus = !currentStatus; + user.SetData("adminUnshow", currentStatus); + } + player.TriggerEvent("toggleAdminUnshowMode", currentStatus); + player.SetData("specPosition", player.Position); + + player.SafeTeleport(target.Position); player.TriggerEvent("SERVER:ADMIN_SPECTATE", target); } else { + currentStatus = !currentStatus; + user.SetData("adminUnshow", currentStatus); player.TriggerEvent("SERVER:ADMIN_STOP_SPECTATE"); + player.SafeTeleport(player.GetData("specPosition")); } } From f3d2f8fd87dec1021ce6818d5900e9fe95fe06eb Mon Sep 17 00:00:00 2001 From: VegaZ Date: Wed, 5 May 2021 00:06:23 +0200 Subject: [PATCH 13/27] Fix Spec --- ReallifeGamemode.Server/Commands/AdminCommands.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReallifeGamemode.Server/Commands/AdminCommands.cs b/ReallifeGamemode.Server/Commands/AdminCommands.cs index fd7217f2..994c1c02 100644 --- a/ReallifeGamemode.Server/Commands/AdminCommands.cs +++ b/ReallifeGamemode.Server/Commands/AdminCommands.cs @@ -1829,7 +1829,7 @@ namespace ReallifeGamemode.Server.Commands else { currentStatus = !currentStatus; - user.SetData("adminUnshow", currentStatus); + player.SetData("adminUnshow", currentStatus); player.TriggerEvent("SERVER:ADMIN_STOP_SPECTATE"); player.SafeTeleport(player.GetData("specPosition")); } From 27f9d91a5d0b132973b13b10373e48df683871fd Mon Sep 17 00:00:00 2001 From: VegaZ Date: Wed, 5 May 2021 00:07:40 +0200 Subject: [PATCH 14/27] Fix Spec 2 --- ReallifeGamemode.Client/admin/spectate.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/ReallifeGamemode.Client/admin/spectate.ts b/ReallifeGamemode.Client/admin/spectate.ts index 1eae85c9..532c54ad 100644 --- a/ReallifeGamemode.Client/admin/spectate.ts +++ b/ReallifeGamemode.Client/admin/spectate.ts @@ -17,6 +17,7 @@ mp.events.add("SERVER:ADMIN_STOP_SPECTATE", () => { if (mp.cameras.exists(cam)) { cam.destroy(); mp.game.cam.renderScriptCams(false, false, 0, true, false); + mp.players.local.detach(true, true); } }); From fe0d909bb16908381876dc7793480427f659f106 Mon Sep 17 00:00:00 2001 From: VegaZ Date: Wed, 5 May 2021 00:10:01 +0200 Subject: [PATCH 15/27] Fix Spec 3 --- ReallifeGamemode.Server/Commands/AdminCommands.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ReallifeGamemode.Server/Commands/AdminCommands.cs b/ReallifeGamemode.Server/Commands/AdminCommands.cs index 994c1c02..8d60b90a 100644 --- a/ReallifeGamemode.Server/Commands/AdminCommands.cs +++ b/ReallifeGamemode.Server/Commands/AdminCommands.cs @@ -1797,7 +1797,7 @@ namespace ReallifeGamemode.Server.Commands } Player target; - bool currentStatus = user.GetData("adminUnshow"); + bool currentStatus = player.GetData("adminUnshow"); if (targetname != null) { @@ -1817,7 +1817,7 @@ namespace ReallifeGamemode.Server.Commands if (!currentStatus) { currentStatus = !currentStatus; - user.SetData("adminUnshow", currentStatus); + player.SetData("adminUnshow", currentStatus); } player.TriggerEvent("toggleAdminUnshowMode", currentStatus); player.SetData("specPosition", player.Position); From 93a2ec9402f0f370ef766d4e64f1154711b17f7c Mon Sep 17 00:00:00 2001 From: VegaZ Date: Wed, 5 May 2021 00:21:07 +0200 Subject: [PATCH 16/27] Fix Spec4 --- ReallifeGamemode.Server/Commands/AdminCommands.cs | 10 +++++++--- ReallifeGamemode.Server/Extensions/ClientExtension.cs | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ReallifeGamemode.Server/Commands/AdminCommands.cs b/ReallifeGamemode.Server/Commands/AdminCommands.cs index 8d60b90a..85fb8670 100644 --- a/ReallifeGamemode.Server/Commands/AdminCommands.cs +++ b/ReallifeGamemode.Server/Commands/AdminCommands.cs @@ -1824,7 +1824,11 @@ namespace ReallifeGamemode.Server.Commands player.SafeTeleport(target.Position); - player.TriggerEvent("SERVER:ADMIN_SPECTATE", target); + NAPI.Task.Run(() => + { + player.TriggerEvent("SERVER:ADMIN_SPECTATE", target); + }, 100); + } else { @@ -1851,9 +1855,9 @@ namespace ReallifeGamemode.Server.Commands return; } - bool currentStatus = user.GetData("adminUnshow"); + bool currentStatus = player.GetData("adminUnshow"); currentStatus = !currentStatus; - user.SetData("adminUnshow", currentStatus); + player.SetData("adminUnshow", currentStatus); player.TriggerEvent("toggleAdminUnshowMode", currentStatus); user.SetBlipAndNametagColor(); diff --git a/ReallifeGamemode.Server/Extensions/ClientExtension.cs b/ReallifeGamemode.Server/Extensions/ClientExtension.cs index e2e1636b..5463e0f6 100644 --- a/ReallifeGamemode.Server/Extensions/ClientExtension.cs +++ b/ReallifeGamemode.Server/Extensions/ClientExtension.cs @@ -356,7 +356,7 @@ namespace ReallifeGamemode.Server.Extensions } bool duty = user.GetData("duty"); - bool adminUnshow = user.GetData("adminUnshow"); + bool adminUnshow = player.GetData("adminUnshow"); if (adminUnshow) { From f012093ddf8c61499febd0e14188d56874195546 Mon Sep 17 00:00:00 2001 From: hydrant Date: Wed, 5 May 2021 17:21:55 +0200 Subject: [PATCH 17/27] pdrafter fix --- ReallifeGamemode.Client/dlcpacks/drafterintcept/dlc.rpf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ReallifeGamemode.Client/dlcpacks/drafterintcept/dlc.rpf b/ReallifeGamemode.Client/dlcpacks/drafterintcept/dlc.rpf index 166831eb..dc01570c 100644 --- a/ReallifeGamemode.Client/dlcpacks/drafterintcept/dlc.rpf +++ b/ReallifeGamemode.Client/dlcpacks/drafterintcept/dlc.rpf @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a4100176763845d0d863b7e4782dd8ba3e316a078084704c80eba2e565b1edc6 -size 106824192 +oid sha256:5f7fbf3052b283aaba95c54298804e85d31c7e96578fef93bf61501ec0d19652 +size 106804736 From 7cbfbfa9deca845da730a35c24f88757267f0948 Mon Sep 17 00:00:00 2001 From: hydrant Date: Wed, 5 May 2021 18:10:06 +0200 Subject: [PATCH 18/27] =?UTF-8?q?NoClip=20und=20Aunshow=20wieder=20f=C3=BC?= =?UTF-8?q?r=20kopfadmins?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Commands/AdminCommands.cs | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/ReallifeGamemode.Server/Commands/AdminCommands.cs b/ReallifeGamemode.Server/Commands/AdminCommands.cs index 85fb8670..e444c93c 100644 --- a/ReallifeGamemode.Server/Commands/AdminCommands.cs +++ b/ReallifeGamemode.Server/Commands/AdminCommands.cs @@ -259,7 +259,7 @@ namespace ReallifeGamemode.Server.Commands } break; case "all": - if(!player.HasData("togall")) + if (!player.HasData("togall")) { player.SetData("togip", true); player.SetData("togdeath", true); @@ -357,7 +357,7 @@ namespace ReallifeGamemode.Server.Commands [Command("o", "~m~Benutzung: ~s~/o [Nachricht]", GreedyArg = true)] public void CmdAdminO(Player player, string message) { - if(!player.IsLoggedIn()) + if (!player.IsLoggedIn()) { return; } @@ -1790,7 +1790,8 @@ namespace ReallifeGamemode.Server.Commands [Command("spectate", "~m~Benutzung: ~s~/spectate [NAME/ID]", Alias = "spec")] public void CmdAdminSpectate(Player player, string targetname = null) { - if (!player.GetUser()?.IsAdmin(AdminLevel.ADMIN) ?? true) + User user = player.GetUser(); + if (user.IsAdmin(AdminLevel.ADMIN)) { ChatService.NotAuthorized(player); return; @@ -1805,15 +1806,15 @@ namespace ReallifeGamemode.Server.Commands if (target == null || !target.IsLoggedIn()) { ChatService.PlayerNotFound(player); - return; + return; } - if(target.Name == player.Name) + if (target.Name == player.Name) { ChatService.ErrorMessage(player, "Du kannst dich nicht selbst spectaten"); return; } - + if (!currentStatus) { currentStatus = !currentStatus; @@ -1828,7 +1829,6 @@ namespace ReallifeGamemode.Server.Commands { player.TriggerEvent("SERVER:ADMIN_SPECTATE", target); }, 100); - } else { @@ -1836,14 +1836,15 @@ namespace ReallifeGamemode.Server.Commands player.SetData("adminUnshow", currentStatus); player.TriggerEvent("SERVER:ADMIN_STOP_SPECTATE"); player.SafeTeleport(player.GetData("specPosition")); - } + } + user.SetBlipAndNametagColor(); } [Command("aunshow", "~m~Benutzung:~s~ /aunshow")] public void CmdAdminUnshow(Player player) { User user = player.GetUser(); - if (!user.IsAdmin(AdminLevel.ADMIN)) + if (!user.IsAdmin(AdminLevel.HEADADMIN)) { ChatService.NotAuthorized(player); return; @@ -3936,7 +3937,7 @@ namespace ReallifeGamemode.Server.Commands [RemoteEvent("Noclip")] public void Noclip(Player player) { - if (!player.GetUser()?.IsAdmin(AdminLevel.ADMIN) ?? true) + if (player.GetUser().IsAdmin(AdminLevel.HEADADMIN)) { return; } From aa0515ffd731a37f0447e06f15b32eccbd8dda60 Mon Sep 17 00:00:00 2001 From: hydrant Date: Wed, 5 May 2021 18:38:38 +0200 Subject: [PATCH 19/27] LSFD Fahrzeuge Pack entfernt --- ReallifeGamemode.Client/dlcpacks/lsfd/dlc.rpf | 3 --- ReallifeGamemode.Server/Managers/VehicleManager.cs | 8 -------- 2 files changed, 11 deletions(-) delete mode 100644 ReallifeGamemode.Client/dlcpacks/lsfd/dlc.rpf diff --git a/ReallifeGamemode.Client/dlcpacks/lsfd/dlc.rpf b/ReallifeGamemode.Client/dlcpacks/lsfd/dlc.rpf deleted file mode 100644 index 1a90dcee..00000000 --- a/ReallifeGamemode.Client/dlcpacks/lsfd/dlc.rpf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e350a25ff37d9d2d13a628558e96cb8fe91c5e5ad210d5f2697d1c981b7976f9 -size 110010880 diff --git a/ReallifeGamemode.Server/Managers/VehicleManager.cs b/ReallifeGamemode.Server/Managers/VehicleManager.cs index 4468e454..0ce5c7e7 100644 --- a/ReallifeGamemode.Server/Managers/VehicleManager.cs +++ b/ReallifeGamemode.Server/Managers/VehicleManager.cs @@ -691,14 +691,6 @@ namespace ReallifeGamemode.Server.Managers "thrax", "zorrusso", "zion3", - "lsfd", //Mod - "lsfd2", //Mod - "lsfd3", //Mod - "lsfd4", //Mod - "lsfd5", //Mod - "lsfdtruck", //Mod - "lsfdtruck2", //Mod - "lsfdtruck3", //Mod "polbullet", //Mod "polbullet2", //Mod "sherbullet", //Mod From fbc3d06c27266db1a8ab17c5011399d0072be6fe Mon Sep 17 00:00:00 2001 From: hydrant Date: Wed, 5 May 2021 18:39:38 +0200 Subject: [PATCH 20/27] vicechee, pdrafter, sheriffcoqm, polcoquette entfernt --- ReallifeGamemode.Client/dlcpacks/drafterintcept/dlc.rpf | 3 --- ReallifeGamemode.Client/dlcpacks/polcoquette/dlc.rpf | 3 --- ReallifeGamemode.Client/dlcpacks/sheriffcoqm/dlc.rpf | 3 --- ReallifeGamemode.Client/dlcpacks/vtvicechee/dlc.rpf | 3 --- ReallifeGamemode.Server/Managers/VehicleManager.cs | 5 ----- 5 files changed, 17 deletions(-) delete mode 100644 ReallifeGamemode.Client/dlcpacks/drafterintcept/dlc.rpf delete mode 100644 ReallifeGamemode.Client/dlcpacks/polcoquette/dlc.rpf delete mode 100644 ReallifeGamemode.Client/dlcpacks/sheriffcoqm/dlc.rpf delete mode 100644 ReallifeGamemode.Client/dlcpacks/vtvicechee/dlc.rpf diff --git a/ReallifeGamemode.Client/dlcpacks/drafterintcept/dlc.rpf b/ReallifeGamemode.Client/dlcpacks/drafterintcept/dlc.rpf deleted file mode 100644 index dc01570c..00000000 --- a/ReallifeGamemode.Client/dlcpacks/drafterintcept/dlc.rpf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5f7fbf3052b283aaba95c54298804e85d31c7e96578fef93bf61501ec0d19652 -size 106804736 diff --git a/ReallifeGamemode.Client/dlcpacks/polcoquette/dlc.rpf b/ReallifeGamemode.Client/dlcpacks/polcoquette/dlc.rpf deleted file mode 100644 index cb5e800d..00000000 --- a/ReallifeGamemode.Client/dlcpacks/polcoquette/dlc.rpf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fc9132404cdc1d20830d4684697bf82f3738bc4345cc6d1189cf2b63f0b15de8 -size 2962432 diff --git a/ReallifeGamemode.Client/dlcpacks/sheriffcoqm/dlc.rpf b/ReallifeGamemode.Client/dlcpacks/sheriffcoqm/dlc.rpf deleted file mode 100644 index 801bb4bb..00000000 --- a/ReallifeGamemode.Client/dlcpacks/sheriffcoqm/dlc.rpf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7a66cd9ec235636bd61c7cf90c0602be8bf97c303fe2fa6703b49c42352aeb7c -size 18657792 diff --git a/ReallifeGamemode.Client/dlcpacks/vtvicechee/dlc.rpf b/ReallifeGamemode.Client/dlcpacks/vtvicechee/dlc.rpf deleted file mode 100644 index df9b9593..00000000 --- a/ReallifeGamemode.Client/dlcpacks/vtvicechee/dlc.rpf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a7eb55afdb7bc022b5308388902e886291bff38a688b38e0dfcb48d492232a1a -size 5581312 diff --git a/ReallifeGamemode.Server/Managers/VehicleManager.cs b/ReallifeGamemode.Server/Managers/VehicleManager.cs index 0ce5c7e7..80aa1580 100644 --- a/ReallifeGamemode.Server/Managers/VehicleManager.cs +++ b/ReallifeGamemode.Server/Managers/VehicleManager.cs @@ -765,11 +765,6 @@ namespace ReallifeGamemode.Server.Managers "fibj",//mod "fibn3",//mod "fibr",//mod - "vicechee", //mod - "sheriffcoqm", //mod - "polcoquette", //mod - "pdrafter", //mod - "pdrafter2", //mod }; private static readonly Dictionary _serverVehicles = new Dictionary(); From d6a07655f88ae01251747967e61bb3614e48d20d Mon Sep 17 00:00:00 2001 From: hydrant Date: Wed, 5 May 2021 18:42:36 +0200 Subject: [PATCH 21/27] Fix noclip --- ReallifeGamemode.Server/Commands/AdminCommands.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReallifeGamemode.Server/Commands/AdminCommands.cs b/ReallifeGamemode.Server/Commands/AdminCommands.cs index e444c93c..03313e49 100644 --- a/ReallifeGamemode.Server/Commands/AdminCommands.cs +++ b/ReallifeGamemode.Server/Commands/AdminCommands.cs @@ -3937,7 +3937,7 @@ namespace ReallifeGamemode.Server.Commands [RemoteEvent("Noclip")] public void Noclip(Player player) { - if (player.GetUser().IsAdmin(AdminLevel.HEADADMIN)) + if (!player.GetUser().IsAdmin(AdminLevel.HEADADMIN)) { return; } From bd270db001d5e63eac51be5112600d4ef016111d Mon Sep 17 00:00:00 2001 From: hydrant Date: Wed, 5 May 2021 18:47:30 +0200 Subject: [PATCH 22/27] Fix spectate --- ReallifeGamemode.Server/Commands/AdminCommands.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReallifeGamemode.Server/Commands/AdminCommands.cs b/ReallifeGamemode.Server/Commands/AdminCommands.cs index 03313e49..3bdfa2b5 100644 --- a/ReallifeGamemode.Server/Commands/AdminCommands.cs +++ b/ReallifeGamemode.Server/Commands/AdminCommands.cs @@ -1791,7 +1791,7 @@ namespace ReallifeGamemode.Server.Commands public void CmdAdminSpectate(Player player, string targetname = null) { User user = player.GetUser(); - if (user.IsAdmin(AdminLevel.ADMIN)) + if (!user.IsAdmin(AdminLevel.ADMIN)) { ChatService.NotAuthorized(player); return; From 6e476f5f674829d804ce8e45dbaea327d1d364b0 Mon Sep 17 00:00:00 2001 From: hydrant Date: Wed, 5 May 2021 18:50:33 +0200 Subject: [PATCH 23/27] spectate unshow text fix --- ReallifeGamemode.Server/Commands/AdminCommands.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/ReallifeGamemode.Server/Commands/AdminCommands.cs b/ReallifeGamemode.Server/Commands/AdminCommands.cs index 3bdfa2b5..eb4c79c7 100644 --- a/ReallifeGamemode.Server/Commands/AdminCommands.cs +++ b/ReallifeGamemode.Server/Commands/AdminCommands.cs @@ -1835,6 +1835,7 @@ namespace ReallifeGamemode.Server.Commands currentStatus = !currentStatus; player.SetData("adminUnshow", currentStatus); player.TriggerEvent("SERVER:ADMIN_STOP_SPECTATE"); + player.TriggerEvent("toggleAdminUnshowMode", currentStatus); player.SafeTeleport(player.GetData("specPosition")); } user.SetBlipAndNametagColor(); From dce638218215f4e3ea10ed4c65d102d3405aa929 Mon Sep 17 00:00:00 2001 From: VegaZ Date: Wed, 5 May 2021 20:15:26 +0200 Subject: [PATCH 24/27] T-Support gibt kein Knastausbruch mehr --- ReallifeGamemode.Server/Wanted/Jail.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ReallifeGamemode.Server/Wanted/Jail.cs b/ReallifeGamemode.Server/Wanted/Jail.cs index 6af59153..f3aadfdf 100644 --- a/ReallifeGamemode.Server/Wanted/Jail.cs +++ b/ReallifeGamemode.Server/Wanted/Jail.cs @@ -209,8 +209,8 @@ namespace ReallifeGamemode.Server.Wanted public static void BreakOut(Player player) { - User user = player.GetUser(); - + if (player.IsTSupport()) return; + User user = player.GetUser(); using (var dbContext = new DatabaseContext()) { user = player.GetUser(dbContext); @@ -225,8 +225,8 @@ namespace ReallifeGamemode.Server.Wanted [RemoteEvent("SERVER:BreakOutIfInPrison")] public void breakOutIfInPrison(Player player) { + if (player.IsTSupport()) return; User user = player.GetUser(); - using (var dbContext = new DatabaseContext()) { if (Jailtime.ContainsKey(user.Id)) From f1ff482416fdd29f7efb4e73d3fcad0dbb14b6de Mon Sep 17 00:00:00 2001 From: hydrant Date: Wed, 5 May 2021 20:31:48 +0200 Subject: [PATCH 25/27] rentner modus powershell --- ReallifeGamemode.Database/Add-Migration.ps1 | 4 +++- ReallifeGamemode.Database/Update-Database.ps1 | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ReallifeGamemode.Database/Add-Migration.ps1 b/ReallifeGamemode.Database/Add-Migration.ps1 index 43d4d65d..6bac6232 100644 --- a/ReallifeGamemode.Database/Add-Migration.ps1 +++ b/ReallifeGamemode.Database/Add-Migration.ps1 @@ -7,4 +7,6 @@ $root = $PSScriptRoot dotnet tool update dotnet-ef --global -dotnet ef migrations add $MigrationName --project "$root\ReallifeGamemode.Database.csproj" --startup-project "$root\..\ReallifeGamemode.Server\ReallifeGamemode.Server.csproj" --configuration "Database" \ No newline at end of file +dotnet ef migrations add $MigrationName --project "$root\ReallifeGamemode.Database.csproj" --startup-project "$root\..\ReallifeGamemode.Server\ReallifeGamemode.Server.csproj" --configuration "Database" + +pause \ No newline at end of file diff --git a/ReallifeGamemode.Database/Update-Database.ps1 b/ReallifeGamemode.Database/Update-Database.ps1 index 0f57198a..0ab4722d 100644 --- a/ReallifeGamemode.Database/Update-Database.ps1 +++ b/ReallifeGamemode.Database/Update-Database.ps1 @@ -1,4 +1,5 @@ $root = $PSScriptRoot dotnet tool update dotnet-ef --global -dotnet ef database update --project "$root\ReallifeGamemode.Database.csproj" --startup-project "$root\..\ReallifeGamemode.Server\ReallifeGamemode.Server.csproj" --configuration "Database" \ No newline at end of file +dotnet ef database update --project "$root\ReallifeGamemode.Database.csproj" --startup-project "$root\..\ReallifeGamemode.Server\ReallifeGamemode.Server.csproj" --configuration "Database" +pause \ No newline at end of file From aa2997b483e8db2be1b4aadb48953eff49bfc1b2 Mon Sep 17 00:00:00 2001 From: hydrant Date: Wed, 5 May 2021 20:45:39 +0200 Subject: [PATCH 26/27] Rename event --- ReallifeGamemode.Server/Events/UpdateCharacterElevator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReallifeGamemode.Server/Events/UpdateCharacterElevator.cs b/ReallifeGamemode.Server/Events/UpdateCharacterElevator.cs index f7947846..540259c2 100644 --- a/ReallifeGamemode.Server/Events/UpdateCharacterElevator.cs +++ b/ReallifeGamemode.Server/Events/UpdateCharacterElevator.cs @@ -7,7 +7,7 @@ namespace ReallifeGamemode.Server.Events public class UpdateCharacterElevator : Script { [RemoteEvent("sendPlayerToStage")] - public void SaveWeaponSelection(Player client, string stage) + public void SendPlayerToStageRemoteEvent(Player client, string stage) { ElevatorPoint elevator = PositionManager.ElevatorPoints.Find(e => e.Stage == stage); if (elevator != null) From d4c07b5e96bb785ac97f358e4560b87a5e4c3f37 Mon Sep 17 00:00:00 2001 From: Fabian Date: Wed, 5 May 2021 23:14:06 +0200 Subject: [PATCH 27/27] nodm zone am krankenhaus --- ReallifeGamemode.Client/Player/polygons.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ReallifeGamemode.Client/Player/polygons.ts b/ReallifeGamemode.Client/Player/polygons.ts index ea468a4b..6c755cbf 100644 --- a/ReallifeGamemode.Client/Player/polygons.ts +++ b/ReallifeGamemode.Client/Player/polygons.ts @@ -56,18 +56,25 @@ const muellbaseVector1 = new mp.Vector3(521.6251, -2194.5068, 5.985945); const muellbaseVector2 = new mp.Vector3(454.88348, -2158.1938, 5.9788494); const muellbaseVector3 = new mp.Vector3(529.06635, -2088.4097, 8.303088); +const krankenhausVector1 = new mp.Vector3(-508.50705, -351.24368, 34); +//const krankenhausVector2 = new mp.Vector3(-437.00146, -357.10526, 32.735916 +const krankenhausVector2 = new mp.Vector3(-442.62323, -356.99185, 33); +const krankenhausVector3 = new mp.Vector3(-448.9346, -297.23972, 33.68); +const krankenhausVector4 = new mp.Vector3(-504.952, -315.21698, 35.04881); + const polygon_busbase = polygons.add([busbaseVector1, busbaseVector2, busbaseVector3, busbaseVector4], 15, false, [255, 155, 0, 255], 0); const polygon_stadthalle = polygons.add([stadthalleVector1, stadthalleVector2, stadthalleVector3, stadthalleVector4], 15, false, [255, 155, 0, 255], 0); const polygon_fahrschule = polygons.add([fahrschuleVector1, fahrschuleVector2, fahrschuleVector3, fahrschuleVector4, fahrschuleVector5], 15, false, [255, 155, 0, 255], 0); const polygon_pilotAnfaenger = polygons.add([pilotAnfaengerVector1, pilotAnfaengerVector2, pilotAnfaengerVector3, pilotAnfaengerVector4], 15, false, [255, 155, 0, 255], 0); const polygon_pilotProfi = polygons.add([pilotProfiVector1, pilotProfiVector2, pilotProfiVector3, pilotProfiVector4], 15, false, [255, 155, 0, 255], 0); const polygon_muellbase = polygons.add([muellbaseVector1, muellbaseVector2, muellbaseVector3], 15, false, [255, 155, 0, 255], 0); +const polygon_krankenhaus = polygons.add([krankenhausVector1, krankenhausVector2, krankenhausVector3, krankenhausVector4], 50, false, [255, 155, 0, 255], 0); const polygon_prison = polygons.add([prisonVector1, prisonVector2, prisonVector3, prisonVector4, prisonVector5, prisonVector6, prisonVector7, prisonVector8, prisonVector9, prisonVector10, prisonVector11, prisonVector12, prisonVector13, prisonVector14, prisonVector15, prisonVector16, prisonVector17, prisonVector18, prisonVector19, prisonVector20, prisonVector21, prisonVector22, prisonVector23, prisonVector24], 40, false, [255, 155, 0, 255], 0); -export let listNoDMZones = [polygon_busbase, polygon_stadthalle, polygon_fahrschule, polygon_pilotAnfaenger, polygon_pilotProfi, polygon_muellbase]; +export let listNoDMZones = [polygon_busbase, polygon_stadthalle, polygon_fahrschule, polygon_pilotAnfaenger, polygon_pilotProfi, polygon_muellbase, polygon_krankenhaus]; export let isInAnyNoDMPolygon; export default function polygonHandler() {