[UNSOLVED] Respawn Vehicles Modded?
#1

I have made vehicles spawn modded on my server, but when they blow up/sink, how do i make them respawn modded again?

Код:
 	
  Tuned = CreateVehicle(560,-1472.6376953125, 438.23937988281, 6.9924750328064, 268.69067382813,1,-1,60);
  AddVehicleComponent(Tuned,1026);
  AddVehicleComponent(Tuned,1027);
  AddVehicleComponent(Tuned,1028);
  AddVehicleComponent(Tuned,1032);
  AddVehicleComponent(Tuned,1080);
  AddVehicleComponent(Tuned,1138);
  AddVehicleComponent(Tuned,1141);
  AddVehicleComponent(Tuned,1171);
  ChangeVehiclePaintjob(Tuned,2);
Reply
#2

under OnVehicleSpawn

pawn Код:
public OnVehicleSpawn(vehicleid)
{
  if(vehicleid==Tuned)
  {
    //AddVehicleComponents
  }
  return 1;
}
Reply
#3

Tried that but it didnt work?


Код:
public OnVehicleSpawn(vehicleid)
{
  if(vehicleid==Tuned)
  {
     	AddVehicleComponent(Tuned,1026);
		  	AddVehicleComponent(Tuned,1027);
		  	AddVehicleComponent(Tuned,1028);
		  AddVehicleComponent(Tuned,1032);
		  AddVehicleComponent(Tuned,1080);
		  AddVehicleComponent(Tuned,1138);
		  AddVehicleComponent(Tuned,1141);
		  AddVehicleComponent(Tuned,1171);
		  ChangeVehiclePaintjob(Tuned,2);
  }
  if(vehicleid==Tuned1)
  {
     	AddVehicleComponent(Tuned,1026);
		  	AddVehicleComponent(Tuned,1027);
		  	AddVehicleComponent(Tuned,1028);
		  AddVehicleComponent(Tuned,1032);
		  AddVehicleComponent(Tuned,1080);
		  AddVehicleComponent(Tuned,1138);
		  AddVehicleComponent(Tuned,1141);
		  AddVehicleComponent(Tuned,1171);
		  ChangeVehiclePaintjob(Tuned,2);
  }
  if(vehicleid==Tuned2)
  {
     	AddVehicleComponent(Tuned,1026);
		  	AddVehicleComponent(Tuned,1027);
		  	AddVehicleComponent(Tuned,1028);
		  AddVehicleComponent(Tuned,1032);
		  AddVehicleComponent(Tuned,1080);
		  AddVehicleComponent(Tuned,1138);
		  AddVehicleComponent(Tuned,1141);
		  AddVehicleComponent(Tuned,1171);
		  ChangeVehiclePaintjob(Tuned,2);
  }
  if(vehicleid==Tuned3)
  {
     	AddVehicleComponent(Tuned,1026);
		  	AddVehicleComponent(Tuned,1027);
		  	AddVehicleComponent(Tuned,1028);
		  AddVehicleComponent(Tuned,1032);
		  AddVehicleComponent(Tuned,1080);
		  AddVehicleComponent(Tuned,1138);
		  AddVehicleComponent(Tuned,1141);
		  AddVehicleComponent(Tuned,1171);
		  ChangeVehiclePaintjob(Tuned,2);
  }
  if(vehicleid==Tuned4)
  {
     	AddVehicleComponent(Tuned,1026);
		  	AddVehicleComponent(Tuned,1027);
		  	AddVehicleComponent(Tuned,1028);
		  AddVehicleComponent(Tuned,1032);
		  AddVehicleComponent(Tuned,1080);
		  AddVehicleComponent(Tuned,1138);
		  AddVehicleComponent(Tuned,1141);
		  AddVehicleComponent(Tuned,1171);
		  ChangeVehiclePaintjob(Tuned,2);
  }
  if(vehicleid==Tuned5)
  {
     	AddVehicleComponent(Tuned,1026);
		  	AddVehicleComponent(Tuned,1027);
		  	AddVehicleComponent(Tuned,1028);
		  AddVehicleComponent(Tuned,1032);
		  AddVehicleComponent(Tuned,1080);
		  AddVehicleComponent(Tuned,1138);
		  AddVehicleComponent(Tuned,1141);
		  AddVehicleComponent(Tuned,1171);
		  ChangeVehiclePaintjob(Tuned,2);
  }
  if(vehicleid==Tuned6)
  {
     	AddVehicleComponent(Tuned,1026);
		  	AddVehicleComponent(Tuned,1027);
		  	AddVehicleComponent(Tuned,1028);
		  AddVehicleComponent(Tuned,1032);
		  AddVehicleComponent(Tuned,1080);
		  AddVehicleComponent(Tuned,1138);
		  AddVehicleComponent(Tuned,1141);
		  AddVehicleComponent(Tuned,1171);
		  ChangeVehiclePaintjob(Tuned,2);
  }
  return 1;
}
Reply
#4

