vehicles.listOwn
The vehicles your gamemode created with vehicles.create. Use it after your
gamemode restarts, to find the vehicles it created before.
Renamed in 0.28 from vehicles.all; see renamed names.
Signature
Section titled “Signature”vehicles.listOwn(): readonly Entity[]Parameters
Section titled “Parameters”None.
Returns
Section titled “Returns”The vehicles, each with its id, model and position.
Example
Section titled “Example”import { vehicles } from "nativemp";
if (vehicles.listOwn().length === 0) { await vehicles.create({ model: 411, position: [2495, -1680, 13.3] }); // only the first time the gamemode starts}Related
Section titled “Related”vehicles.create: create onevehicles.listAll: every vehicle, with its current position