private void OnPlayerChatted(Rocket.Unturned.Player.UnturnedPlayer player, ref UnityEngine.Color color, string message, SDG.Unturned.EChatMode chatMode, ref bool cancel)
        {
            PlayerComponent component = player.GetComponent <PlayerComponent>();

            if (component.isMuted)
            {
                cancel = true;
                UnturnedChat.Say(player, "Sorry, you are muted.", Color.red);
                return;
            }
        }
Example #2
0
 public static GunGamePlayerComponent GunGamePlayer(this UnturnedPlayer player)
 {
     return(player.GetComponent <GunGamePlayerComponent>());
 }