GetWorldClosestPed
Return the closest ped, and the all founded ped
| Argument | Data Type | Needed | Default | Description |
|---|---|---|---|---|
Radius | number | - | The radius that being checked |
Returns
| Data Type | Description |
|---|---|
| ped | The closest ped |
| table | All the founded ped |
Dont need to be called every frame
Example
local closest, allped = GetWorldClosestPed(5.0)