Unspawn all cars
#4

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.

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);
}
I used i = 1000 because you said your vehicles path is like 1001, 1002, 1003, etc etc, correct ?

Something like this should be.
Reply


Messages In This Thread
Unspawn all cars - by HondaCBR - 06.04.2012, 16:07
Re: Unspawn all cars - by antonio112 - 06.04.2012, 16:27
Re: Unspawn all cars - by HondaCBR - 06.04.2012, 16:46
Re: Unspawn all cars - by antonio112 - 06.04.2012, 17:51
Re: Unspawn all cars - by HondaCBR - 06.04.2012, 18:00
Re: Unspawn all cars - by Ash. - 06.04.2012, 18:02
Re: Unspawn all cars - by HondaCBR - 06.04.2012, 18:18
Re: Unspawn all cars - by HondaCBR - 06.04.2012, 18:34
Re: Unspawn all cars - by antonio112 - 06.04.2012, 19:19
Re: Unspawn all cars - by HondaCBR - 06.04.2012, 19:52

Forum Jump:


Users browsing this thread: 1 Guest(s)