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

23 lines
1.1 KiB
Lua
Raw Normal View History

2014-10-02 08:49:54 +08:00
include("shared.lua")
SWEP.PrintName = "Carpenter's Hammer"
SWEP.Description = "A simple but extremely useful tool. Allows you to hammer in nails to make barricades.\nPress SECONDARY FIRE to hammer in nail. It will be attached to whatever is behind it.\nPress RELOAD to take a nail out.\nUse PRIMARY FIRE to bash zombie brains or to repair damaged nails.\nYou get a point bonus for repairing damaged nails but a point penalty for removing another player's nails."
SWEP.ViewModelFOV = 75
function SWEP:DrawHUD()
if GetGlobalBool("classicmode") then return end
surface.SetFont("ZSHUDFontSmall")
local text = translate.Get("right_click_to_hammer_nail")
local nails = self:GetPrimaryAmmoCount()
local nTEXW, nTEXH = surface.GetTextSize(text)
draw.SimpleTextBlurry(translate.Format("nails_x", nails), "ZSHUDFontSmall", ScrW() - nTEXW * 0.5 - 24, ScrH() - nTEXH * 3, nails > 0 and COLOR_LIMEGREEN or COLOR_RED, TEXT_ALIGN_CENTER)
draw.SimpleTextBlurry(text, "ZSHUDFontSmall", ScrW() - nTEXW * 0.5 - 24, ScrH() - nTEXH * 2, COLOR_LIMEGREEN, TEXT_ALIGN_CENTER)
if GetConVarNumber("crosshair") ~= 1 then return end
self:DrawCrosshairDot()
end