SA-MP Forums Archive
Vehicle color help QUICK! - 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 color help QUICK! (/showthread.php?tid=409739)



Vehicle color help QUICK! - LuckyPlaya` - 22.01.2013

How can i add here that my car color saves...

Код:
public LoadComponents(vehicleid)
{
    if(VehiclesMod[vehicleid][0] >= 1000 && VehiclesMod[vehicleid][0] <= 1193)
	{
	    if(GetVehicleComponentInSlot(vehicleid,GetVehicleComponentType(VehiclesMod[vehicleid][0])) != VehiclesMod[vehicleid][0])
        {
            AddVehicleComponent(vehicleid,VehiclesMod[vehicleid][0]);
        }
	}
	if(VehiclesMod[vehicleid][1] >= 1000 && VehiclesMod[vehicleid][1] <= 1193)
	{
	    if(GetVehicleComponentInSlot(vehicleid,GetVehicleComponentType(VehiclesMod[vehicleid][1])) != VehiclesMod[vehicleid][1])
        {
            AddVehicleComponent(vehicleid,VehiclesMod[vehicleid][1]);
        }
	}
	if(VehiclesMod[vehicleid][2] >= 1000 && VehiclesMod[vehicleid][2] <= 1193)
	{
	    if(GetVehicleComponentInSlot(vehicleid,GetVehicleComponentType(VehiclesMod[vehicleid][2])) != VehiclesMod[vehicleid][2])
        {
            AddVehicleComponent(vehicleid,VehiclesMod[vehicleid][2]);
        }
	}
	if(VehiclesMod[vehicleid][3] >= 1000 && VehiclesMod[vehicleid][3] <= 1193)
	{
	    if(GetVehicleComponentInSlot(vehicleid,GetVehicleComponentType(VehiclesMod[vehicleid][3])) != VehiclesMod[vehicleid][3])
        {
            AddVehicleComponent(vehicleid,VehiclesMod[vehicleid][3]);
        }
	}
	if(VehiclesMod[vehicleid][4] >= 1000 && VehiclesMod[vehicleid][4] <= 1193)
	{
	    if(GetVehicleComponentInSlot(vehicleid,GetVehicleComponentType(VehiclesMod[vehicleid][4])) != VehiclesMod[vehicleid][4])
        {
            AddVehicleComponent(vehicleid,VehiclesMod[vehicleid][4]);
        }
	}
	if(VehiclesMod[vehicleid][5] >= 1000 && VehiclesMod[vehicleid][5] <= 1193)
	{
	    if(GetVehicleComponentInSlot(vehicleid,GetVehicleComponentType(VehiclesMod[vehicleid][5])) != VehiclesMod[vehicleid][5])
        {
            AddVehicleComponent(vehicleid,VehiclesMod[vehicleid][5]);
        }
	}
	if(VehiclesMod[vehicleid][6] >= 1000 && VehiclesMod[vehicleid][6] <= 1193)
	{
	    if(GetVehicleComponentInSlot(vehicleid,GetVehicleComponentType(VehiclesMod[vehicleid][6])) != VehiclesMod[vehicleid][6])
        {
            AddVehicleComponent(vehicleid,VehiclesMod[vehicleid][6]);
        }
	}
	if(VehiclesMod[vehicleid][7] >= 1000 && VehiclesMod[vehicleid][7] <= 1193)
	{
	    if(GetVehicleComponentInSlot(vehicleid,GetVehicleComponentType(VehiclesMod[vehicleid][7])) != VehiclesMod[vehicleid][7])
        {
            AddVehicleComponent(vehicleid,VehiclesMod[vehicleid][7]);
        }
	}
	if(VehiclesMod[vehicleid][8] >= 1000 && VehiclesMod[vehicleid][8] <= 1193)
	{
	    if(GetVehicleComponentInSlot(vehicleid,GetVehicleComponentType(VehiclesMod[vehicleid][8])) != VehiclesMod[vehicleid][8])
        {
            AddVehicleComponent(vehicleid,VehiclesMod[vehicleid][8]);
        }
	}
	if(VehiclesMod[vehicleid][9] >= 1000 && VehiclesMod[vehicleid][9] <= 1193)
	{
	    if(GetVehicleComponentInSlot(vehicleid,GetVehicleComponentType(VehiclesMod[vehicleid][9])) != VehiclesMod[vehicleid][9])
        {
            AddVehicleComponent(vehicleid,VehiclesMod[vehicleid][9]);
        }
	}
	if(VehiclesMod[vehicleid][9] >= 1000 && VehiclesMod[vehicleid][10] <= 1080)
	{
	    if(GetVehicleComponentInSlot(vehicleid,GetVehicleComponentType(VehiclesMod[vehicleid][9])) != VehiclesMod[vehicleid][10])
        {
            AddVehicleComponent(vehicleid,VehiclesMod[vehicleid][10]);
        }
	}
    if(VehiclesMod[vehicleid][11] > 0)
	{
	    ChangeVehiclePaintjob(vehicleid,VehiclesMod[vehicleid][11]);
	}
	if(VehiclesMod[vehicleid][12] > 0)
	{
	    ChangeVehicleColor(vehicleid, 0, 1);
	}
	return 1;
}



Re: Vehicle color help QUICK! - FUNExtreme - 22.01.2013

You could try searching the forum. The amount of information you'll find is incredible


Re: Vehicle color help QUICK! - LuckyPlaya` - 22.01.2013

OMFG i need solution for this and not to inform me to search the forum.


AW: Vehicle color help QUICK! - Blackazur - 22.01.2013

Maybe:

https://sampforum.blast.hk/showthread.php?tid=235398


Re: Vehicle color help QUICK! - arakuta - 22.01.2013

Just get the colors ID when a vehicle respray...

Otherwise, if the vehicle don't get resprayed it will be the deafult color... So, can't got wrong XD

OnVehicleRespray

OnVehiclePaintJob