Skip to content

vehicleAppearanceChangeRequest

Asks your gamemode when a player’s game changes a vehicle’s look by itself: a mod shop fits a part or a paintjob, a paint shop resprays it. Vehicles your gamemode created are never asked: they always keep the look your gamemode gave them, and the player’s game is given it back. Number plates never change this way. A mod shop shows each part the player browses, so you may be asked several times while they choose. Only the player driving the vehicle is asked about; hydraulics the game fits to a lowrider by itself are kept without asking.

server.on("vehicleAppearanceChangeRequest", ({ player, vehicleId, fromAppearance, toAppearance }) => boolean | void | Promise<boolean | void>)
Name Type Description
player PlayerSnapshot The player whose game made the change.
vehicleId number The vehicle’s network ID.
fromAppearance VehicleAppearance The look every player sees now.
toAppearance VehicleAppearance The look the player’s game made.

Return false to keep the old look: the player’s game is given it back and nobody else sees the change. Any other answer keeps the new look, and vehicleAppearanceChanged follows. See how decisions work.

No paintjobs on the server’s cars.

gamemodes/my-mode.ts
import { server } from "nativemp";
server.on("vehicleAppearanceChangeRequest", ({ toAppearance }) => toAppearance.paintjob === null);