Difference between revisions of "GET CLOSEST CAR"
Jump to navigation
Jump to search
FiddleSticks (talk | contribs) (Created page with '{{Native |np = 6 |p1t = float |p1d = X-Coordinate |p2t = float |p2d = Y-Coordinate |p3t = float |p3d = Z-Coordinate |p4t = float |p4d = Radius |p5t …') |
|||
(3 intermediate revisions by 3 users not shown) | |||
Line 13: | Line 13: | ||
|p6t = integer | |p6t = integer | ||
|p6d = Unknown (usually 70) | |p6d = Unknown (usually 70) | ||
+ | |r = 1 | ||
+ | |rt = integer | ||
+ | |rd = id of the closest car of the specified radius/coordinates. | ||
}} | }} | ||
This function returns the closest car in the specified radius, at the specified 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.<br/> | ||
+ | '''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'') |
Latest revision as of 14:37, 26 January 2015
Number of parameters: 6 | ||
---|---|---|
Parameter # | Type | Description |
1. | float | X-Coordinate |
2. | float | Y-Coordinate |
3. | float | Z-Coordinate |
4. | float | Radius |
5. | integer | Unknown (usually 0) |
6. | integer | Unknown (usually 70) |
Return value: | ||
Type | Description | |
integer | id 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)