22.01.2012, 17:06
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.
See later.
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; } }