SA-MP Forums Archive
Create a vehicle without respawn - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Create a vehicle without respawn (/showthread.php?tid=125406)



Create a vehicle without respawn - Rauminator - 03.02.2010

Hey guys,
Iam Rauminator and I worked with programming Languages like c, c#, vb, php, now Iam working on a Reallife Script for our Forum.
I want to be realistic as much as i can so my idea is to buy vehicles but if they get destroyed the mustn't respawn again.

Effect: The drivers will drive more carfully on the San Fierro streets :P

I had a Idea but it wont work:
Код:
	CreateVehicle(463,-1991.6982,241.2604,34.7123,174.2835,7,7,0); // autohaus10



Re: Create a vehicle without respawn - Torran - 03.02.2010

AddStaticVehicle should do that ( I Think )

Wait!

Use OnVehicleDeath and then DestroyVehicle,
Might work


Re: Create a vehicle without respawn - thiaZ_ - 03.02.2010

pawn Код:
new XVehicle;

public OnGameModeInit()
{
  XVehicle = CreateVehicle(Float:X,Float:Y,Float:Z,Float:A,Color1,Color2,respawn_delay);
  return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
  if(vehicleid == XVehicle)
  {
    DestroyVehicle(vehicleid);
  }
  return 1;
}
that should do it