Skip to main content

GET_CLOSEST_CAR

Game.GetClosestCarHash0x2CB303F8
Usage
local closestCar = Game.GetClosestCar(centreX, centreY, centreZ, radius, modelHashKey, searchFlags)

Get the closet random vehicle to a coord.

Parameters

  • centreXnumberfloat
  • centreYnumberfloat
  • centreZnumberfloat
  • radiusnumberfloat
  • modelHashKeyintegerint
  • searchFlagsintegerint

Returns

  • closestCarintegerreturn value
Original declaration
// 0x2CB303F8
int GET_CLOSEST_CAR(float centreX, float centreY, float centreZ, float radius, int modelHashKey, int searchFlags);