Skip to main content

GET_CLOSEST_CHAR

Game.GetClosestCharHash0x0F4B0239
Usage
local closestChar, charIndex = Game.GetClosestChar(centreX, centreY, centreZ, radius, scanRandomPeds, scanMissionPeds)

Trys to get closest random char to a coord.

Parameters

  • centreXnumberfloat
  • centreYnumberfloat
  • centreZnumberfloat
  • radiusnumberfloat
  • scanRandomPedsbooleanbool
  • scanMissionPedsbooleanbool

Returns

  • closestCharbooleanreturn value
  • charIndexintegerint*
Original declaration
// 0x0F4B0239
bool GET_CLOSEST_CHAR(float centreX, float centreY, float centreZ, float radius, bool scanRandomPeds, bool scanMissionPeds, int* charIndex);