---
title: "ChangeVehiclePaintjob | open.mp"
description: "Change a vehicle's paintjob (for plain colors see ChangeVehicleColor)."
canonical: https://omp.itsneufox.com/th/docs/scripting/functions/ChangeVehiclePaintjob
language: th
---

# ChangeVehiclePaintjob

## คำอธิบาย

Change a vehicle's paintjob (for plain colors see ChangeVehicleColor).

| Name | Description |
| --- | --- |
| vehicleid | The ID of the vehicle to change the paintjob of. |
| paintjobid | The ID of the paintjob to apply. Use 3 to remove a paintjob. |

## ส่งคืน

This function always returns 1 (success), even if the vehicle passed is not created.

## ตัวอย่าง

```c
new rand = random(3); // Will either be 0 1 or 2 (all valid)
ChangeVehiclePaintjob(GetPlayerVehicleID(playerid), rand); // changes the paintjob of the player's current vehicle to a random one
```

## ฟังก์ชั่นที่เกี่ยวข้องกัน

-   [ChangeVehicleColor](https://omp.itsneufox.com/th/docs/scripting/functions/ChangeVehicleColor): Set the color of a vehicle.
-   [OnVehiclePaintjob](https://omp.itsneufox.com/th/docs/scripting/callbacks/OnVehiclePaintjob): Called when a vehicle's paintjob is changed.
