@citizenfx/server 2.0.13759-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.
- package/natives_server.d.ts +35 -1
- package/package.json +1 -1
package/natives_server.d.ts
CHANGED
|
@@ -1131,7 +1131,41 @@ declare function GetPlayerName(playerSrc: string): string;
|
|
|
1131
1131
|
declare function GetPlayerPed(playerSrc: string): number;
|
|
1132
1132
|
|
|
1133
1133
|
/**
|
|
1134
|
-
*
|
|
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
|
|