-
Notifications
You must be signed in to change notification settings - Fork 37
InCarSync
Nexius edited this page Mar 14, 2020
·
34 revisions
Destination:
Incoming/Outcoming
Description:
Called every time a player updates his state in vehicle as a driver.
Parameters (for incoming packet):
| Value type | Parameter |
|---|---|
| PR_UINT8 | packetId |
| PR_UINT16 | vehicleId |
| PR_UINT16 | lrKey |
| PR_UINT16 | udKey |
| PR_UINT16 | keys |
| PR_FLOAT4 | quaternion |
| PR_FLOAT3 | position |
| PR_FLOAT3 | velocity |
| PR_FLOAT | vehicleHealth |
| PR_UINT8 | playerHealth |
| PR_UINT8 | armour |
| PR_BITS (2) | additionalKey |
| PR_BITS (6) | weaponId |
| PR_UINT8 | sirenState |
| PR_UINT8 | landingGearState |
| PR_UINT16 | trailerId |
| PR_FLOAT | trainSpeed |
Related SA-MP callbacks:
- OnPlayerUpdate (when player state is PLAYER_STATE_DRIVER)
Example (as incoming packet):
const VEHICLE_SYNC = 200;
IPacket:VEHICLE_SYNC(playerid, BitStream:bs)
{
new inCarData[PR_InCarSync];
BS_IgnoreBits(bs, 8);
BS_ReadInCarSync(bs, inCarData);
//Anything you want to see here
return 1;
}
- Refer to BrunoBM16's RPC and Packet lists