My hud seems to put %s on it for some reason.

Hi!

I am currently working on a hud for DarkRP, and i basically got 2 old huds, mashed them together, and fixed their code for the new gmod.

But i am having a problem that has intrigued me.

For some reason, my hud tends to write %s on it after the text. For example:

Salary: %s%s$12

here is a picture

here’s the code:

[lua]
/---------------------------------------------------------------------------
HUD ConVars
---------------------------------------------------------------------------
/

local function formatNumber(n)
n = tonumber(n)
if (!n) then
return 0
end
if n >= 1e14 then return tostring(n) end
n = tostring(n)
sep = sep or “,”
local dp = string.find(n, “%.”) or #n+1
for i=dp-4, 1, -3 do
n = n:sub(1, i) … sep … n:sub(i+1)
end
return n
end

local ConVars = {}
local HUDWidth
local HUDHeight

CreateClientConVar(“weaponhud”, 0, true, false)
CUR = “$”
local flat = Material(“vgui/white.vtf”)
local sin,cos,rad = math.sin,math.cos,math.rad --it slightly increases the speed.
local HUDAlpha = 245
local CirclePasses = 50
local PortraitScale = ScrW() / 14
local CircleMargin = 0
local HealthCircleMargin = 7
local HealthCircleWidth = 20
local PortraitPos = Vector(PortraitScale + 20 , ScrH() - PortraitScale - CircleMargin )
DisplayPortrait = true
local MarginCircle = {}
for i=1,CirclePasses do
MarginCircle* = {x = PortraitPos.x + cos(rad(i360)/CirclePasses)PortraitScale,y = PortraitPos.y + sin(rad(i360)/CirclePasses)PortraitScale}
end
local InnerCircle = {}
for i=1,CirclePasses do
InnerCircle
= {x = PortraitPos.x + cos(rad(i
360)/CirclePasses)(PortraitScale - HealthCircleMargin),y = PortraitPos.y + sin(rad(i360)/CirclePasses)(PortraitScale - HealthCircleMargin)}
end
local HungerCircleWidth = PortraitScale - HealthCircleWidth - HealthCircleMargin 2
local HungerCircle = {}
for i=1,CirclePasses do
HungerCircle
= {x = PortraitPos.x + cos(rad(i
360)/CirclePasses)* (HungerCircleWidth),y = PortraitPos.y + sin(rad(i360)/CirclePasses) (HungerCircleWidth)}
end
local MarginCircle2 = {}
for i=1,CirclePasses do
MarginCircle2* = {x = PortraitPos.x + cos(rad(i360)/CirclePasses)(PortraitScale- HealthCircleWidth),y = PortraitPos.y + sin(rad(i360)/CirclePasses)(PortraitScale- HealthCircleWidth)}
end
local PortraitModel
local PortraitModelView

local MoneyIcon = Material(“icon16/money.png”)
local WalletIcon = Material(“icon16/briefcase.png”)
local JobIcon = Material(“icon16/user_suit.png”)
local WantedStar = Material(“icon16/user_suit.png”)

hook.Add(“InitPostEntity”, “CircularHUDInitEnts”, function()
PortraitModel = ClientsideModel(LocalPlayer():GetModel(), RENDERGROUP_OPAQUE)
PortraitModelView = PositionSpawnIcon( PortraitModel, Vector(0,0,0) )
PortraitModel:SetNoDraw( true )
PortraitModel:SetPos(Vector(0,0,0))
timer.Create( “RefreshPortrait”, 1, 0, function()
if PortraitModel:GetModel() != LocalPlayer():GetModel() then
PortraitModel = ClientsideModel(LocalPlayer():GetModel(), RENDERGROUP_OPAQUE)
PortraitModelView = PositionSpawnIcon( PortraitModel, Vector(0,0,0) )
PortraitModel:SetNoDraw( true )
PortraitModel:SetPos(Vector(0,0,0))
end
end)
end)

function DrawCircularCustomHud()
LocalPlayer().DarkRPVars = LocalPlayer().DarkRPVars or {}
LocalPlayer().DarkRPVars.Energy = LocalPlayer().DarkRPVars.Energy or 0
surface.SetMaterial(flat)

LocalPlayer().DarkRPVars = LocalPlayer().DarkRPVars or {}
local Salary =  LANGUAGE.salary .. CUR .. (LocalPlayer().DarkRPVars.salary or 0)
local Job = LANGUAGE.job .. (LocalPlayer().DarkRPVars.job or "")
local Wallet = LANGUAGE.wallet .. CUR .. (formatNumber(LocalPlayer().DarkRPVars.money) or 0)

--Armor bar
/*
surface.SetDrawColor( 0, 0, 255, HUDAlpha ) 
surface.DrawRect( PortraitScale*2, ScrH() - PortraitScale - CircleMargin, ScrW()/2 - PortraitScale*2 + PortraitScale*4, PortraitScale * 0.48 + CircleMargin / 2 )
*/

--Black Bar underneath the Circles
surface.SetDrawColor( 0,0,0, HUDAlpha )
surface.DrawRect(PortraitScale*2, ScrH() - PortraitScale - CircleMargin, ScrW()/2 - PortraitScale*2 + PortraitScale*4, PortraitScale * 0.48 + CircleMargin / 2 )


if DisplayPortrait then
    --render.SetScissorRect(0,0, ScrW(), ScrH() - PortraitScale * 0.48 - CircleMargin, true)
    --Circle behind everything
    surface.SetDrawColor( 0,0,0, HUDAlpha )
    surface.DrawPoly( MarginCircle )

    --Grey Circle Behind Health Bar
    surface.SetDrawColor( 50,50,50, HUDAlpha )
    surface.DrawPoly( InnerCircle )

    --Black Circle Behind Hunger Bar
    surface.SetDrawColor( 0,0,0, HUDAlpha )
    surface.DrawPoly( HungerCircle )

    --Character Portrait
    render.ClearStencil()
    render.SetStencilEnable( true )

    render.SetStencilFailOperation( STENCILOPERATION_KEEP )
    render.SetStencilZFailOperation( STENCILOPERATION_REPLACE )
    render.SetStencilPassOperation( STENCILOPERATION_REPLACE )
    render.SetStencilCompareFunction( STENCILCOMPARISONFUNCTION_ALWAYS )

    render.SetStencilReferenceValue( 1 )
        surface.SetDrawColor( 0,46,99, HUDAlpha )
        surface.DrawPoly( HungerCircle )
        surface.SetDrawColor( 0,0,0, 255 )
        render.SetScissorRect(0,0, ScrW(), PortraitPos.y - HungerCircleWidth + (HungerCircleWidth * 2 * (1-math.Clamp(math.ceil(LocalPlayer().DarkRPVars.Energy), 0, 100)/100)) , true)
        surface.DrawPoly( HungerCircle )
        render.SetScissorRect(0,0, ScrW(), PortraitPos.y - HungerCircleWidth + (HungerCircleWidth * 2 * (1-math.Clamp(math.ceil(LocalPlayer().DarkRPVars.Energy), 0, 100)/100)) , false)
    render.SetStencilCompareFunction( STENCILCOMPARISONFUNCTION_EQUAL )
    render.SetStencilPassOperation( STENCILOPERATION_REPLACE )

        --Hunger Display
			PortraitModel = ClientsideModel(LocalPlayer():GetModel(), RENDERGROUP_OPAQUE)
