Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.09 KB | None | 0 0
  1.         private void createPlayerHud(Entity player)
  2.         {
  3.             HudElem health = HudElem.CreateFontString(player, "hudbig", 0.9f);
  4.             health.SetPoint("TOP RIGHT", "TOP RIGHT", -25, 0);
  5.             health.HideWhenInMenu = true;
  6.  
  7.             HudElem money = HudElem.CreateFontString(player, "hudbig", 0.9f);
  8.             money.SetPoint("TOP RIGHT", "TOP RIGHT", -25, 25); //25 original
  9.             money.HideWhenInMenu = true;
  10.  
  11.             HudElem lives = HudElem.CreateFontString(player, "hudbig", 0.9f);
  12.             lives.SetPoint("TOP RIGHT", "TOP RIGHT", -25, 50); //50 original
  13.             lives.HideWhenInMenu = true;
  14.  
  15.             OnInterval(100, () =>
  16.             {
  17.                 health.SetValue(player.Health.ToString());
  18.                 if(!_isGrace)
  19.                     money.SetText("^2Cash: " + player.GetField<int>("cash"));
  20.                 else
  21.                     money.SetText("^2Credits: " + player.GetField<int>("credits"));
  22.                 lives.SetText("^3Lives: " + player.GetField<int>("lives"));
  23.                 return true;
  24.             });
  25.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement