- Thread Author
- #1
Adding markers and checkpoints to the rage:mp server
In this tutorial, we'll look at working with markers and checkpoints in rage mp.
Markers
The mp.markers.new method is used to create a marker
We have 3 mandatory arguments:

As a standard, the marker is white, but we can change it using the optional parameters.

We can also change the direction and rotation (obviously, this will not make sense for all markers), as well as hide the marker via visible or move it to another dimension.
If necessary, we can change the properties of the marker after it has been created. All properties can be changed directly, e.g. marker.scale = 10;. The only exception is the color, which can be changed using the special setColor method:
Checkpoints
Racing

Otherwise, I don't see much difference from markers in terms of creation and parameters.
Marker / Checkpoint
Detection The main difference between markers and checkpoints is the way a player is determined to hit them. The following events are available for checkpoints:
For example,
For markers, there are no such events (at least they are not documented on Wikipedia). Therefore, it is customary to additionally create colshapes for markers - invisible areas on the map of different shapes, the intersection with which can be detected, and there are separate events for this:
We just put a colshape of the same size and shape as the marker on the same coordinates. And when a player hits a colshape, it's like hitting a marker. An example of such an implementation can be found in the lesson on creating a trucker script.
In this tutorial, we'll look at working with markers and checkpoints in rage mp.
Markers
The mp.markers.new method is used to create a marker
JavaScript:
mp.markers.new(type, position, scale,
{
direction: direction,
rotation: rotation,
color: color,
visible: visible,
dimension: dimension
});
We have 3 mandatory arguments:
- type - the appearance of the marker. A total of 45 options, a list of them can be found on the
You must be registered for see links.
- position - an object of the Vector3 type with the coordinates of the point at which the marker should be.
- scale - the size of the marker. You can make markers of different sizes by controlling this through scale.
JavaScript:
mp.markers.new(1, {x: -412.3, y: 1218.3, z: 324.7}, 2);

As a standard, the marker is white, but we can change it using the optional parameters.
JavaScript:
mp.markers.new(1, {x: -412.3, y: 1218.3, z: 324.7}, 2, {
color: [255, 0, 0, 100] // [красный, зеленый, синий, альфа]
});

We can also change the direction and rotation (obviously, this will not make sense for all markers), as well as hide the marker via visible or move it to another dimension.
If necessary, we can change the properties of the marker after it has been created. All properties can be changed directly, e.g. marker.scale = 10;. The only exception is the color, which can be changed using the special setColor method:
JavaScript:
marker.setColor(r, g, b, a);
Checkpoints
Racing
You must be registered for see links
are separated into a separate entity and are created by a different method. But in fact, they have the same set of arguments (except for rotation, they are always round and there is no point in twisting them).
JavaScript:
mp.checkpoints.new(1, {x: -412.3, y: 1218.3, z: 324.7}, 2);

Otherwise, I don't see much difference from markers in terms of creation and parameters.
Marker / Checkpoint
Detection The main difference between markers and checkpoints is the way a player is determined to hit them. The following events are available for checkpoints:
You must be registered for see links
You must be registered for see links
For example,
JavaScript:
mp.events.add("playerEnterCheckpoint", (player, checkpoint) => {
// Код сработает при попадании игрока в чекпоинт
});
For markers, there are no such events (at least they are not documented on Wikipedia). Therefore, it is customary to additionally create colshapes for markers - invisible areas on the map of different shapes, the intersection with which can be detected, and there are separate events for this:
You must be registered for see links
You must be registered for see links
We just put a colshape of the same size and shape as the marker on the same coordinates. And when a player hits a colshape, it's like hitting a marker. An example of such an implementation can be found in the lesson on creating a trucker script.