edit: player format

This commit is contained in:
Linventif 2024-02-16 13:52:35 +01:00
parent 2b7b01b132
commit 11be2c9d06
No known key found for this signature in database
GPG Key ID: FAC0CA60F9AEEC24
2 changed files with 5 additions and 3 deletions

View File

@ -1 +0,0 @@
//

View File

@ -9,6 +9,9 @@ function gmInte.getPlayerFormat(ply)
["deaths"] = ply:Deaths(), ["deaths"] = ply:Deaths(),
["customValues"] = ply:gmIntGetCustomValues(), ["customValues"] = ply:gmIntGetCustomValues(),
["connectTime"] = math.Round(RealTime() - ply:gmIntGetConnectTime()), ["connectTime"] = math.Round(RealTime() - ply:gmIntGetConnectTime()),
["ping"] = ply:Ping(),
["pos"] = gmInte.getVectorFormat(ply:GetPos()),
["ang"] = gmInte.getAngleFormat(ply:EyeAngles())
} }
end end
@ -21,7 +24,7 @@ function gmInte.getServerFormat()
["players"] = #player.GetAll(), ["players"] = #player.GetAll(),
["maxPlayers"] = game.MaxPlayers(), ["maxPlayers"] = game.MaxPlayers(),
["gameMode"] = engine.ActiveGamemode(), ["gameMode"] = engine.ActiveGamemode(),
["uptime"] = math.Round(RealTime() / 60) ["uptime"] = math.Round(RealTime())
} }
end end
@ -57,7 +60,7 @@ function gmInte.getAngleFormat(ang)
} }
end end
local function gmInte.getTeamFormat(teamID) function gmInte.getTeamFormat(teamID)
return { return {
["id"] = teamID, ["id"] = teamID,
["name"] = team.GetName(teamID) ["name"] = team.GetName(teamID)