Skip to content

playerChangedVehicleSeat

Tells your gamemode when a player moves from one seat to another without leaving the vehicle.

Renamed in 0.28 from seatChange; see renamed names.

server.on("playerChangedVehicleSeat", ({ player, vehicleId, fromSeat, toSeat }) => void)
Name Type Description
player PlayerSnapshot The player.
vehicleId number The vehicle.
fromSeat number The seat they left.
toSeat number The seat they took; 0 is the driver’s.
gamemodes/my-mode.ts
import { server } from "nativemp";
server.on("playerChangedVehicleSeat", ({ player, toSeat }) => {
if (toSeat === 0) server.log(`${player.name} took the wheel`);
});