All pastes #733885 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-10-12 04:46 UTC
rendered paste body
local SCAN_RANGE = 350
function ENT:Scan( )
	local scan_ents = ents.FindInSphere(self.Entity:GetPos(), SCAN_RANGE)
	if scan_ents:IsValid() then
		if scan_ents:IsPlayer() or scan_ents:IsNPC() then
			for k, v in pairs(scan_ents) do
				local LHP = 100
				if v:Health() < LHP then
					LHP = v:Health()
					return v
				end
			end
		end
	end
end