Advertisement
Guest User

HUD fck

a guest
Oct 20th, 2014
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 4.43 KB | None | 0 0
  1. using InfinityScript;
  2. using System;
  3. using System.Runtime.InteropServices;
  4. using System.Text;
  5.  
  6. namespace Hud
  7. {
  8.     public class Hud : BaseScript
  9.     {
  10.         private HudElem top;
  11.         private HudElem nulled;
  12.         private HudElem version;
  13.         private HudElem auto;
  14.         private HudElem tab;
  15.         private HudElem tab1;
  16.  
  17.  
  18.         public Hud()
  19.         {
  20.  
  21.             OnInterval(240 * 1000, () =>
  22.             {
  23.                 this.DoSponsorHUD();
  24.                 return true;
  25.             });
  26.  
  27.             Log.Info("HUD By [Nulled.sx]");
  28.  
  29.  
  30.  
  31.             base.PlayerConnected += new Action<Entity> (ent =>
  32.             {
  33.                 AfterDelay(3000, () =>
  34.                 {
  35.                     foreach (Entity P in Players)
  36.                     {
  37.                         P.Call("iprintln", "^0[^6Nulled.sx^0] ^7is AWESOME!");
  38.                     }
  39.                 });
  40.  
  41.                 this.top = HudElem.CreateFontString(ent, "hudbig", 0.7f);
  42.                 this.top.SetPoint("TOPCENTER", "TOPCENTER", 0, 05);
  43.                 //this.info.Color = new Vector3(1f, 0.76f, 0f);
  44.                 this.top.HideWhenInMenu = false;
  45.                 this.top.SetText("^0[Welcome to ^7 Nulled ^0server FFA]");
  46.                 this.top.GlowColor = new Vector3(1f, 0f, 0.35f);
  47.                 this.top.GlowAlpha = 1f;
  48.                 this.top.Call("SetPulseFX", 56, 6050, 5500);
  49.  
  50.                 this.always();
  51.                 this.MakeHUD(ent);
  52.  
  53.  
  54.                             });
  55.  
  56.         }
  57.         private void MakeHUD(Entity player)
  58.         {
  59.             this.tab = HudElem.CreateFontString(player, "hudbig", 0.7f);
  60.             this.tab.SetPoint("CENTER", "BOTTOM", 0, -70);
  61.             this.tab.Call("settext", "nulled.sx sponsored by");
  62.             this.tab.Alpha = 0f;
  63.             this.tab.SetField("glowcolor", (new Vector3(0.2f, 1f, 0.8f)));
  64.             this.tab.GlowAlpha = 1f;
  65.             this.tab1 = HudElem.CreateFontString(player, "hudbig", 0.5f);
  66.             this.tab1.SetPoint("CENTER", "BOTTOM", 0, -55);
  67.             this.tab1.Call("settext", "skypegrab.net");
  68.             this.tab1.Alpha = 0f;
  69.             this.tab1.SetField("glowcolor", (new Vector3(1f, 0.0f, 0.5f)));
  70.             this.tab1.GlowAlpha = 1f;
  71.  
  72.             player.OnNotify("tab", (Action<Entity>)(ent =>
  73.             {
  74.                 this.tab.Alpha = 1;
  75.                 this.tab1.Alpha = 1;
  76.             }));
  77.             player.OnNotify("-tab", (Action<Entity>)(ent =>
  78.             {
  79.                 this.tab.Alpha = 0;
  80.                 this.tab1.Alpha = 0;
  81.             }));
  82.         }
  83.  
  84.         public void always()
  85.         {
  86.             //----------------------------------------- HUD 2 ---------------------------------------------------
  87.             this.nulled = HudElem.CreateServerFontString("hudbig", 0.5f);
  88.             this.nulled.SetPoint("BOTTOMRIGHT", "BOTTOMRIGHT", 0, 0);
  89.             //this.info.Color = new Vector3(0.98f, 0.16f, 0.38f);
  90.             this.nulled.HideWhenInMenu = false;
  91.             this.nulled.SetText("^0Nulled.sx");
  92.             this.nulled.GlowColor = new Vector3(0f, 1f, 1f);
  93.             this.nulled.GlowAlpha = 1f;
  94.             //----------------------------------------- HUD 3 ---------------------------------------------------
  95.             this.version = HudElem.CreateServerFontString("hudbig", 0.5f);
  96.             this.version.SetPoint("TOPRIGHT", "TOPRIGHT", 0, 0);
  97.             //this.info.Color = new Vector3(1f, 0f, 0.35f);
  98.             this.version.HideWhenInMenu = false;
  99.             this.version.SetText("^7V^52^7.^51");
  100.             this.version.GlowColor = new Vector3(0f, 0.15f, 1f);
  101.             this.version.GlowAlpha = 1f;
  102.             //---------------------------------------------------------------------------------------------------
  103.         }
  104.         public void DoSponsorHUD()
  105.         {
  106.             this.auto = HudElem.CreateServerFontString("hudbig", 0.4f);
  107.             this.auto.SetPoint("BOTTOMCENTER", "BOTTOMCENTER", 0, 0);
  108.             //this.info.Color = new Vector3(1f, 0f, 0.35f);
  109.             this.auto.HideWhenInMenu = false;
  110.             this.auto.SetText("^0You are playing ^7in ^0[Nulled.sx]");
  111.             this.auto.GlowColor = new Vector3(0f, 1f, 0f);
  112.             this.auto.GlowAlpha = 1f;
  113.             this.auto.Call("SetPulseFX", 56, 6050, 4000);
  114.             AfterDelay(8000, () =>
  115.                 {
  116.                     auto.Call("destroy");
  117.                 });
  118.         }
  119.     }
  120.  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement