[CODE]GM.Name = "RockyPG" //What is your Gamemode's name?
GM.Author = "Rocky" // Who authored it?
GM.Email = "--" //Your email?
GM.Website = "--" //Website, only if you feel it
DeriveGamemode( "sandbox" )
team.SetUp( 1, "Guest", Color( 125, 125, 125, 255 ) )
team.SetUp( 2, "Alpha", Color( 255, 0, 0, 255 ) )
team.SetUp( 3, "Bravo", Color( 0, 0, 255, 255 ) )
team.SetUp( 4, "Joining", Color( 0, 0 , 0, 255 ) )
function myhud()
ply = LocalPlayer()
DrExp = tostring(ply:GetNWInt("exp"))
ActvWeap = ply:GetActiveWeapon()
if (CLIENT) then
draw.DrawText( "ClipSize: "..tostring(ActvWeap:ClipSize()), "Trebuchet24", ScrW()-40, ScrH()-150, Color(0,64,128,255), 2 )
draw.DrawText( "FireRate: "..tostring(ActvWeap:Delay()), "Trebuchet24", ScrW()-40, ScrH()-175, Color(0,64,128,255), 2 )
draw.DrawText( "Damage: "..tostring(ActvWeap:Damage()), "Trebuchet24", ScrW()-40, ScrH()-200, Color(0,64,128,255), 2 )
draw.DrawText( "Accuracy: "..tostring(ActvWeap:Cone()), "Trebuchet24", ScrW()-40, ScrH()-225, Color(0,64,128,255), 2 )
draw.DrawText( ActvWeap:GetPrintName(), "Trebuchet24", ScrW()-40, ScrH()-275, Color(255,64,64,255), 2 )
draw.DrawText( "Experience: " .. DrExp, "Trebuchet24", ScrW()-40, ScrH()-325, Color(255,64,64,255), 2 )
end
end
hook.Add("HUDPaint", "myhud", myhud)
function hidehud(name)
for k, v in pairs{"CHudHealth", "CHudBattery", "CHudAmmo", "CHudSecondaryAmmo"} do
if name == v then return false end
end
end
hook.Add("HUDShouldDraw", "hidehud", hidehud)[/CODE]
As you can see i want to display the properties of weapons on the hud my problem is they keep returning nil does anyone know the correct way to get those values?
Sorry, you need to Log In to post a reply to this thread.