UnoccupiedSync - katursis/Pawn.RakNet GitHub Wiki
UnoccupiedSync (packetid: 209)
Destination:
Incoming/Outgoing
Description:
Called when a player updates the position of a vehicle he's not driving.
Parameters (for incoming packet):
| Value type | Parameter | Short description | 
|---|---|---|
| PR_UINT8 | packetId | The ID of the packet | 
| PR_UINT16 | vehicleId | The ID of the vehicle synced by a player | 
| PR_UINT8 | seatId | The ID of the seat if the player is a passenger (0 = not in vehicle, 1 = front passenger, 2 = backleft, 3 = backright, 4+ is for coach/bus etc. with many passenger seats) | 
| PR_FLOAT3 | roll | The roll of the vehicle on the X, Y and Z axes | 
| PR_FLOAT3 | direction | The direction of the vehicle on the X, Y and Z axes | 
| PR_FLOAT3 | position | The position of the vehicle on the X, Y and Z axes | 
| PR_FLOAT3 | velocity | The velocity of the vehicle on the X, Y and Z axes | 
| PR_FLOAT3 | angularVelocity | The angular (turn) velocity of the vehicle on the X, Y and Z axes | 
| PR_FLOAT | vehicleHealth | The health of the unoccupied vehicle | 
Related SA-MP callbacks:
- OnUnoccupiedVehicleUpdate
Example (as incoming packet):
const UNOCCUPIED_SYNC = 209;
IPacket:UNOCCUPIED_SYNC(playerid, BitStream:bs)
{
    new unoccupiedData[PR_UnoccupiedSync];
    BS_IgnoreBits(bs, 8);
    BS_ReadUnoccupiedSync(bs, unoccupiedData);
    //Anything you want to see here
    return 1;
}