er2.getPropPositions 4
Fills a Lua table with the positions of every map prop of a given kind inside a circle. propType is the type recorded in the prop database: environment, terrain, streets, buildings, props, vehicles, items, weapons. Handy to place objectives on actual buildings.
Return value
| Return Type | Description |
|---|---|
| Number | How many positions were written into the table. |
Parameters
| Parameter | Type | Description |
|---|---|---|
| 1 | void | Centre of the circle to search in. |
| 2 | Number | Radius of the circle, in metres. |
| 3 | string | The prop type to look for: environment, terrain, streets, buildings, props, vehicles, items, weapons. |
| 4 | Table | An empty Lua table. It is filled with the positions found. |
| 5 | Number | Optional, default 400. Stops the search once this many props have been collected, so a dense map cannot stall the script. |
Examples
No examples available.
