There's a bounding box function somewhere in the code archives I think. It may contain what you're looking for. Actually, here it is:
Function targetBox(ent) If ent=0 Return 0 If EntityInView(ent,cam)=0 Return 0 CameraProject cam,EntityX(ent),EntityY(ent),EntityZ(ent) leftmost#=ProjectedX() rightmost#=ProjectedX() topmost#=ProjectedY() bottommost#=ProjectedY() For i=1 To CountSurfaces(ent) s=GetSurface(ent,1) For v=0 To CountVertices(s)-1 TFormPoint VertexX(s,v),VertexY(s,v),VertexZ(s,v),ent,0 CameraProject cam,TFormedX(),TFormedY(),TFormedZ() If ProjectedX()<leftmost leftmost=ProjectedX() If ProjectedX()>rightmost rightmost=ProjectedX() If ProjectedY()<topmost topmost=ProjectedY() If ProjectedY()>bottommost bottommost=ProjectedY() Next Next color 200,200,200 Rect leftmost,topmost,rightmost-leftmost,bottommost-topmost,0 End Function