Skip to content

Commit

Permalink
updated flags
Browse files Browse the repository at this point in the history
  • Loading branch information
spacevx committed Dec 25, 2023
1 parent ed737c3 commit 69c06bc
Showing 1 changed file with 23 additions and 10 deletions.
33 changes: 23 additions & 10 deletions VEHICLE/GetClosestVehicle.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,35 @@ Find the closest vehicle to specified coordinates, offering the ability to filte
**Note**: It's problably more convenient to use [GET_GAME_POOL](#_0x2B9D4F50) and check the shortest distance yourself and sort if you want by checking the vehicle type with for example [IS_THIS_MODEL_A_BOAT](#_0x45A9187928F4B9E3). The native
only going to return non police cars and motorbikes with the flag set to 70 and modelHash to 0. modelHash seems to always be 0 when not a modelHash in the scripts.
```
Conclusion: This native is not worth trying to use. Use something like this instead: pastebin.com/xiFdXa7h
Flags:
- **1**: Returns law enforcement vehicles, regardless of their natural or scripted spawn status.
- **2**: Returns vehicles that are created by a script and not naturally spawned in the world. Excludes law enforcement vehicles, helicopters, planes, or boats.
- **4**: Returns vehicles that are not created by a script (only vehicles naturally spawned in the world). Excludes law enforcement vehicles, helicopters, planes, or boats.
- **8**: Returns vehicles that contain group members (e.g., gang vehicles).
- **16**: Returns vehicles containing a player, regardless of the vehicle's type or spawn method.
- **32**: Returns vehicles containing a dead or dying pedestrian, irrespective of vehicle type or spawn method.
- **64**: Returns vehicles with pedestrians entering or exiting, without prioritizing vehicle type or spawn method.
- **128**: Performs network checks on the vehicle, possibly excluding network clones or deletable network objects.
- **256**: Checks the states of vehicle occupants, focusing on those with PedState of PED_DRIVING or PED_DEAD.
- **1024**: Strictly returns law enforcement vehicles only.
- **2048**: Allows vehicles with occupants performing scripted tasks.
- **4096**: Exclusively returns helicopters.
- **8192**: Exclusively returns boats.
- **16384**: Exclusively returns planes.
- **32768**: Allows law enforcement vehicles to be returned even if the player has a wanted level.
- **65536**: Allows vehicles with occupants performing non-default tasks.
- **131072**: Includes trailers in the search.
- **262144**: Includes blimps in the search.
- **524288**: Includes submarines in the search.
```
```
Flags:
- **0**: Returns cars and motorbikes, including those already occupied. Might also return empty vehicles.
- **2**: Returns only empty vehicles, specifically cars and motorbikes.
- **4**: Similar to flag 70, generally effective for cars and motorbikes.
- **23**: Finds cars when the player is not inside a vehicle.
- **70**: Recommended for cars and motorbikes. Does not return occupied vehicles.
- **127**: Does not return vehicles when inside cars or motorbikes. Effective when on foot or inside a helicopter (should return police cars).
- **67711**: Effective for finding cars when inside a helicopter, not when inside cars.
- **100359**: Similar to flag 70 but often returns the vehicle the player is already in.
Conclusion: This native is not worth trying to use. Use something like this instead: pastebin.com/xiFdXa7h
```
## Parameters
* **x**: X coordinate of the search location.
* **y**: Y coordinate of the search location.
Expand Down

0 comments on commit 69c06bc

Please sign in to comment.