All pastes #428716 Raw Edit

Anonymous

public lua v1 · immutable
·published 2007-04-07 19:41 UTC
rendered paste body
function XeraHud()    local client = LocalPlayer()    if !client:Alive() then return end        if(client:GetActiveWeapon() == NULL or client:GetActiveWeapon() == "Camera") then return end        local data = {}              data.mainColour = Color(53,53,53,100)              data.health = client:Health()              data.ammoleft = client:GetActiveWeapon():Clip1()              data.ammoextra = client:GetAmmoCount(client:GetActiveWeapon():GetPrimaryAmmoType())              data.secondaryammo = client:GetAmmoCount(client:GetActiveWeapon():GetSecondaryAmmoType())              data.text = "HP: "..data.health.." 1: "..data.ammoleft.."/"..data.ammoextra.." 2: "..data.secondaryammo        draw.WordBox( 8, ScrW() / 2 - 100, ScrH() / 2, data.text, "ScoreboardText", data.mainColour, Color(255,255,255,255) )         draw.SimpleText("+", "ScoreboardText", ScrW() / 2, ScrH() / 2, Color(255,255,255,255),1,1) endhook.Add("HUDPaint","XerasHud",XeraHud)function HudShouldDrawHuh(name)    if (string.find(name,"CHud")) then        return false    else        Msg(name.."\n")        return true    endendhook.Add("HUDShouldDraw", "XerasHudShouldDraw", HudShouldDrawHuh)