All pastes #76513 Raw Edit

Untitled

public text v1 · immutable
·published 2006-07-01 18:52 UTC
rendered paste body
function GM:PB_DrawSelectionBox(ent,colour)

		local max,min = ent:GetRenderBounds()
		max = ent:LocalToWorld(max):ToScreen()
		min = ent:LocalToWorld(min):ToScreen()

		min.x = (min.x / ScrW()) * (ScrW()-200)
		max.x = (max.x / ScrW()) * (ScrW()-200)

		surface.SetDrawColor( 30, 200, 30, 255 )
		surface.DrawOutlinedRect( min.x, min.y, max.x-min.x, max.y-min.y )					-- Draw the box
		surface.DrawOutlinedRect( min.x-1, min.y-1, max.x-min.x+2, max.y-min.y+2 )			-- Make it thicker
end