SA-MP Forums Archive
Vehicle paintjob + color - 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: Vehicle paintjob + color (/showthread.php?tid=341560)



Vehicle paintjob + color - Audiophr3ak - 11.05.2012

How do i force the paintjob to be colored as vehicle at OnVehicleSpawn or CreateVehicle?
I allready tried this:

OnVehicleSpawn(vehicleid){
ChangeVehiclePaintjob(vehicleid, vInfo[vehicleid][vPJ]);
ChangeVehicleColor(vehicleid, vInfo[vehicleid][vC1], vInfo[vehicleid][vC2]);
return 1;}

Same with CreateVehicle but the paintjobs is still having standard color, not the custom one.

Updated: I tried the same but ChangeVehicleColor(vehicleid, 3, 3); and it worked. Maybe the problem is function difficulties with vInfo array?


Re: Vehicle paintjob + color - mickos - 11.05.2012

You mean when a player is in a vehicle that he use a command /pt 1 0
/pt is a command for change colour and 1 0 is colour white and colour black
Do you mean that?


Re: Vehicle paintjob + color (SOLVED) - Audiophr3ak - 11.05.2012

Im having a vehicle system which spawns player vehicles. Everything saves fine, mods, colors etc. But when the system is trying to apply a paintjob for some vehicle while loading it, the color of the car is changing to a standard paintjob color. Thats the problem.

Update: Solved. Vehicle color 1 was reseting to id 1 after OnVehicleRespray.