OnVehiclePaintjob

From SA-MP Wiki

Jump to: navigation, search


Description:

Called when a player changes the paintjob of their vehicle (in a modshop).


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


Return Values:

This callback does not handle returns. Returning 0 won't deny the paintjob change.


Image:32px-Ambox_warning_orange.png

Note

Paintjobs are not the same as normal vehicle colors. They are textures applied to the vehicle, for example flames down the side.


Example Usage:

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;
}
Image:32px-Ambox_warning_orange.png

Note

This is called when a paintjob is viewed in modshops (before a player actually pays for it).


Related Functions

The following functions might be useful, as they're related to this callback in one way or another.


Related Callbacks

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

Personal tools
In other languages