#1

Hello there, I was wondering the following:

I recently made a script which used a "for" to link some vehicles to an interior.

It was something like this:

Код:
for(new i; i >= 10; i++)
{
  LinkVehicleToInterior(rVehicles[i], 9);
  SetVehicleVirtualWorld(rVehicles[i], 8);
}
The thing is that it didn't work. The vehicles didn't link to the damn interior or the virtual world. Desperating.

When I removed the for and did it all like this
Код:
LinkVehicleToInterior(rVehicles[0], 9);
LinkVehicleToInterior(rVehicles[1], 9);
LinkVehicleToInterior(rVehicles[2], 9);
LinkVehicleToInterior(rVehicles[3], 9);

//etc.
Surprisingly it worked. Why does this happen?
Reply


Messages In This Thread
Fors - by Ignaciodmr - 13.05.2017, 16:10
Re: Fors - by GoldenLion - 13.05.2017, 16:15
Re: Fors - by Vince - 13.05.2017, 16:16
Respuesta: Fors - by Ignaciodmr - 13.05.2017, 16:19

Forum Jump:


Users browsing this thread: 1 Guest(s)