add: player log (death - spawn - initial spawn)

This commit is contained in:
Linventif 2024-03-31 16:36:08 +02:00
parent 843b1ddfcf
commit 6324b24b95
No known key found for this signature in database
GPG Key ID: FAC0CA60F9AEEC24

View File

@ -31,39 +31,39 @@ function gmInte.playerDisconnected(ply)
) )
end end
-- function gmInte.playerSpawn(ply) function gmInte.playerSpawn(ply)
-- if (!ply:IsValid() || !ply:IsPlayer(ply)) then return end if (!ply:IsValid() || !ply:IsPlayer(ply)) then return end
-- gmInte.http.post("/players/" .. ply:SteamID64() .. "/spawn", gmInte.http.post("/players/" .. ply:SteamID64() .. "/spawn",
-- { {
-- ["player"] = gmInte.getPlayerFormat(ply) ["player"] = gmInte.getPlayerFormat(ply)
-- } }
-- ) )
-- end end
-- function gmInte.postLogPlayerDeath(ply, inflictor, attacker) function gmInte.playerDeath(ply, inflictor, attacker)
-- if (!ply:IsValid() || !ply:IsPlayer(ply)) then return end if (!ply:IsValid() || !ply:IsPlayer(ply)) then return end
-- if (!attacker:IsValid() || !attacker:IsPlayer(attacker)) then return end if (!attacker:IsValid() || !attacker:IsPlayer(attacker)) then return end
-- if (!inflictor:IsValid()) then return end if (!inflictor:IsValid()) then return end
-- gmInte.http.post("/logs/playerDeath", gmInte.http.post("/players/" .. ply:SteamID64() .. "/death",
-- { {
-- ["player"] = gmInte.getPlayerFormat(ply), ["player"] = gmInte.getPlayerFormat(ply),
-- ["inflictor"] = gmInte.getEntityFormat(inflictor), ["inflictor"] = gmInte.getEntityFormat(inflictor),
-- ["attacker"] = gmInte.getPlayerFormat(attacker) ["attacker"] = gmInte.getPlayerFormat(attacker)
-- } }
-- ) )
-- end end
-- function gmInte.postLogPlayerInitialSpawn(ply) function gmInte.playerInitialSpawn(ply)
-- if (!ply:IsValid() || !ply:IsPlayer(ply)) then return end if (!ply:IsValid() || !ply:IsPlayer(ply)) then return end
-- gmInte.http.post("/logs/playerInitialSpawn", gmInte.http.post("/players/" .. ply:SteamID64() .. "/initial-spawn",
-- { {
-- ["ply"] = gmInte.getPlayerFormat(ply) ["ply"] = gmInte.getPlayerFormat(ply)
-- } }
-- ) )
-- end end
-- function gmInte.postLogPlayerHurt(ply, attacker, healthRemaining, damageTaken) -- function gmInte.postLogPlayerHurt(ply, attacker, healthRemaining, damageTaken)
-- if (!ply:IsValid() || !ply:IsPlayer(ply)) then return end -- if (!ply:IsValid() || !ply:IsPlayer(ply)) then return end
@ -142,21 +142,21 @@ hook.Add("PlayerDisconnected", "gmInte:Player:Disconnect", function(ply)
gmInte.playerDisconnected(ply) gmInte.playerDisconnected(ply)
end) end)
-- hook.Add("PlayerSpawn", "gmInte:Player:Spawn", function(ply) hook.Add("PlayerSpawn", "gmInte:Player:Spawn", function(ply)
-- gmInte.playerSpawn(ply) gmInte.playerSpawn(ply)
-- end) end)
-- hook.Add("PlayerInitialSpawn", "gmInte:Player:InitialSpawn", function(ply) hook.Add("PlayerInitialSpawn", "gmInte:Player:InitialSpawn", function(ply)
-- gmInte.postLogPlayerInitialSpawn(ply) gmInte.playerInitialSpawn(ply)
-- end) end)
-- hook.Add("PlayerGiveSWEP", "gmInte:Player:SWEPs", function( ply, class, swep ) -- hook.Add("PlayerGiveSWEP", "gmInte:Player:SWEPs", function( ply, class, swep )
-- gmInte.postLogPlayerGivet(ply, class, swep) -- gmInte.postLogPlayerGivet(ply, class, swep)
-- end) -- end)
-- hook.Add("PlayerDeath", "gmInte:Player:Death", function(ply, inflictor, attacker) hook.Add("PlayerDeath", "gmInte:Player:Death", function(ply, inflictor, attacker)
-- gmInte.postLogPlayerDeath(ply, inflictor, attacker) gmInte.playerDeath(ply, inflictor, attacker)
-- end) end)
-- hook.Add("PlayerHurt", "gmInte:Player:Hurt", function(ply, attacker, healthRemaining, damageTaken) -- hook.Add("PlayerHurt", "gmInte:Player:Hurt", function(ply, attacker, healthRemaining, damageTaken)
-- gmInte.postLogPlayerHurt(ply, attacker, healthRemaining, damageTaken) -- gmInte.postLogPlayerHurt(ply, attacker, healthRemaining, damageTaken)