PortraitModelView = PositionSpawnIcon( PortraitModel, Vector(0,0,0) )
        cam.Start3D( PortraitModelView.origin, PortraitModelView.angles, PortraitModelView.fov, PortraitPos.x - HungerCircleWidth, PortraitPos.y -HungerCircleWidth , HungerCircleWidth*2, HungerCircleWidth*2, PortraitModelView.origin.znear, PortraitModelView.zfar )

            cam.IgnoreZ( true )
            render.SuppressEngineLighting( true )
            render.SetLightingOrigin( PortraitModel:GetPos() )
            PortraitModel:DrawModel()
            render.SuppressEngineLighting( false )
            cam.IgnoreZ( false )

        cam.End3D()
    render.SetStencilEnable( false )

    --Health Display

    surface.SetDrawColor( 0, 127, 14, 255 )
    if LocalPlayer():Health() > 0 then
        for a = 0, math.Clamp( LocalPlayer():Health() / (100/CirclePasses), 0, CirclePasses - 1 ) do
            surface.DrawTexturedRectRotated( PortraitPos.x + cos( rad( -a * 270/CirclePasses + 225 ) ) * (PortraitScale - HealthCircleWidth/2 - HealthCircleMargin), PortraitPos.y - sin( rad( -a * 270/CirclePasses + 225) ) * (PortraitScale - HealthCircleWidth/2 - HealthCircleMargin), HealthCircleWidth, 12 + sin( rad(360/CirclePasses) ) * HealthCircleWidth * 2, -a * 270/CirclePasses + 225 )
        end
    end
    
    --Armor Display

    surface.SetDrawColor( 0, 00, 255, 255 )
    if LocalPlayer():Armor() > 0 then
        for a = 0, math.Clamp( LocalPlayer():Armor() / (100/CirclePasses), 0, CirclePasses - 1 ) do
            surface.DrawTexturedRectRotated( PortraitPos.x + cos( rad( -a * 270/CirclePasses + 225 ) ) * (PortraitScale - HealthCircleWidth/2 - HealthCircleMargin), PortraitPos.y - sin( rad( -a * 270/CirclePasses + 225) ) * (PortraitScale - HealthCircleWidth/2 - HealthCircleMargin), HealthCircleWidth*0.8, 12 + sin( rad(360/CirclePasses) ) * HealthCircleWidth * 2, -a * 270/CirclePasses + 225 )
        end
    end



    --render.SetScissorRect(0,0, ScrW(), ScrH() - PortraitScale * 0.48 - CircleMargin, false)

    --Health Percentage Text
    draw.SimpleText( tostring(math.Clamp(LocalPlayer():Health(), 0, 100)) .. "%" , "Default",
     PortraitPos.x + cos( rad( -LocalPlayer():Health() / (100/CirclePasses) * 270/CirclePasses + 225 ) ) * (PortraitScale - HealthCircleWidth/2 - HealthCircleMargin),
      PortraitPos.y - sin( rad( -LocalPlayer():Health() / (100/CirclePasses) * 270/CirclePasses + 225) ) * (PortraitScale - HealthCircleWidth/2 - HealthCircleMargin),
       Color(255, 255, 255, HUDAlpha), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER )
end
surface.SetFont("DarkRPHUD2")
local w, h = surface.GetTextSize(Salary)
surface.SetDrawColor(255,255,255,255)
surface.SetMaterial(MoneyIcon)
surface.DrawTexturedRect(20 + PortraitScale*2 + 7, ScrH() - PortraitScale  - CircleMargin + 2, 16, 16)

draw.SimpleText(Wallet, "DarkRPHUD2", 20 + PortraitScale*2 + 5 + 25, ScrH() - PortraitScale - CircleMargin , Color(255,255,255,255), 0)
draw.SimpleText(Wallet, "DarkRPHUD2", 20 + PortraitScale*2 + 6 + 25, ScrH() - PortraitScale - CircleMargin + 1, Color(100,100,100,100), 0)

surface.SetMaterial(WalletIcon)
surface.DrawTexturedRect(20 + PortraitScale*2 + 7, ScrH() - PortraitScale  - CircleMargin + h + 7, 16, 16)

draw.SimpleText(Salary, "DarkRPHUD2", 20 + PortraitScale*2 + 5 + 25, ScrH() - PortraitScale - CircleMargin + h +5, Color(255,255,255,255), 0)
draw.SimpleText(Salary, "DarkRPHUD2", 20 + PortraitScale*2 + 6 + 25, ScrH() - PortraitScale - CircleMargin + h + 6, Color(100,100,100,100), 0)

