06.04.2012, 17:51
I never used DINI so I can't give you the exact thing but you can try do it .. Count how many vehicles you have and do a X times loop, where X = number of vehicles you have.
Then, format a string to open the X file of vehicle and if it exist, open it and change whatever you want from it.
I used i = 1000 because you said your vehicles path is like 1001, 1002, 1003, etc etc, correct ?
Something like this should be.
Then, format a string to open the X file of vehicle and if it exist, open it and change whatever you want from it.
pawn Код:
new str[50], count = 0;
for(new i = 1000, i<1050, i++) // We take you have 50 vehicles
{
format(str, sizeof str, "/Vehicles/%i.ini", i); // Here you format the string, with the file location.
if(fexist(str))
{
// Here should come the open file and change the variable you want. But I don't know DINI, I can't exactly give you the code
count ++;
}
printf("%i vehicles changed.", count);
}
Something like this should be.