OK, this last code worked pretty well, but what I need it to do is only create one vehicle each time. Right now it is creating four cars and naming them car1, car2, car3, and car4 all at once. What I am trying to get to is to create only one car at a time and each time I execute it will name the car the next number up. Changing the 5 to a 2 in the last line will create one car each time, but names it car1 each time.
This was the code that was used:
_i = 1
#createcar
call [format["newcar%1 = ""Police_car"" createVehicle getMarkerPos format[""Marker%1""]", _i];
_i = _i + 1
? _i < 5: goto "createcar"