Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- chat.AddText( Color(100, 255, 100 ), "HiptonsimHD's ShatPack loaded successfully")
- // Health Display
- function hplabel()
- if !LocalPlayer():Alive() then return end
- if(LocalPlayer():GetActiveWeapon()) == NULL then return end
- local hCol = Color(255 - 2.2 * LocalPlayer():Health(), 2.2 * LocalPlayer():Health(), 0, 255)
- draw.SimpleText("Health: " .. LocalPlayer():Health() .. "%", "BudgetLabel", 900, ScrH() - 100, hCol, 0, 0)
- end
- hook.Add("HUDPaint", "hplabel", hplabel)
- // Draw FPS
- function FPS()
- FPS = math.Round(1/RealFrameTime())
- draw.DrawText("FPS: " .. FPS, "BudgetLabel", 900, ScrH() - 15, Color(255, 255, 255, 255), 0)
- end
- hook.Add("HUDPaint", "FPS", FPS)
- // Weapon Info
- function WeaponInfo()
- if !LocalPlayer():Alive() then return end
- local weapon = LocalPlayer():GetActiveWeapon()
- draw.DrawText("Name: " .. weapon:GetClass() .. " | " .. weapon:GetPrintName(), "BudgetLabel", 900, ScrH() - 90, Color(255, 255, 255, 255), 0)
- if (weapon:Clip1() ~= -1) then
- draw.DrawText("Ammo: " .. weapon:Clip1() .. " " .. LocalPlayer():GetAmmoCount(weapon:GetPrimaryAmmoType()), "BudgetLabel", 900, ScrH() - 80, Color(255, 255, 255, 255), 0)
- else
- draw.DrawText("Ammo: " .. LocalPlayer():GetAmmoCount(weapon:GetPrimaryAmmoType()), "BudgetLabel", 900, ScrH() - 80, Color(255, 255, 255, 255), 0) -- Grenades
- end
- draw.DrawText("Ammo Type: " .. weapon:GetPrimaryAmmoType(), "BudgetLabel", 900, ScrH() - 70, Color(255, 255, 255, 255), 0)
- end
- hook.Add("HUDPaint", "WeaponInfo", WeaponInfo)
- AmmoTable = {
- [1] = "item_ammo_ar2 / AR2",
- [2] = "item_ammo_ar2_altfire / AR2AltFire",
- [3] = "item_ammo_pistol / Pistol",
- [4] = "item_ammo_smg1 / SMG",
- [5] = "item_ammo_357 / 357",
- [6] = "item_ammo_crossbow / Bow",
- [7] = "item_box_buckshot / Shotgun",
- [8] = "item_rpg_round / RPG",
- [9] = "item_ammo_smg1_grenade / SGMAltFire",
- [10] = "weapon_frag / Grenade",
- [11] = "weapon_slam / Slam",
- [12] = "weapon_alyxgun_ammo / Alyxgun",
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement