SA-MP Forums Archive
cars automatic tuned? how to? - 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)
+--- Thread: cars automatic tuned? how to? (/showthread.php?tid=299157)



cars automatic tuned? how to? - niels44 - 24.11.2011

hey guys,
i want to know how to make it that when u place a car in ur GM under the OnGameModeInit that when it spawns in gta server that it is automatic tuned... i know this is something with AddVehicleComponent... but where to place this and how to use it... example:
Код:
 AddStaticVehicleEx(416,2767.47753906,-648.86395264,62.84563065,109.99987793,-1,-1,15); //Ambulance
i have that car under OnGameModeInit how can i make it that it's automatic tuned when u will find it...


Re: cars automatic tuned? how to? - Pharrel - 24.11.2011

You just need to put some component in the vehicle using AddVehicleComponent...you can use this code under the AddStaticVehicle or in anywhere like a command or a public or stock, you just need to know the vehicle ID.


Re: cars automatic tuned? how to? - Kayaque - 24.11.2011

new car1;

public OnGameModeInit()
{
car1 = AddStaticVehicle...
AddVehicleComponent(car1, component);


Re: cars automatic tuned? how to? - niels44 - 24.11.2011

thnx guys i will try this


Re: cars automatic tuned? how to? - niels44 - 25.11.2011

but how to make it that 1 car has more then 1 component? i know i can do it just with adding more AddVehicleComponents but i want it that it will be like this:
Код:
	AddVehicleComponent(sultan1, 1138, 1010, 1234);
u know... but if i do it like this then i get errors but how to make it that it will work like this? becuz else my script is very long becuz i got i think like 600 or 700 cars in my gamemode so pls how to make this?


Re: cars automatic tuned? how to? - Pharrel - 25.11.2011

pawn Код:
AddVehicleComponent(sultan1, 1138);
AddVehicleComponent(sultan1, 1010);
AddVehicleComponent(sultan1, 1234);



Re: cars automatic tuned? how to? - niels44 - 25.11.2011

yes i know that but can i make it else? that i can put them after each other?