I see the problem, thanks anyway. Fixed.
Reply
#5

Still doesn't work !


Код:
public OnVehicleSpawn(vehicleid)
{
  if(vehicleid==Tuned)
  {
     	AddVehicleComponent(Tuned,1026);
		  	AddVehicleComponent(Tuned,1027);
		  	AddVehicleComponent(Tuned,1028);
		  AddVehicleComponent(Tuned,1032);
		  AddVehicleComponent(Tuned,1080);
		  AddVehicleComponent(Tuned,1138);
		  AddVehicleComponent(Tuned,1141);
		  AddVehicleComponent(Tuned,1171);
		  ChangeVehiclePaintjob(Tuned,2);
  }
  if(vehicleid==Tuned1)
  {
     	AddVehicleComponent(Tuned1,1026);
		  	AddVehicleComponent(Tuned1,1027);
		  	AddVehicleComponent(Tuned1,1028);
		  AddVehicleComponent(Tuned1,1032);
		  AddVehicleComponent(Tuned1,1080);
		  AddVehicleComponent(Tuned1,1138);
		  AddVehicleComponent(Tuned1,1141);
		  AddVehicleComponent(Tuned1,1171);
		  ChangeVehiclePaintjob(Tuned1,2);
  }
  if(vehicleid==Tuned2)
  {
     	AddVehicleComponent(Tuned2,1026);
		  	AddVehicleComponent(Tuned2,1027);
		  	AddVehicleComponent(Tuned2,1028);
		  AddVehicleComponent(Tuned2,1032);
		  AddVehicleComponent(Tuned2,1080);
		  AddVehicleComponent(Tuned2,1138);
		  AddVehicleComponent(Tuned2,1141);
		  AddVehicleComponent(Tuned2,1171);
		  ChangeVehiclePaintjob(Tuned2,2);
  }
  if(vehicleid==Tuned3)
  {
     	AddVehicleComponent(Tuned3,1026);
		  	AddVehicleComponent(Tuned3,1027);
		  	AddVehicleComponent(Tuned3,1028);
		  AddVehicleComponent(Tuned3,1032);
		  AddVehicleComponent(Tuned3,1080);
		  AddVehicleComponent(Tuned3,1138);
		  AddVehicleComponent(Tuned3,1141);
		  AddVehicleComponent(Tuned3,1171);
		  ChangeVehiclePaintjob(Tuned3,2);
  }
  if(vehicleid==Tuned4)
  {
     	AddVehicleComponent(Tuned4,1026);
		  	AddVehicleComponent(Tuned4,1027);
		  	AddVehicleComponent(Tuned4,1028);
		  AddVehicleComponent(Tuned4,1032);
		  AddVehicleComponent(Tuned4,1080);
		  AddVehicleComponent(Tuned4,1138);
		  AddVehicleComponent(Tuned4,1141);
		  AddVehicleComponent(Tuned4,1171);
		  ChangeVehiclePaintjob(Tuned4,2);
  }
  if(vehicleid==Tuned5)
  {
     	AddVehicleComponent(Tuned5,1026);
		  	AddVehicleComponent(Tuned5,1027);
		  	AddVehicleComponent(Tuned5,1028);
		  AddVehicleComponent(Tuned5,1032);
		  AddVehicleComponent(Tuned5,1080);
		  AddVehicleComponent(Tuned5,1138);
		  AddVehicleComponent(Tuned5,1141);
		  AddVehicleComponent(Tuned5,1171);
		  ChangeVehiclePaintjob(Tuned5,2);
  }
  if(vehicleid==Tuned6)
  {
     	AddVehicleComponent(Tuned6,1026);
		  	AddVehicleComponent(Tuned6,1027);
		  	AddVehicleComponent(Tuned6,1028);
		  AddVehicleComponent(Tuned6,1032);
		  AddVehicleComponent(Tuned6,1080);
		  AddVehicleComponent(Tuned6,1138);
		  AddVehicleComponent(Tuned6,1141);
		  AddVehicleComponent(Tuned6,1171);
		  ChangeVehiclePaintjob(Tuned,2);
  }
  return 1;
}
Reply
#6

OnVehicleStreamIn ?
Reply
#7

Change OnVehicleSpawn to OnVehicleStreamIn?
I'm not using a vehicle streamer
Reply
#8

Quote:
Originally Posted by XxCozzaxX
Change OnVehicleSpawn to OnVehicleStreamIn?
I'm not using a vehicle streamer
https://sampwiki.blast.hk/wiki/OnVehicleStreamIn

Read.
Reply
#9

I assume that is an alternative to ongamemodeinit on this?
Reply
#10

Just put a timer.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)