Skip to content
This repository has been archived by the owner on Sep 27, 2022. It is now read-only.

Commit

Permalink
Update sv_hooks.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
sophfee committed Dec 18, 2021
1 parent 77b81ca commit c4a39e4
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion gamemode/core/hooks/sv_hooks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,24 @@ hook.Add("PlayerSpawn","landisSetupHands", function(ply)
ply:SetTeam(1)
end)

hook.Add("PlayerDeathSound","landisMuteDeathsound",function() return true end)
hook.Add("PlayerHurt","landisPainSound",function(ply)
local teamData = ply:GetTeamData()
if teamData then
if teamData.Hurtsounds then
ply:EmitSound( Sound( table.Random(teamData.Hurtsounds) ) )
end
end
end)

hook.Add("PlayerDeathSound","landisDeathsound",function(ply)
local teamData = ply:GetTeamData()
if teamData then
if teamData.Deathsounds then
ply:EmitSound( Sound( table.Random(teamData.Deathsounds) ) )
end
end
return true
end)

hook.Add("landisOpenVendor", "landisBasicVendorFunc", function(ply,ent,class)
local ven = landis.GetVendor(class)
Expand Down

0 comments on commit c4a39e4

Please sign in to comment.