Tuned cars --after respawn--> normal cars
#1

Ahoi.

I placed a few tuned cars into the gta world.
If i start the server, the tuned cars are spawning at the correct places.
But if drive around and destroy the tuned car, it respawns as a normal car.

How can i fix it?

Greetings from Germany.
Reply
#2

Would be nice to see some code .

[Doppeyy
Reply
#3

Quote:
Originally Posted by ๔๏קקєyy
Would be nice to see some code .

[Doppeyy
Yea we need to see codes for can find the problem.
Reply
#4

Hereґs the code:

Код:
// Unputting Tuned Cars - by Edna_Krabapel


#include <a_samp>



public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" Tuned Cars Script by Edna_Krabapel");
	print("--------------------------------------\n");

	new Tuned_Flash;
	new Tuned_Elegy;
	new Tuned_Stratum;


	//TUNED FLASH----Autohaus//

	
	//TUNED ELEGY----Autohaus//
  Tuned_Elegy = AddStaticVehicle(562, -1945.503173, 264.846160, 35.113628, 80.839866, -1, -1, 10000);
	ChangeVehiclePaintjob(Tuned_Elegy, 1); // PaintJob
	AddVehicleComponent(Tuned_Elegy, 1034); // Exhaust
	AddVehicleComponent(Tuned_Elegy, 1171); // Front Bumper
	AddVehicleComponent(Tuned_Elegy, 1148); // Rear Bumper
	AddVehicleComponent(Tuned_Elegy, 1035); // Roof
	AddVehicleComponent(Tuned_Elegy, 1147); // Spoiler
	AddVehicleComponent(Tuned_Elegy, 1041); // Sideskirt 1
	AddVehicleComponent(Tuned_Elegy, 1039); // Sideskirt 2
	AddVehicleComponent(Tuned_Elegy, 1073); // Wheels
	AddVehicleComponent(Tuned_Elegy, 1086); // Car Stereo
	AddVehicleComponent(Tuned_Elegy, 1087); // Hidraulics
	AddVehicleComponent(Tuned_Elegy, 1010); // Nitro
	
	
	//TUNED STRATUM----Autohaus//
  Tuned_Stratum = AddStaticVehicle(561, -1947.036499, 273.078094, 35.254512, 123.773544, -1, -1, 10000);
	ChangeVehiclePaintjob(Tuned_Stratum, 0); // PaintJob
	AddVehicleComponent(Tuned_Stratum, 1064); // Exhaust
	AddVehicleComponent(Tuned_Stratum, 1155); // Front Bumper
	AddVehicleComponent(Tuned_Stratum, 1154); // Rear Bumper
	AddVehicleComponent(Tuned_Stratum, 1055); // Roof
	AddVehicleComponent(Tuned_Stratum, 1060); // Spoiler
	AddVehicleComponent(Tuned_Stratum, 1056); // Sideskirt 1
	AddVehicleComponent(Tuned_Stratum, 1062); // Sideskirt 2
	AddVehicleComponent(Tuned_Stratum, 1079); // Wheels
	AddVehicleComponent(Tuned_Stratum, 1086); // Car Stereo
	AddVehicleComponent(Tuned_Stratum, 1087); // Hidraulics
	AddVehicleComponent(Tuned_Stratum, 1010); // Nitro


	return 1;
}

public OnFilterScriptExit()
{
  print("\n--------------------------------------");
	print(" Tuned Cars Script by Edna_Krabapel");
	print("--------------------------------------\n");
	return 1;
}

Greetz
Reply
#5

ok under public OnVehicleSpawn
add your things that are like
ChangeVehiclePaintjob(Tuned_Stratum, 0); // PaintJob
AddVehicleComponent(Tuned_Stratum, 1064); // Exhaust
AddVehicleComponent(Tuned_Stratum, 1155); // Front Bumper
AddVehicleComponent(Tuned_Stratum, 1154); // Rear Bumper
AddVehicleComponent(Tuned_Stratum, 1055); // Roof
AddVehicleComponent(Tuned_Stratum, 1060); // Spoiler
AddVehicleComponent(Tuned_Stratum, 1056); // Sideskirt 1
AddVehicleComponent(Tuned_Stratum, 1062); // Sideskirt 2
AddVehicleComponent(Tuned_Stratum, 1079); // Wheels
AddVehicleComponent(Tuned_Stratum, 1086); // Car Stereo
AddVehicleComponent(Tuned_Stratum, 1087); // Hidraulics
AddVehicleComponent(Tuned_Stratum, 1010); // Nitro
Reply
#6

So i should write under public OnFilterscriptInit only the spawns?
And under a new 'part' of the filterscript named public OnVehicleSpawn i should list the parts of the Vehicle?

Thanks for your answer.


//edit:

I tried it as i thought it should be, but i get some errors...
Can you explain how to do it more exactly?
Reply
#7

yea ill give you my code as an example Here
Reply
#8

Use CreateVehicle, or AddStaticVehicleEx for doing that.
Reply
#9

virt thats not how you do it... mine works perfect so its all good lol
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)