Repository navigation
A3D_GetVehiclesOnScreen
imshooter edited this page Oct 17, 2026
·
1 revision
Find the vehicles on the screen of a player, nearest first, in the same virtual world and interior, leaving out the one they are in.
native A3D_GetVehiclesOnScreen(
playerid,
vehicles[],
size = sizeof (vehicles),
bool:sight = false,
Float:range = 300.0
);| Parameter | Description | Default |
|---|---|---|
playerid |
Player whose screen it is. | |
vehicles[] |
The vehicles found. | |
size |
Room in vehicles. |
sizeof (vehicles) |
bool:sight |
Whether the camera must see them, with the map and static objects in the way. | false |
Float:range |
How far from the camera to look. | 300.0 |
- The number of vehicles written.
A vehicle shows when its centre lies on the screen, within range of the camera, in the same virtual world and interior. The vehicle the viewer is in is left out. With sight, vehicles behind the map or a static object are left out too.
stock CountVehiclesInView(playerid) {
new vehicles[64];
return A3D_GetVehiclesOnScreen(playerid, vehicles, .sight = true, .range = 100.0);
}- A3D_GetPlayersOnScreen: Find the players on the screen of a player, nearest first, in the same virtual world and interior.
- A3D_GetActorsOnScreen: Find the actors on the screen of a player, nearest first, in the same virtual world.
- A3D_GetVehiclesInSphere: Find the vehicles within a distance of a point, nearest first.
3DAndreas 0.7.1 · Repository · Releases · MIT License
Guides
- Installation
- Configuration
- Physics objects
- Model settings
- World queries
- The screen
- Routes
- Navigation mesh
- Map database
- Coming from ColAndreas
- Performance
Reference
Functions