OnVehiclePaintjob

OnVehiclePaintjob

Description:
Callback OnVehiclePaintjob is called when a player previews a vehicle paintjob inside a mod shop. Watch out, this callback is not called when the player buys the paintjob.
  • Callback OnVehiclePaintjob is not called by ChangeVehiclePaintjob.
  • You might use OnVehicleChangePaintjob from vSync in order to know when the player buys the paintjob.


Parameters:
(playerid, vehicleid, paintjobid)
int playerid The ID of the player that changed the paintjob of their vehicle.
int vehicleid The ID of the vehicle that had its paintjob changed.
int paintjobid The ID of the new paintjob.


Return Values:
This callback does not handle returns. Returning 0 won't deny the paintjob change.
  • It is always called first in gamemode so returning 0 there blocks other filterscripts from seeing it.


Examples:
public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
    new string[128];
    format(string, sizeof(string), "You have changed your vehicle's paintjob to %d!", paintjobid);
    SendClientMessage(playerid, 0x33AA33AA, string);
    return 1;
}


Related Callbacks
The following callbacks might be useful as well, as they are related to this callback in one way or another.


Related Functions
The following functions may be useful, as they are related to this function in one way or another.