No respawn for createvehicle
#6

This could be useful, if you want all vehicles on your server never to respawn:

pawn Код:
new carro[MAX_VEHICLES];

carro[0] = CreateVehicle(modelid, Float:x, Float:y, Float:z, Float:angle, color1, color2, respawn_delay);
carro[1] = CreateVehicle(modelid, Float:x, Float:y, Float:z, Float:angle, color1, color2, respawn_delay);
carro[2] = CreateVehicle(modelid, Float:x, Float:y, Float:z, Float:angle, color1, color2, respawn_delay);
carro[3] ...

//if you want vehicle never to respawn, use -1 in respawn_delay
//and use this callback

public OnVehicleSpawn(vehicleid) {

  for(new veh; veh < MAX_VEHICLES; veh++) {
    if(vehicleid == carro[veh]) {
      DestroyVehicle(carro[veh]);
      break;
    }
  }
  return 1;
}
I think SetVehicleToRespawn wont work after this, so you need to recreate the vehicle...
whatever, have fun.
Reply


Messages In This Thread
No respawn for createvehicle - by Zafire1410 - 22.08.2009, 01:09
Re: No respawn for createvehicle - by ilikepie2221 - 22.08.2009, 01:18
Re: No respawn for createvehicle - by Zafire1410 - 22.08.2009, 01:30
Re: No respawn for createvehicle - by Eazy_Efolife - 22.08.2009, 01:31
Re: No respawn for createvehicle - by refshal - 22.08.2009, 05:38
Re: No respawn for createvehicle - by M4S7ERMIND - 22.08.2009, 08:03

Forum Jump:


Users browsing this thread: 2 Guest(s)