Talk:IsElementInRange

From Multi Theft Auto: Wiki
Revision as of 13:31, 4 August 2012 by Wielebny (talk | contribs) (alternative version)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Consider replacing it with

function isElementInRange(theElement, x,y,z,range)
 return getDistanceBetweenPoints3D(getElementPosition(target_element), x,y,z)<=range
end

Which is shorter, cleaner and probably faster. --Wielebny 13:31, 4 August 2012 (UTC)