Skip to content
urShadow edited this page Aug 29, 2017 · 12 revisions

Natives

playerid == -1 => send to all players (broadcast)

native BS_RPC(BitStream:bs, playerid, rpcid, PR_PacketPriority:priority = PR_HIGH_PRIORITY, PR_PacketReliability:reliability = PR_RELIABLE_ORDERED);
native BS_Send(BitStream:bs, playerid, PR_PacketPriority:priority = PR_HIGH_PRIORITY, PR_PacketReliability:reliability = PR_RELIABLE_ORDERED);

native BitStream:BS_New();
native BS_Delete(&BitStream:bs);

native BS_Reset(BitStream:bs);
native BS_ResetReadPointer(BitStream:bs);
native BS_ResetWritePointer(BitStream:bs);
native BS_IgnoreBits(BitStream:bs, number_of_bits);
native BS_SetWriteOffset(BitStream:bs, offset);
native BS_GetWriteOffset(BitStream:bs, &offset);
native BS_SetReadOffset(BitStream:bs, offset);
native BS_GetReadOffset(BitStream:bs, &offset);
native BS_GetNumberOfBitsUsed(BitStream:bs, &number);
native BS_GetNumberOfBytesUsed(BitStream:bs, &number);
native BS_GetNumberOfUnreadBits(BitStream:bs, &number);

native BS_WriteValue(BitStream:bs, {PR_ValueType, Float, _}:...);
native BS_ReadValue(BitStream:bs, {PR_ValueType, Float, _}:...);

native PR_RegHandler(id, const publicname[], PR_HandlerType:type);

Stocks

stock BS_ReadOnFootSync(BitStream:bs, data[PR_OnFootSync]);
stock BS_ReadInCarSync(BitStream:bs, data[PR_InCarSync]);
stock BS_ReadTrailerSync(BitStream:bs, data[PR_TrailerSync]);
stock BS_ReadPassengerSync(BitStream:bs, data[PR_PassengerSync]);
stock BS_ReadUnoccupiedSync(BitStream:bs, data[PR_UnoccupiedSync]);
stock BS_ReadAimSync(BitStream:bs, data[PR_AimSync]);
stock BS_ReadBulletSync(BitStream:bs, data[PR_BulletSync]);

stock BS_WriteOnFootSync(BitStream:bs, data[PR_OnFootSync]);
stock BS_WriteInCarSync(BitStream:bs, data[PR_InCarSync]);
stock BS_WriteTrailerSync(BitStream:bs, data[PR_TrailerSync]);
stock BS_WritePassengerSync(BitStream:bs, data[PR_PassengerSync]);
stock BS_WriteUnoccupiedSync(BitStream:bs, data[PR_UnoccupiedSync]);
stock BS_WriteAimSync(BitStream:bs, data[PR_AimSync]);
stock BS_WriteBulletSync(BitStream:bs, data[PR_BulletSync]);