Skip to content
Nexius edited this page Sep 13, 2021 · 20 revisions

MarkersSync (packetid: 208)

Destination:
Outgoing

Description:
Called when one of the players updates his position, otherwise about once every 3 seconds.

Parameters:

Value type Parameter Short description
PR_UINT8 packetId The ID of the packet
PR_INT32 numberOfPlayers The number of players whose map markers need to be updated
PR_UINT16 playerId The ID of the player whose map marker needs to be updated
PR_CBOOL isActive Whether the player's marker is active or not
PR_INT16 playerPositionX The position of a marker on the X axis (only makes sense if isActive is true)
PR_INT16 playerPositionY The position of a marker on the Y axis (only makes sense if isActive is true)
PR_INT16 playerPositionZ The position of a marker on the Z axis (only makes sense if isActive is true)

Note:
playerId, isActive, playerPositionX, playerPositionY and playerPositionZ are duplicated a few times according to the value in numberOfPlayers, for each player in the order.

Example:

const MARKERS_SYNC = 208;

OPacket:MARKERS_SYNC(playerid, BitStream:bs)
{
    new markersSync[PR_MarkersSync];

    BS_IgnoreBits(bs, 8);
    BS_ReadMarkersSync(bs, markersSync);

    //Anything you want to see here

    return 1;
}