-
Notifications
You must be signed in to change notification settings - Fork 30
Functions
urShadow edited this page May 6, 2018
·
12 revisions
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_GetNumberOfBitsAllocated(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);
#define BS_ReadInt8(%0,%1) BS_ReadValue(%0, PR_INT8, %1)
#define BS_ReadInt16(%0,%1) BS_ReadValue(%0, PR_INT16, %1)
#define BS_ReadInt32(%0,%1) BS_ReadValue(%0, PR_INT32, %1)
#define BS_ReadUint8(%0,%1) BS_ReadValue(%0, PR_UINT8, %1)
#define BS_ReadUint16(%0,%1) BS_ReadValue(%0, PR_UINT16, %1)
#define BS_ReadUint32(%0,%1) BS_ReadValue(%0, PR_UINT32, %1)
#define BS_ReadFloat(%0,%1) BS_ReadValue(%0, PR_FLOAT, %1)
#define BS_ReadBool(%0,%1) BS_ReadValue(%0, PR_BOOL, %1)
#define BS_ReadString(%0,%1,%2) BS_ReadValue(%0, PR_STRING, %1, %2)
#define BS_ReadCompressedInt8(%0,%1) BS_ReadValue(%0, PR_CINT8, %1)
#define BS_ReadCompressedInt16(%0,%1) BS_ReadValue(%0, PR_CINT16, %1)
#define BS_ReadCompressedInt32(%0,%1) BS_ReadValue(%0, PR_CINT32, %1)
#define BS_ReadCompressedUint8(%0,%1) BS_ReadValue(%0, PR_CUINT8, %1)
#define BS_ReadCompressedUint16(%0,%1) BS_ReadValue(%0, PR_CUINT16, %1)
#define BS_ReadCompressedUint32(%0,%1) BS_ReadValue(%0, PR_CUINT32, %1)
#define BS_ReadCompressedFloat(%0,%1) BS_ReadValue(%0, PR_CFLOAT, %1)
#define BS_ReadCompressedBool(%0,%1) BS_ReadValue(%0, PR_CBOOL, %1)
#define BS_ReadCompressedString(%0,%1,%2) BS_ReadValue(%0, PR_CSTRING, %1, %2)
#define BS_ReadBits(%0,%1,%2) BS_ReadValue(%0, PR_BITS, %1, %2)
#define BS_WriteInt8(%0,%1) BS_WriteValue(%0, PR_INT8, %1)
#define BS_WriteInt16(%0,%1) BS_WriteValue(%0, PR_INT16, %1)
#define BS_WriteInt32(%0,%1) BS_WriteValue(%0, PR_INT32, %1)
#define BS_WriteUint8(%0,%1) BS_WriteValue(%0, PR_UINT8, %1)
#define BS_WriteUint16(%0,%1) BS_WriteValue(%0, PR_UINT16, %1)
#define BS_WriteUint32(%0,%1) BS_WriteValue(%0, PR_UINT32, %1)
#define BS_WriteFloat(%0,%1) BS_WriteValue(%0, PR_FLOAT, %1)
#define BS_WriteBool(%0,%1) BS_WriteValue(%0, PR_BOOL, %1)
#define BS_WriteString(%0,%1) BS_WriteValue(%0, PR_STRING, %1)
#define BS_WriteCompressedInt8(%0,%1) BS_WriteValue(%0, PR_CINT8, %1)
#define BS_WriteCompressedInt16(%0,%1) BS_WriteValue(%0, PR_CINT16, %1)
#define BS_WriteCompressedInt32(%0,%1) BS_WriteValue(%0, PR_CINT32, %1)
#define BS_WriteCompressedUint8(%0,%1) BS_WriteValue(%0, PR_CUINT8, %1)
#define BS_WriteCompressedUint16(%0,%1) BS_WriteValue(%0, PR_CUINT16, %1)
#define BS_WriteCompressedUint32(%0,%1) BS_WriteValue(%0, PR_CUINT32, %1)
#define BS_WriteCompressedFloat(%0,%1) BS_WriteValue(%0, PR_CFLOAT, %1)
#define BS_WriteCompressedBool(%0,%1) BS_WriteValue(%0, PR_CBOOL, %1)
#define BS_WriteCompressedString(%0,%1) BS_WriteValue(%0, PR_CSTRING, %1)
#define BS_WriteBits(%0,%1,%2) BS_WriteValue(%0, PR_BITS, %1, %2)
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]);
- Refer to BrunoBM16's RPC and Packet lists