@citizenfx/server 2.0.13766-1 → 2.0.13796-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1131,7 +1131,41 @@ declare function GetPlayerName(playerSrc: string): string;
1131
1131
  declare function GetPlayerPed(playerSrc: string): number;
1132
1132
 
1133
1133
  /**
1134
- * GET_PLAYER_PING
1134
+ * ```cpp
1135
+ * const int ENET_PACKET_LOSS_SCALE = 65536;
1136
+ * enum PeerStatistics
1137
+ * {
1138
+ * // PacketLoss will only update once every 10 seconds, use PacketLossEpoch if you want the time
1139
+ * // since the last time the packet loss was updated.
1140
+ * // the amount of packet loss the player has, needs to be scaled with PACKET_LOSS_SCALE
1141
+ * PacketLoss = 0,
1142
+ * // The variance in the packet loss
1143
+ * PacketLossVariance = 1,
1144
+ * // The time since the last packet update in ms, relative to the peers connection time
1145
+ * PacketLossEpoch = 2,
1146
+ * // The mean amount of time it takes for a packet to get to the client (ping)
1147
+ * RoundTripTime = 3,
1148
+ * // The variance in the round trip time
1149
+ * RoundTripTimeVariance = 4,
1150
+ * // Despite their name, these are only updated once every 5 seconds, you can get the last time this was updated with PacketThrottleEpoch
1151
+ * // The last recorded round trip time of a packet
1152
+ * LastRoundTripTime = 5,
1153
+ * // The last round trip time variance
1154
+ * LastRoundTripTimeVariance = 6,
1155
+ * // The time since the last packet throttle update, relative to the peers connection time
1156
+ * PacketThrottleEpoch = 7,
1157
+ * };
1158
+ * ```
1159
+ * These statistics only update once every 10 seconds.
1160
+ * @param playerSrc The player to get the stats of
1161
+ * @param peerStatistic The statistic to get, this will error if its out of range
1162
+ * @return See `ENetStatisticType` for what this will return.
1163
+ */
1164
+ declare function GetPlayerPeerStatistics(playerSrc: string, peerStatistic: number): number;
1165
+
1166
+ /**
1167
+ * See [GET_PLAYER_PEER_STATISTICS](#\_0x9A928294) if you want more detailed information, like packet loss, and packet/rtt variance
1168
+ * @return Returns the mean amount of time a packet takes to get to the client
1135
1169
  */
1136
1170
  declare function GetPlayerPing(playerSrc: string): number;
1137
1171
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@citizenfx/server",
3
- "version": "2.0.13766-1",
3
+ "version": "2.0.13796-1",
4
4
  "description": "Typings for the CitizenFX server JS API.",
5
5
  "main": "index.js",
6
6
  "scripts": {