Skip to content

Commit

Permalink
Added Useful Hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
bleonheart committed Nov 3, 2024
1 parent 90f0e0d commit 5cb2e34
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions lilia/gamemode/core/hooks/core/server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,20 @@ function GM:PostPlayerLoadout(client)
client:SetupHands()
end

function GM:DoPlayerDeath(client, attacker, damageinfo)
client:AddDeaths(1)
if hook.Run("ShouldSpawnClientRagdoll", client) ~= false then client:CreateRagdoll() end
if IsValid(attacker) and attacker:IsPlayer() then
if client == attacker then
attacker:AddFrags(-1)
else
attacker:AddFrags(1)
end
end

client:SetDSP(31)
end

function GM:PlayerDeath(client)
local character = client:getChar()
if not character then return end
Expand All @@ -401,6 +415,7 @@ function GM:PlayerSpawn(client)
client:UnLock()
client:SetNotSolid(false)
client:stopAction()
client:SetDSP(1)
hook.Run("PlayerLoadout", client)
end

Expand Down

0 comments on commit 5cb2e34

Please sign in to comment.