shorter code...
#4

pawn Код:
new
    lilgunna[4];
pawn Код:
lilgunna[0] = AddStaticVehicleEx(560, 288.13833618164, 2472.4133300781, 16.281105041504, 0.000000, -1, -1, 60); //32
lilgunna[1] = AddStaticVehicleEx(560, 284.63854980469, 2472.4951171875, 16.281105041504, 0.000000, -1, -1, 60); //33
lilgunna[2] = AddStaticVehicleEx(560, 280.38958740234, 2472.5947265625, 16.281105041504, 0.000000, -1, -1, 60); //34
lilgunna[3] = AddStaticVehicleEx(560, 276.63958740234, 2472.6826171875, 16.281105041504, 0.000000, -1, -1, 60); //35
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
  new
      i;
  for(i = 0; i < sizeof(lilgunna); i++)
  {
    if(vehicleid == lilgunna[i]) AddVehicleComponent(lilgunna[i], 1010); // Nitro
  }
  return 1;
}
You could use ******'s foreach, it's faster than normal for.
Reply


Messages In This Thread
shorter code... - by DiddyBop - 22.11.2009, 20:01
Re: shorter code... - by Kyosaur - 22.11.2009, 20:03
Re: shorter code... - by DiddyBop - 22.11.2009, 20:09
Re: shorter code... - by Correlli - 22.11.2009, 20:16
Re: shorter code... - by DiddyBop - 22.11.2009, 20:21

Forum Jump:


Users browsing this thread: 2 Guest(s)