GTA Connected

Scripting => Scripting Releases => Topic started by: Vortrex on July 06, 2019, 11:56:44 PM

Title: [JS] Get Vehicles Within Range
Post by: Vortrex on July 06, 2019, 11:56:44 PM
Works both client and server-side.
function getVehiclesInRangeOfPos(pos, distance) {
    return getVehicles().filter(x => x.position.distance(pos) <= range);
}