+ Only >Supporter can use chat while dead
* Adjusted hospital spawn-rotation + Added regions to key-presses(preperation)
This commit is contained in:
@@ -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);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@ namespace ReallifeGamemode.Server.Services
|
||||
public static void SendMessage(Player player, string message)
|
||||
{
|
||||
if (player == null) return;
|
||||
if (player.GetData<bool>("isDead") == true && (!player.GetUser()?.IsAdmin(AdminLevel.SUPPORTER) ?? true)) return;
|
||||
player.SendChatMessage(message);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user