Skip to content
M2O Scripting APIScripting reference
GuideMaintainer authored

Vehicles

Vehicles in Mafia II are identified by a numeric model ID. Use the table below when spawning a vehicle, changing its model, or checking which car a player is currently driving.

Vehicle spawning is an authoritative server operation. M2O creates the vehicle on the server and replicates it to connected players, including players who stream it in later.

Call Vehicle.spawn(modelId, position, rotation) from a server resource:

const p = player.position;
const vehicle = Vehicle.spawn(
32, // model id: see the table below
new Vector3(p.x + 4, p.y, p.z), // position (optional)
Quaternion.fromEuler(0, 0, 90) // rotation (optional; Euler Vector3 also accepted)
);

The first argument is an ID from this page, or a model name. Cars a server streams are not listed here: they take IDs after the stock ones and are spawned by name (see Streamed content). See the vehicles guide for the full state surface (color, wheels, fuel, locking, and more) once the vehicle is spawned.

ID Preview
1 Vehicle ID 1
2 Vehicle ID 2
3 Vehicle ID 3
4 Vehicle ID 4
5 Vehicle ID 5
6 Vehicle ID 6
7 Vehicle ID 7
8 Vehicle ID 8
9 Vehicle ID 9
10 Vehicle ID 10
11 Vehicle ID 11
12 Vehicle ID 12
13 Vehicle ID 13
14 Vehicle ID 14
15 Vehicle ID 15
16 Vehicle ID 16
17 Vehicle ID 17
18 Vehicle ID 18
19 Vehicle ID 19
20 Vehicle ID 20
21 Vehicle ID 21
22 Vehicle ID 22
23 Vehicle ID 23
24 Vehicle ID 24
25 Vehicle ID 25
26 Vehicle ID 26
27 Vehicle ID 27
28 Vehicle ID 28
29 Vehicle ID 29
30 Vehicle ID 30
31 Vehicle ID 31
32 Vehicle ID 32
33 Vehicle ID 33
34 Vehicle ID 34
35 Vehicle ID 35
36 Vehicle ID 36
37 Vehicle ID 37
38 Vehicle ID 38
39 Vehicle ID 39
40 Vehicle ID 40
41 Vehicle ID 41
42 Vehicle ID 42
43 Vehicle ID 43
44 Vehicle ID 44
45 Vehicle ID 45
46 Vehicle ID 46
47 Vehicle ID 47
48 Vehicle ID 48
49 Vehicle ID 49
50 Vehicle ID 50
51 Vehicle ID 51
52 Vehicle ID 52
53 Vehicle ID 53
54 Vehicle ID 54
55 Vehicle ID 55
56 Vehicle ID 56
57 Vehicle ID 57