spawnschutz fix mit wanteds

This commit is contained in:
Fabian
2021-04-22 22:04:50 +02:00
parent 85c599b24a
commit cfd7b61d55
2 changed files with 5 additions and 4 deletions

View File

@@ -70,9 +70,5 @@ export default function (globalData: IGlobalData): void {
globalData.InMenu = false; globalData.InMenu = false;
loginCam.setActive(false); loginCam.setActive(false);
mp.game.cam.renderScriptCams(false, false, 0, true, false); mp.game.cam.renderScriptCams(false, false, 0, true, false);
if (getWantedCount() === 0) {
mp.events.call("enableSpawnschutz");
}
}); });
} }

View File

@@ -103,6 +103,11 @@ namespace ReallifeGamemode.Server.Events
ChatService.HQMessage("Der Straftäter" + user.Name + " hat sich mit " + user.Wanteds + " Wanteds eingeloggt."); 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) if (user.Group != null)
{ {
string msg = $"{player.Name} ist wieder online."; string msg = $"{player.Name} ist wieder online.";