Mafia II map icons are selected with a (library, iconId) pair. Library 0 contains twelve icons addressed by IDs 1 through 12; the other available libraries contain one icon each at ID 0.
Blips are authoritative server entities. They replicate to connected players, can remain at a fixed world position, and can follow a player or vehicle.
Use Blip.create(x, y, z, library, iconId, color?, virtualWorld?) from a server resource:
const droppedBlips = [];
Core.Events.on("playerCommand", (player, command) => {
if (command !== "dropblip") return;
const position = player.position;
const blip = Blip.create(
position.x,
position.y,
position.z,
0, // Library
1, // Icon ID
5 // Objective color
);
droppedBlips.push(blip);
});
Call blip.setIcon(library, iconId) to change an existing icon. blip.attachToPlayer(player) and blip.attachToVehicle(vehicle) make it follow an entity; blip.destroy() removes it. Keep references to created blips so your resource can destroy them when they are no longer needed.
The optional color uses the game navigation palette: 0 default, 1 player, 2 enemy, 3 neutral, 4 friendly, 5 objective, 6 vehicle, 7 shop, and 8 police.
| Library | Icon ID | Preview |
|---|---|---|
0 |
1 |
![]() |
0 |
2 |
![]() |
0 |
3 |
![]() |
0 |
4 |
![]() |
0 |
5 |
![]() |
0 |
6 |
![]() |
0 |
7 |
![]() |
0 |
8 |
![]() |
0 |
9 |
![]() |
0 |
10 |
![]() |
0 |
11 |
![]() |
0 |
12 |
![]() |
1 |
0 |
![]() |
2 |
0 |
![]() |
3 |
0 |
![]() |
4 |
0 |
![]() |
5 |
0 |
![]() |
6 |
0 |
![]() |
7 |
0 |
![]() |
8 |
0 |
![]() |
9 |
0 |
![]() |
10 |
0 |
![]() |
11 |
0 |
![]() |
12 |
0 |
![]() |
13 |
0 |
![]() |
14 |
0 |
![]() |
16 |
0 |
![]() |
17 |
0 |
![]() |
18 |
0 |
![]() |
19 |
0 |
![]() |
21 |
0 |
![]() |
22 |
0 |
![]() |
23 |
0 |
![]() |
24 |
0 |
![]() |
25 |
0 |
![]() |
26 |
0 |
![]() |