-
Notifications
You must be signed in to change notification settings - Fork 29
TrailerSync
Nexius edited this page Aug 14, 2021
·
5 revisions
Destination:
Incoming/Outgoing
Description:
Called when a player updates the position of a trailer.
Parameters (for incoming packet):
Value type | Parameter | Short description |
---|---|---|
PR_UINT8 |
packetId | The ID of the packet |
PR_UINT16 |
trailerId | The ID of the trailer synced by a player |
PR_FLOAT3 |
position | The position of the trailer on the X, Y and Z axes |
PR_FLOAT4 |
quaternion | Trailer's rotation on all axes as a quaternion (W, X, Y, Z) |
PR_FLOAT3 |
velocity | The velocity of the trailer on the X, Y and Z axes |
PR_FLOAT3 |
angularVelocity | The angular (turn) velocity of the trailer on the X, Y and Z axes |
Related SA-MP callbacks:
- OnTrailerUpdate
Example (as incoming packet):
const TRAILER_SYNC = 210;
IPacket:TRAILER_SYNC(playerid, BitStream:bs)
{
new trailerData[PR_TrailerSync];
BS_IgnoreBits(bs, 8);
BS_ReadTrailerSync(bs, trailerData);
//Anything you want to see here
return 1;
}
- Refer to BrunoBM16's RPC and Packet lists