diff --git a/ReallifeGamemode.Client/Login/main.ts b/ReallifeGamemode.Client/Login/main.ts index 484033e5..739d77f9 100644 --- a/ReallifeGamemode.Client/Login/main.ts +++ b/ReallifeGamemode.Client/Login/main.ts @@ -70,9 +70,5 @@ export default function (globalData: IGlobalData): void { globalData.InMenu = false; loginCam.setActive(false); mp.game.cam.renderScriptCams(false, false, 0, true, false); - - if (getWantedCount() === 0) { - mp.events.call("enableSpawnschutz"); - } }); } \ No newline at end of file diff --git a/ReallifeGamemode.Server/Events/Login.cs b/ReallifeGamemode.Server/Events/Login.cs index 197ccbdc..62d21e39 100644 --- a/ReallifeGamemode.Server/Events/Login.cs +++ b/ReallifeGamemode.Server/Events/Login.cs @@ -103,6 +103,11 @@ namespace ReallifeGamemode.Server.Events ChatService.HQMessage("Der Straftäter" + user.Name + " hat sich mit " + user.Wanteds + " Wanteds eingeloggt."); } + if (user.Wanteds == 0) + { + player.TriggerEvent("enableSpawnschutz"); + } + if (user.Group != null) { string msg = $"{player.Name} ist wieder online.";