Retrieve players ping?

I am currently remaking a useful E2 to automatically clean up the server if the average ping goes above a certain thing

It’s in early beta, it will have timers and everything but the priniciple is there.

Code:

[lua]
/-------------------------------------------------------------------------------------------------------------------------
Automatic Cleanups!
-------------------------------------------------------------------------------------------------------------------------
/

local PLUGIN = {}
PLUGIN.Title = “Auto Cleanup”
PLUGIN.Description = “Automatically clean up if server is lagging bad.”
PLUGIN.Author = “Dr. Matt/Overv”

function PLUGIN:Initialize()
timer.Create(“EV_LagDetector”,10,0,function()
local Players = player.GetAll()
local averageping = 0
for i = 1, table.Count(Players) do
local averageping = averageping + Players*:ping()
print(Player*:ping())
print("Average Ping: " + averageping )
end
end)
end

evolve:RegisterPlugin( PLUGIN )
[/lua]

At the moment all I need to do is somehow get the players ping, is there any function to do this?

Tl;dr: Any function to get players ping?

Edit:

God damn hell, I got it anyway, let the thread die:

**[Player.Ping

http://wiki.garrysmod.com/favicon.ico](http://wiki.garrysmod.com/?title=Player.Ping)**

I was just missing the capital P, :v: