/** * Tells the player that the weapon they are using does not work in pvp. */ public void TellWeaponIsIneffective() { if ((DateTime.Now - LastMessage).TotalSeconds > 2) { TshockPlayer.SendMessage("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++", Color.Red); TshockPlayer.SendMessage("That weapon does not work in PVP. Using it will cause you to do no damage!", Color.Red); TshockPlayer.SendMessage("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++", Color.Red); LastMessage = DateTime.Now; } }
/// <summary> /// Removes a projectile and tells the player that it does not work. /// </summary> /// <param name="hideDisallowedProjectiles">Whether or not to hide the projectile</param> /// <param name="projectileId">The index of the projectile</param> public void RemoveProjectileAndTellIsIneffective(int projectileId) { RemoveProjectile(projectileId); if ((DateTime.Now - LastMessage).TotalSeconds > 2) { TshockPlayer.SendMessage("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++", Color.Red); TshockPlayer.SendMessage("That projectile does not work in PVP. Using it will cause you to do no damage!", Color.Red); TshockPlayer.SendMessage("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++", Color.Red); LastMessage = DateTime.Now; } }