Question regarding vehicle system
#4

Quote:
Originally Posted by ginger
Посмотреть сообщение
pawn Код:
new car[3];
new bool:check[3];
for(new i; i < 3; ++i)
{
     for(new x; x < 3; ++x)
     {
           new file[26];
           format(file, sizeof file, "carfile%i", x);
            if(fexist(file))
           {
                 if(!check[x])
                 {
                       car[i] = CreateVehicle(...);
                       check[x] = true;
                       continue;
                  }
            }
     }
}
This will skip the id of the non existing file and turn to the existing one. I am helping you on phone though.
That's not the issue I am having I can skip them non-existing vehicles but if there are 3 vehicle or more and the number two vehicle was removed then they were re-loaded. When a vehicle creates ingame id will be 2. But the variables will be loaded in 3 not 2.
Reply


Messages In This Thread
Question regarding vehicle system - by DaniceMcHarley - 18.02.2015, 14:30
Re: Question regarding vehicle system - by Misiur - 18.02.2015, 14:48
Re: Question regarding vehicle system - by Gammix - 18.02.2015, 15:02
Re: Question regarding vehicle system - by DaniceMcHarley - 19.02.2015, 07:39
Re: Question regarding vehicle system - by Gammix - 19.02.2015, 07:50
Re: Question regarding vehicle system - by DaniceMcHarley - 19.02.2015, 07:54
Re: Question regarding vehicle system - by $$inSane - 19.02.2015, 07:59
Re: Question regarding vehicle system - by DaniceMcHarley - 19.02.2015, 14:22
Re: Question regarding vehicle system - by Knappen - 19.02.2015, 15:25
Re: Question regarding vehicle system - by DaniceMcHarley - 19.02.2015, 15:52

Forum Jump:


Users browsing this thread: 3 Guest(s)