From cfd7b61d5567d8fc48d461c6972951c71b296ac6 Mon Sep 17 00:00:00 2001 From: Fabian Date: Thu, 22 Apr 2021 22:04:50 +0200 Subject: [PATCH] spawnschutz fix mit wanteds --- ReallifeGamemode.Client/Login/main.ts | 4 ---- ReallifeGamemode.Server/Events/Login.cs | 5 +++++ 2 files changed, 5 insertions(+), 4 deletions(-) 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.";