Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using Turbo.Plugins.Default;
- //by JackCeparou
- namespace Turbo.Plugins.glq
- {
- public class GLQ_PlayerGhost : BasePlugin, IInGameTopPainter
- {
- private IBrush bgBrush;
- private bool IsGhost;
- private bool Dead;
- public string DeathSymbol { get; set; }
- public IFont TextFontDeath { get; set; }
- public GLQ_PlayerGhost()
- {
- Enabled = true;
- }
- public override void Load(IController hud)
- {
- base.Load(hud);
- Dead = false;
- bgBrush = Hud.Render.CreateBrush(255, 0, 0, 0, 0);
- DeathSymbol = "\u271F"; //✟
- TextFontDeath = Hud.Render.CreateFont("tahoma", 35, 120, 255, 255, 255, true, false, true);
- }
- public void PaintTopInGame(ClipState clipState)
- {
- if (clipState != ClipState.BeforeClip) return;
- var layout = TextFontDeath.GetTextLayout(DeathSymbol);
- foreach (var player in Hud.Game.Players)
- {
- if (player.IsDeadSafeCheck)
- {
- var portrait = player.PortraitUiElement.Rectangle;
- var x = portrait.Left+ portrait.Width;
- var y = portrait.Top+ portrait.Height/4;
- TextFontDeath.DrawText(layout, x, y);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement