26.05.2017, 18:17
Use a loop starting at 1000 ending at 1000+MAX_VEHICLES with a fexist() check inside it with the loop value formatted as the file name. If the file does not exist, create it and break the loop. If it does exist, continue the loop.