Find Vehicles Around Player

Donnovan

Member
This commands:
Code:
position = [4550, 6200];
scanrad = 3000;
helicrashes = nearestObjects [position, ["UH1Wreck_DZ"], scanrad];

Will find all the crashed helicopters (["UH1Wreck_DZ"]), 3000 meters around the position (4550, 6200), and store the list of finds in "helicrashes".

1) POSITION TO AROUND PLAYER:

I'm seeking a way to do this search arround player position, so instead of "[4550, 6200]" i need "[ x player position, y player position]".

2) ALL VEHICLES:

Also, i'm seeking a way to do this not only for crashed helicopters, but to all vehicles, so instead of ["UH1Wreck_DZ"] i need something like ["Vehicle type 1", "Vehicle type 2", "Vehicle type 3", ...].

Any tips are apreciated.

Thanks in advance.
 
Still need to test, but i believe:

"getpos player select 0" get player X position, and
"getpos player select 1" get player Y position.
 
Back
Top