Advertisement
HiptonismHD

HiptonismHD's Shatpack

Dec 8th, 2016
19
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.92 KB | None | 0 0
  1. chat.AddText( Color(100, 255, 100 ), "HiptonsimHD's ShatPack loaded successfully")
  2.  
  3. // Health Display
  4. function hplabel()
  5.     if !LocalPlayer():Alive() then return end
  6.     if(LocalPlayer():GetActiveWeapon()) == NULL then return end
  7.     local hCol = Color(255 - 2.2 * LocalPlayer():Health(), 2.2 * LocalPlayer():Health(), 0, 255)
  8.     draw.SimpleText("Health: " .. LocalPlayer():Health() .. "%", "BudgetLabel", 900, ScrH() - 100, hCol, 0, 0)
  9. end
  10. hook.Add("HUDPaint", "hplabel", hplabel)
  11.  
  12. // Draw FPS
  13. function FPS()
  14. FPS = math.Round(1/RealFrameTime())
  15. draw.DrawText("FPS: " .. FPS, "BudgetLabel", 900, ScrH() - 15, Color(255, 255, 255, 255), 0)
  16. end
  17. hook.Add("HUDPaint", "FPS", FPS)
  18.  
  19. // Weapon Info
  20. function WeaponInfo()
  21. if !LocalPlayer():Alive() then return end
  22. local weapon = LocalPlayer():GetActiveWeapon()
  23.     draw.DrawText("Name: " .. weapon:GetClass() .. " | " .. weapon:GetPrintName(), "BudgetLabel", 900, ScrH() - 90, Color(255, 255, 255, 255), 0)
  24. if (weapon:Clip1() ~= -1) then
  25.     draw.DrawText("Ammo: " .. weapon:Clip1() .. " " .. LocalPlayer():GetAmmoCount(weapon:GetPrimaryAmmoType()), "BudgetLabel", 900, ScrH() - 80, Color(255, 255, 255, 255), 0)
  26. else
  27.     draw.DrawText("Ammo: " .. LocalPlayer():GetAmmoCount(weapon:GetPrimaryAmmoType()), "BudgetLabel", 900, ScrH() - 80, Color(255, 255, 255, 255), 0) -- Grenades
  28.     end
  29. draw.DrawText("Ammo Type: " .. weapon:GetPrimaryAmmoType(), "BudgetLabel", 900, ScrH() - 70, Color(255, 255, 255, 255), 0)
  30. end
  31. hook.Add("HUDPaint", "WeaponInfo", WeaponInfo)
  32.  
  33. AmmoTable = {
  34.     [1] = "item_ammo_ar2 / AR2",
  35.     [2] = "item_ammo_ar2_altfire / AR2AltFire",
  36.     [3] = "item_ammo_pistol / Pistol",
  37.     [4] = "item_ammo_smg1 / SMG",
  38.     [5] = "item_ammo_357 / 357",
  39.     [6] = "item_ammo_crossbow / Bow",
  40.     [7] = "item_box_buckshot / Shotgun",
  41.     [8] = "item_rpg_round / RPG",
  42.     [9] = "item_ammo_smg1_grenade / SGMAltFire",
  43.     [10] = "weapon_frag / Grenade",
  44.     [11] = "weapon_slam / Slam",
  45.     [12] = "weapon_alyxgun_ammo / Alyxgun",
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement