From 1297640ea64e6937d532257c6e65c9cfbbb00ce6 Mon Sep 17 00:00:00 2001 From: VegaZ Date: Tue, 21 Apr 2020 20:00:44 +0200 Subject: [PATCH] + Only >Supporter can use chat while dead * Adjusted hospital spawn-rotation + Added regions to key-presses(preperation) --- ReallifeGamemode.Server/Events/Death.cs | 3 ++- ReallifeGamemode.Server/Events/Key.cs | 5 +++++ ReallifeGamemode.Server/Services/ChatService.cs | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ReallifeGamemode.Server/Events/Death.cs b/ReallifeGamemode.Server/Events/Death.cs index 6315f7cf..08e65f9f 100644 --- a/ReallifeGamemode.Server/Events/Death.cs +++ b/ReallifeGamemode.Server/Events/Death.cs @@ -123,7 +123,8 @@ namespace ReallifeGamemode.Server.Events { player.SetData("isDead", false); player.RemoveAllWeapons(); - NAPI.Player.SpawnPlayer(player, new Vector3(-495.45, -336.33, 34.5)); + NAPI.Player.SpawnPlayer(player, new Vector3(-495.45, -336.33, 34.5),-98.36f); + } } } diff --git a/ReallifeGamemode.Server/Events/Key.cs b/ReallifeGamemode.Server/Events/Key.cs index 741e01d4..8464dfc7 100644 --- a/ReallifeGamemode.Server/Events/Key.cs +++ b/ReallifeGamemode.Server/Events/Key.cs @@ -27,6 +27,7 @@ namespace ReallifeGamemode.Server.Events { public class Key : Script { + #region User Key [RemoteEvent("keyPress:NUM2")] public void KeyPressNUM2(Player player) { @@ -57,6 +58,7 @@ namespace ReallifeGamemode.Server.Events GroundItem.PickUpGroundItem(player); } + [RemoteEvent("keyPress:UP_ARROW")] public void KeyPressUpArrow(Player player) { @@ -550,5 +552,8 @@ namespace ReallifeGamemode.Server.Events player.TriggerEvent("ToggleVehicleMenu"); } } + #endregion + #region Faction Key + #endregion } } diff --git a/ReallifeGamemode.Server/Services/ChatService.cs b/ReallifeGamemode.Server/Services/ChatService.cs index 3679f346..6f429a58 100644 --- a/ReallifeGamemode.Server/Services/ChatService.cs +++ b/ReallifeGamemode.Server/Services/ChatService.cs @@ -38,6 +38,7 @@ namespace ReallifeGamemode.Server.Services public static void SendMessage(Player player, string message) { if (player == null) return; + if (player.GetData("isDead") == true && (!player.GetUser()?.IsAdmin(AdminLevel.SUPPORTER) ?? true)) return; player.SendChatMessage(message); }