GET CLOSEST CAR

From GTAMods Wiki
Revision as of 14:37, 26 January 2015 by FL1K3R (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
GET_CLOSEST_CAR
Number of parameters: 6
Parameter #TypeDescription
1.floatX-Coordinate
2.floatY-Coordinate
3.floatZ-Coordinate
4.floatRadius
5.integerUnknown (usually 0)
6.integerUnknown (usually 70)
Return value:
TypeDescription
integerid of the closest car of the specified radius/coordinates.

This function returns the closest car in the specified radius, at the specified coordinates.


Note: Parameter 6, when set to 69 or 71, appears to also return emergency vehicles such as police, ambulance, and firetruck.
Also: Parameter 5 is model hash of vehicle, and if it typed in (not nil) - search only vehicles with this hash (Ex.: GET_CLOSEST_CAR(x, y, z, 20.000, 3338918751, 70, &closest_car) - returns "yeeeelow car" if it in range of Parameter 4)