27.02.2019, 10:40
The most resource intensive thing here is for sure the fexist() part. It solely depends on the disk speed which may vary at times.
I'm certain it doesn't need to check the file on every spawn, you could save that in the array as well. Especially when looping.
Furthermore you can use break; when the vehicle is found, that reduces the length of the loop.
I'm certain it doesn't need to check the file on every spawn, you could save that in the array as well. Especially when looping.
Furthermore you can use break; when the vehicle is found, that reduces the length of the loop.