[Tutorial] ChangeVehiclePaintjob Tutorial
#1

The ChangeVehiclePaintjob is a function for change the paintjob of vehicles, for example, in SinglePlayer if you have a Sultan and you go in a Well Arch Angel.

This is the function:
ChangeVehiclePaintjob(vehicleid, paintjobid);

vehicleid : Is the id of vehicle do you want change the paintjob.
paintjobid : Is the id of the paintjob, the paintjob IDs are this:

0=Paintjob 1
1=Paintjob 2
2=Paintjob 3

This is an example how to use this function.

Code:
	if (strcmp("/paintjob", cmdtext, true, 8) == 0) //This is the cmd, this line let to the player when type this to use the command.
	{
	if(IsPlayerInAnyVehicle(playerid))   //This check if you are in a vehicle
	{
		ChangeVehiclePaintjob(GetPlayerVehicleID(playerid), 0); //The GetPlayerVehicleID(playerid) get the carid of the car, and the 0 restores the paintjob.
		return 1;
	}
        }
See later.
Reply


Messages In This Thread
ChangeVehiclePaintjob Tutorial - by JustLuca - 22.01.2012, 17:06
Re: ChangeVehiclePaintjob Tutorial - by System64 - 22.01.2012, 17:09
Re: ChangeVehiclePaintjob Tutorial - by JustLuca - 22.01.2012, 17:25
Re: ChangeVehiclePaintjob Tutorial - by Konstantinos - 22.01.2012, 17:27

Forum Jump:


Users browsing this thread: 1 Guest(s)