Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- TOOL.Category = "Construction"
- TOOL.Name = "Radius Counter"
- TOOL.Command = nil
- TOOL.ConfigName = ""
- function TOOL:LeftClick(tr)
- if !self.HitPoint then
- self.HitPoint=tr.HitPos
- else
- local dist=tr.HitPos:Distance(self.HitPoint)
- local count=0
- for _,e in pairs(ents.FindInSphere(tr.HitPos, dist)) do
- if e:GetClass()=="prop_physics" then
- count=count+1
- end
- end
- self:GetOwner():ChatPrint("Count: "..count)
- self.HitPoint=nil
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement