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