local w, h = surface.GetTextSize(Job)
surface.DrawTexturedRect(ScrW()/2 - w/2 - 18-100, ScrH() - PortraitScale- CircleMargin + 10, 16, 16)
draw.SimpleText( Job , "DarkRPHUD2",ScrW()/2-100, ScrH() - PortraitScale - CircleMargin + 20, Color(255,255,255,255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER ) 
draw.SimpleText( Job , "DarkRPHUD2",ScrW()/2+1-100, ScrH() - PortraitScale - CircleMargin + 21, Color(100,100,100,100), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER )

local w, h = surface.GetTextSize("")
draw.SimpleText("", "DarkRPHUD2", ScrW()/2 + PortraitScale*2 + 5 - 25 - w, ScrH() - PortraitScale - CircleMargin + 10, Color(255,255,255,255), 0)
draw.SimpleText("", "DarkRPHUD2", ScrW()/2 + PortraitScale*2 + 6 - 25 - w, ScrH() - PortraitScale - CircleMargin + 11, Color(100,100,100,100), 0)

surface.SetDrawColor(100,100,100,HUDAlpha)
surface.SetMaterial(WantedStar)

surface.SetMaterial(flat)
surface.DrawTexturedRect( ScrW()/2 + PortraitScale*2 + 5 - 25 - w + 18 * 0, ScrH() - PortraitScale * 0.48 - CircleMargin + h + 17, 16, 16)

end
local function ReloadConVars()
ConVars = {
background = {0,0,0,100},
Healthbackground = {0,0,0,200},
Healthforeground = {140,0,0,180},
HealthText = {255,255,255,200},
Job1 = {0,0,150,200},
Job2 = {0,0,0,255},
salary1 = {0,150,0,200},
salary2 = {0,0,0,255}
}

for name, Colour in pairs(ConVars) do
	ConVars[name] = {}
	for num, rgb in SortedPairs(Colour) do
		local CVar = GetConVar(name..num) or CreateClientConVar(name..num, rgb, true, false)
		table.insert(ConVars[name], CVar:GetInt())

		if not cvars.GetConVarCallbacks(name..num, false) then
			cvars.AddChangeCallback(name..num, function() timer.Simple(0,ReloadConVars) end)
		end
	end
	ConVars[name] = Color(unpack(ConVars[name]))
end


HUDWidth = (GetConVar("HudW") or  CreateClientConVar("HudW", 240, true, false)):GetInt()
HUDHeight = (GetConVar("HudH") or CreateClientConVar("HudH", 115, true, false)):GetInt()

if not cvars.GetConVarCallbacks("HudW", false) and not cvars.GetConVarCallbacks("HudH", false) then
	cvars.AddChangeCallback("HudW", function() timer.Simple(0,ReloadConVars) end)
	cvars.AddChangeCallback("HudH", function() timer.Simple(0,ReloadConVars) end)
end

end
ReloadConVars()

local Scrw, Scrh, RelativeX, RelativeY
/---------------------------------------------------------------------------
HUD Seperate Elements
---------------------------------------------------------------------------
/
local Health = 0
local function DrawHealth()
Health = math.min(100, (Health == LocalPlayer():Health() and Health) or Lerp(0.1, Health, LocalPlayer():Health()))

local DrawHealth = math.Min(Health / GAMEMODE.Config.startinghealth, 1)
local Border = math.Min(6, math.pow(2, math.Round(3*DrawHealth)))
draw.RoundedBox(Border, RelativeX + 4, RelativeY - 30, HUDWidth - 8, 20, ConVars.Healthbackground)
draw.RoundedBox(Border, RelativeX + 5, RelativeY - 29, (HUDWidth - 9) * DrawHealth, 18, ConVars.Healthforeground)

draw.DrawText(math.Max(0, math.Round(LocalPlayer():Health())), "DarkRPHUD2", RelativeX + 4 + (HUDWidth - 8)/2, RelativeY - 32, ConVars.HealthText, 1)

-- Armor
local armor = LocalPlayer():Armor()
if armor ~= 0 then
	draw.RoundedBox(2, RelativeX + 4, RelativeY - 15, (HUDWidth - 8) * armor / 100, 5, Color(0, 0, 255, 255))
end

end

local function DrawInfo()
LocalPlayer().DarkRPVars = LocalPlayer().DarkRPVars or {}
local Salary = LANGUAGE.salary … CUR … (LocalPlayer().DarkRPVars.salary or 0)

local JobWallet =
LANGUAGE.job .. (LocalPlayer().DarkRPVars.job or "") .. "

"…
LANGUAGE.wallet … CUR … (formatNumber(LocalPlayer().DarkRPVars.money) or 0)

local wep = LocalPlayer( ):GetActiveWeapon( );

if IsValid(wep) and GAMEMODE.Config.weaponhud then
    local name = wep:GetPrintName();
	draw.DrawText("Weapon: "..name, "UiBold", RelativeX + 5, RelativeY - HUDHeight - 18, Color(255, 255, 255, 255), 0)
end

draw.DrawText(Salary, "DarkRPHUD2", RelativeX + 5, RelativeY - HUDHeight + 6, ConVars.salary1, 0)
draw.DrawText(Salary, "DarkRPHUD2", RelativeX + 4, RelativeY - HUDHeight + 5, ConVars.salary2, 0)

surface.SetFont("DarkRPHUD2")
local w, h = surface.GetTextSize(Salary)

draw.DrawText(JobWallet, "DarkRPHUD2", RelativeX + 5, RelativeY - HUDHeight + h + 6, ConVars.Job1, 0)
draw.DrawText(JobWallet, "DarkRPHUD2", RelativeX + 4, RelativeY - HUDHeight + h + 5, ConVars.Job2, 0)

end

local Page = Material(“icon16/page_white_text.png”)
local function GunLicense()
if LocalPlayer().DarkRPVars.HasGunlicense then
surface.SetMaterial(Page)
surface.SetDrawColor(255, 255, 255, 255)
surface.DrawTexturedRect(RelativeX + HUDWidth, ScrH() - 34, 32, 32)
end
end

local function Agenda()
local DrawAgenda, AgendaManager = DarkRPAgendas[LocalPlayer():Team()], LocalPlayer():Team()
if not DrawAgenda then
for k,v in pairs(DarkRPAgendas) do
if table.HasValue(v.Listeners or {}, LocalPlayer():Team()) then
DrawAgenda, AgendaManager = DarkRPAgendas[k], k
break
end
end
end
if DrawAgenda then
draw.RoundedBox(10, 10, 10, 460, 110, Color(0, 0, 0, 155))
draw.RoundedBox(10, 12, 12, 456, 106, Color(51, 58, 51,100))
draw.RoundedBox(10, 12, 12, 456, 20, Color(0, 0, 70, 100))

	draw.DrawText(DrawAgenda.Title, "DarkRPHUD1", 30, 12, Color(255,0,0,255),0)

	local AgendaText = ""
	for k,v in pairs(team.GetPlayers(AgendaManager)) do
		if not v.DarkRPVars then continue end
		AgendaText = AgendaText .. (v.DarkRPVars.agenda or "") .. "

"
end
draw.DrawText(string.gsub(string.gsub(AgendaText, “//”, "
"), "
", "
"), “DarkRPHUD1”, 30, 35, Color(255,255,255,255),0)
end
end

local VoiceChatTexture = surface.GetTextureID(“voice/icntlk_pl”)
local function DrawVoiceChat()
if LocalPlayer().DRPIsTalking then
local chbxX, chboxY = chat.GetChatBoxPos()

	local Rotating = math.sin(CurTime()*3)
	local backwards = 0
	if Rotating < 0 then
		Rotating = 1-(1+Rotating)
		backwards = 180
	end
	surface.SetTexture(VoiceChatTexture)
	surface.SetDrawColor(ConVars.Healthforeground)
	surface.DrawTexturedRectRotated(ScrW() - 100, chboxY, Rotating*96, 96, backwards)
end

end

local function LockDown()
local chbxX, chboxY = chat.GetChatBoxPos()
if util.tobool(GetConVarNumber(“DarkRP_LockDown”)) then
local cin = (math.sin(CurTime()) + 1) / 2
local chatBoxSize = math.floor(ScrH() / 4)
draw.DrawText(LANGUAGE.lockdown_started, “ScoreboardSubtitle”, chbxX, chboxY + chatBoxSize, Color(cin * 255, 0, 255 - (cin * 255), 255), TEXT_ALIGN_LEFT)
end
end

local Arrested = function() end

usermessage.Hook(“GotArrested”, function(msg)
local StartArrested = CurTime()
local ArrestedUntil = msg:ReadFloat()

Arrested = function()
	if CurTime() - StartArrested <= ArrestedUntil and LocalPlayer().DarkRPVars.Arrested then
	draw.DrawText(string.format(LANGUAGE.youre_arrested, math.ceil(ArrestedUntil - (CurTime() - StartArrested))), "DarkRPHUD1", ScrW()/2, ScrH() - ScrH()/12, Color(255,255,255,255), 1)
	elseif not LocalPlayer().DarkRPVars.Arrested then
		Arrested = function() end
	end
end

end)

local AdminTell = function() end

usermessage.Hook(“AdminTell”, function(msg)
local Message = msg:ReadString()

AdminTell = function()
	draw.RoundedBox(4, 10, 10, ScrW() - 20, 100, Color(0, 0, 0, 200))
	draw.DrawText(LANGUAGE.listen_up, "GModToolName", ScrW() / 2 + 10, 10, Color(255, 255, 255, 255), 1)
	draw.DrawText(Message, "ChatFont", ScrW() / 2 + 10, 80, Color(200, 30, 30, 255), 1)
end

timer.Simple(10, function()
	AdminTell = function() end
end)

end)

/---------------------------------------------------------------------------
Drawing the HUD elements such as Health etc.
---------------------------------------------------------------------------
/
local function DrawHUD()
Scrw, Scrh = ScrW(), ScrH()
RelativeX, RelativeY = 0, Scrh

--Background
--draw.RoundedBox(6, 0, Scrh - HUDHeight, HUDWidth, HUDHeight, ConVars.background)

--DrawHealth()
--DrawInfo()
DrawCircularCustomHud()
GunLicense()
Agenda()
DrawVoiceChat()
LockDown()

Arrested()
AdminTell()

end

/---------------------------------------------------------------------------
Entity HUDPaint things
---------------------------------------------------------------------------
/
local function DrawPlayerInfo(ply)
local pos = ply:EyePos()

pos.z = pos.z + 10 -- The position we want is a bit above the position of the eyes
pos = pos:ToScreen()
pos.y = pos.y - 50 -- Move the text up a few pixels to compensate for the height of the text

if GAMEMODE.Config.showname and not ply.DarkRPVars.wanted then
	draw.DrawText(ply:Nick(), "DarkRPHUD2", pos.x + 1, pos.y + 1, Color(0, 0, 0, 255), 1)
	draw.DrawText(ply:Nick(), "DarkRPHUD2", pos.x, pos.y, team.GetColor(ply:Team()), 1)
	draw.DrawText(LANGUAGE.health ..ply:Health(), "DarkRPHUD2", pos.x + 1, pos.y + 21, Color(0, 0, 0, 255), 1)
	draw.DrawText(LANGUAGE.health..ply:Health(), "DarkRPHUD2", pos.x, pos.y + 20, Color(255,255,255,200), 1)
end

if GAMEMODE.Config.showjob then
	local teamname = team.GetName(ply:Team())
	draw.DrawText(ply.DarkRPVars.job or teamname, "DarkRPHUD2", pos.x + 1, pos.y + 41, Color(0, 0, 0, 255), 1)
	draw.DrawText(ply.DarkRPVars.job or teamname, "DarkRPHUD2", pos.x, pos.y + 40, Color(255, 255, 255, 200), 1)
end

if ply.DarkRPVars.HasGunlicense then
	surface.SetMaterial(Page)
	surface.SetDrawColor(255,255,255,255)
	surface.DrawTexturedRect(pos.x-16, pos.y + 60, 32, 32)
end

end

local function DrawWantedInfo(ply)
if not ply:Alive() then return end

local pos = ply:EyePos()
if not pos:RPIsInSight({LocalPlayer(), ply}) then return end

pos.z = pos.z + 14
pos = pos:ToScreen()

if GAMEMODE.Config.showname then
	draw.DrawText(ply:Nick(), "DarkRPHUD2", pos.x + 1, pos.y + 1, Color(0, 0, 0, 255), 1)
	draw.DrawText(ply:Nick(), "DarkRPHUD2", pos.x, pos.y, team.GetColor(ply:Team()), 1)
end

draw.DrawText(LANGUAGE.wanted.."

Reason: “…tostring(ply.DarkRPVars[“wantedReason”]), “DarkRPHUD2”, pos.x, pos.y - 40, Color(255, 255, 255, 200), 1)
draw.DrawText(LANGUAGE.wanted…”
Reason: "…tostring(ply.DarkRPVars[“wantedReason”]), “DarkRPHUD2”, pos.x + 1, pos.y - 41, Color(255, 0, 0, 255), 1)
end

/---------------------------------------------------------------------------
The Entity display: draw HUD information about entities
---------------------------------------------------------------------------
/
local function DrawEntityDisplay()
local shootPos = LocalPlayer():GetShootPos()
local aimVec = LocalPlayer():GetAimVector()

for k, ply in pairs(player.GetAll()) do
	if not ply:Alive() then continue end
	local hisPos = ply:GetShootPos()

	ply.DarkRPVars = ply.DarkRPVars or {}
	if ply.DarkRPVars.wanted then DrawWantedInfo(ply) end

	if GAMEMODE.Config.globalshow and ply ~= LocalPlayer() then
		DrawPlayerInfo(ply)
	-- Draw when you're (almost) looking at him
	elseif not GAMEMODE.Config.globalshow and hisPos:Distance(shootPos) < 400 then
		local pos = hisPos - shootPos
		local unitPos = pos:GetNormalized()
		if unitPos:Dot(aimVec) > 0.95 then
			local trace = util.QuickTrace(shootPos, pos, LocalPlayer())
			if trace.Hit and trace.Entity ~= ply then return end
			DrawPlayerInfo(ply)
		end
	end
end

local tr = LocalPlayer():GetEyeTrace()

if tr.Entity:IsOwnable() and tr.Entity:GetPos():Distance(LocalPlayer():GetPos()) < 200 then
	tr.Entity:DrawOwnableInfo()
end

end

/---------------------------------------------------------------------------
Zombie display
---------------------------------------------------------------------------
/
local function DrawZombieInfo()
if not LocalPlayer().DarkRPVars.zombieToggle then return end
for x=1, LocalPlayer().DarkRPVars.numPoints, 1 do
local zPoint = LocalPlayer().DarkRPVars[“zPoints”… x]
if zPoint then
zPoint = zPoint:ToScreen()
draw.DrawText(“Zombie Spawn (” … x … “)”, “DarkRPHUD2”, zPoint.x, zPoint.y - 20, Color(255, 255, 255, 200), 1)
draw.DrawText(“Zombie Spawn (” … x … “)”, “DarkRPHUD2”, zPoint.x + 1, zPoint.y - 21, Color(255, 0, 0, 255), 1)
end
end
end

/---------------------------------------------------------------------------
Actual HUDPaint hook
---------------------------------------------------------------------------
/
function GM:HUDPaint()
DrawHUD()
DrawZombieInfo()
DrawEntityDisplay()

self.BaseClass:HUDPaint()

end
[/lua]

Thanks!

That’s because LANGUAGE.salary has the %s in it, you’ll need to use string.format to replace %s with your “CUR … (LocalPlayer().DarkRPVars.salary or 0)”

Oh thank you!
Ill return with progress in 8-9 hours