Originally Posted by
M1SHAKE
Keys, about the player keys, there is a plugin who shows how many keys they have
Try this
Code:
using Turbo.Plugins;
using Turbo.Plugins.Default;
namespace Turbo.plugins.User
{
class GreaterRiftKeystones : BasePlugin, IInGameTopPainter
{
public IFont TextFont { get; set; }
public GreaterRiftKeystones() { Enabled = true; }
public override void Load(IController hud)
{
base.Load(hud);
var textColor = SharpDX.Color.CornflowerBlue;
TextFont = hud.Render.CreateFont("tahoma", 7.5f, textColor.A, textColor.R, textColor.G, textColor.B, false, false, true);
}
public void PaintTopInGame(ClipState clipState)
{
if (clipState != ClipState.BeforeClip) return;
if (Hud.Render.UiHidden) return;
foreach (var player in Hud.Game.Players)
{
if (player.HasValidActor) playerInfo(player);
}
}
void playerInfo(IPlayer player)
{
string text = player.Materials?.GreaterRiftKeystone.ToString();
if (text != null)
{
var layout = TextFont.GetTextLayout(text);
var portraitRect = player.PortraitUiElement.Rectangle;
TextFont.DrawText(layout, portraitRect.Right, portraitRect.Top);
}
}
}
}