From 2254445e7804dcb8be8298d61c8a5b0cab0bb0c2 Mon Sep 17 00:00:00 2001 From: "michael.reiswich" Date: Wed, 31 Mar 2021 15:35:45 +0200 Subject: [PATCH] add eventchat & new positon for unjail --- ReallifeGamemode.Client/Gui/nametags.ts | 2 +- .../Commands/FactionCommands.cs | 18 +++++++++++++++++- ReallifeGamemode.Server/Wanted/Jail.cs | 2 +- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/ReallifeGamemode.Client/Gui/nametags.ts b/ReallifeGamemode.Client/Gui/nametags.ts index 9c353227..c3a1488d 100644 --- a/ReallifeGamemode.Client/Gui/nametags.ts +++ b/ReallifeGamemode.Client/Gui/nametags.ts @@ -30,7 +30,7 @@ export default function customNametags() { mp.game.graphics.drawText(player.name + " (" + player.remoteId + ")", [x, y], { font: 4, - color: [0, 95, 176, 255], //Grove //Ballas 171 0 207 //PD 0 173 255 //FIB 0 0 170 LSED 147 0 0 NR 0 166 133 Trucker 255 162 Support 0 255 255 Zivilist 255 255 255 + color: [0, 95, 176, 255], //Grove //Ballas 171 0 207 //PD 0 95 190 //FIB 0 0 170 LSED 147 0 0 NR 0 166 133 Trucker 255 162 Support 0 255 255 Zivilist 255 255 255 scale: [0.4, 0.4], outline: true, centre: false diff --git a/ReallifeGamemode.Server/Commands/FactionCommands.cs b/ReallifeGamemode.Server/Commands/FactionCommands.cs index bb926630..3b8129a4 100644 --- a/ReallifeGamemode.Server/Commands/FactionCommands.cs +++ b/ReallifeGamemode.Server/Commands/FactionCommands.cs @@ -479,9 +479,25 @@ namespace ReallifeGamemode.Server.Commands public void CmdFactionNREventchat(Player player, string onoff) { - List players = NAPI.Pools.GetAllPlayers(); + switch (onoff.ToLower()) + { + case "on": + NAPI.Pools.GetAllPlayers().ForEach(p => + { + p.SetData("eventAllowed", true); + }); + break; + case "off": + NAPI.Pools.GetAllPlayers().ForEach(p => + { + p.SetData("eventAllowed", false); + }); + break; + + } + } diff --git a/ReallifeGamemode.Server/Wanted/Jail.cs b/ReallifeGamemode.Server/Wanted/Jail.cs index 1520ce4e..b658d890 100644 --- a/ReallifeGamemode.Server/Wanted/Jail.cs +++ b/ReallifeGamemode.Server/Wanted/Jail.cs @@ -253,7 +253,7 @@ namespace ReallifeGamemode.Server.Wanted dbContext.SaveChanges(); } player.Health = 100; - player.Position = new Vector3(461.7256, -988.6035, 24.91487); + player.Position = new Vector3(427.879, -984.65, 30.71); ChatService.HQMessage("!{#8181E9}HQ: Beamter " + cop.Name + " hat " + user.Name + " aus dem Knast entlassen."); ChatService.SendMessage(player, "!{#8181E9}Der Beamte " + cop.Name + " hat dich aus dem Knast entlassen");