@@ -955,11 +955,13 @@ function SetSpawnInfo(amx, player, team, skin, x, y, z, angle, weap1, weap1_ammo
955
955
end
956
956
957
957
function NetStats_BytesReceived (amx , player )
958
- notImplemented (' NetStats_BytesReceived' )
958
+ local networkStat = getNetworkStats (player )
959
+ return networkStat .bytesReceived or 0
959
960
end
960
961
961
962
function NetStats_BytesSent (amx , player )
962
- notImplemented (' NetStats_BytesSent' )
963
+ local networkStat = getNetworkStats (player )
964
+ return networkStat .bytesSent or 0
963
965
end
964
966
965
967
function NetStats_ConnectionStatus (amx , player )
@@ -970,8 +972,12 @@ function NetStats_GetConnectedTime(amx, player)
970
972
notImplemented (' NetStats_GetConnectedTime' )
971
973
end
972
974
973
- function NetStats_GetIpPort (amx , player )
974
- notImplemented (' NetStats_GetIpPort' )
975
+ function NetStats_GetIpPort (amx , player , ip_port , ip_port_len )
976
+ local ip = getPlayerIP (player )
977
+ local port = 0 -- We haven't a solution for getting a client port
978
+ local ipandport = tostring (ip ).. " :" .. tostring (port )
979
+ writeMemString (amx , ip_port , ipandport )
980
+ return string.len (tostring (ip ).. " :" .. tostring (port ));
975
981
end
976
982
977
983
function NetStats_MessagesReceived (amx , player )
@@ -987,5 +993,6 @@ function NetStats_MessagesSent(amx, player)
987
993
end
988
994
989
995
function NetStats_PacketLossPercent (amx , player )
990
- notImplemented (' NetStats_PacketLossPercent' )
996
+ local networkStat = getNetworkStats (player )
997
+ return networkStat .packetlossTotal or 0
991
998
end
0 commit comments