zombiesurvival-evolved/gamemodes/zombiesurvival/entities/weapons/weapon_zs_hammer/cl_init.lua

20 lines
580 B
Lua
Raw Normal View History

INC_CLIENT()
2014-10-02 08:49:54 +08:00
SWEP.ViewModelFOV = 75
function SWEP:DrawHUD()
if GetGlobalBool("classicmode") then return end
local screenscale = BetterScreenScale()
surface.SetFont("ZSHUDFont")
2014-10-02 08:49:54 +08:00
local nails = self:GetPrimaryAmmoCount()
local text = translate.Format("nails_x", nails)
2014-10-02 08:49:54 +08:00
local nTEXW, nTEXH = surface.GetTextSize(text)
draw.SimpleTextBlurry(text, "ZSHUDFont", ScrW() - nTEXW * 0.75 - 32 * screenscale, ScrH() - nTEXH * 1.5, nails > 0 and COLOR_LIMEGREEN or COLOR_RED, TEXT_ALIGN_CENTER)
2014-10-02 08:49:54 +08:00
if GetConVar("crosshair"):GetInt() ~= 1 then return end
2014-10-02 08:49:54 +08:00
self:DrawCrosshairDot()
end