All pastes #360568 Raw Edit

Marineios LUA

public lua v1 · immutable
·published 2007-02-17 16:01 UTC
rendered paste body
NextPrintTime = 0playerhit = "false" function HUDPaint()   if playerhit=="true" then  draw.RoundedBox(0, ((ScrW() - 2) / 2)-1, ((ScrH() - 20) / 2), 2, 20, Color(255,0,0,255) )  draw.RoundedBox(0, ((ScrW() - 20) / 2)-1, ((ScrH() - 2) / 2), 20, 2, Color(255,0,0,255) )  else  draw.RoundedBox(0, ((ScrW() - 2) / 2)-1, ((ScrH() - 20) / 2), 2, 20, Color(0,0,255,255) )  draw.RoundedBox(0, ((ScrW() - 20) / 2)-1, ((ScrH() - 2) / 2), 20, 2, Color(0,0,255,255) )  end endfunction HitDetect()trace = util.GetPlayerTrace(Player)if (trace.Entity:IsPlayer()) then	if (CurTime() >= NextPrintTime) then		GAMEMODE:AddNotify(trace.Entity:Team(), NOTIFY_GENERIC, 2 )		GAMEMODE:AddNotify(trace.Entity:Name(), NOTIFY_GENERIC, 2 )		NextPrintTime = CurTime() + 5	end	playerhit = "true"	else	playerhit = "false"	endendhook.Add( "HUDPaint", "TestPaint", HUDPaint ) hook.Add( "Think", "HitDetect", HitDetect )