Skip to main content

Utils

Index

Functions

getClosestPlayer

  • getClosestPlayer(options: { pos: IVector3; range?: number }): Player | null
  • Finds the closest player (if any) from alt.Player.all.

    pos - From which position to look for the nearest player.

    range - In which range to search for the nearest vehicle. Defaults to Infinity.

getClosestVehicle

  • getClosestVehicle(options: { pos: IVector3; range?: number }): Vehicle | null
  • Finds the closest vehicle (if any) from alt.Vehicle.all.

    pos - From which position to look for the nearest vehicle.

    range - In which range to search for the nearest vehicle. Defaults to Infinity.