Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gamemode/core/meta/inventory/sv_base_inventory.lua
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ function Inventory:sync(recipients)
net.WriteType(self.id)
net.WriteString(self.typeID)
net.WriteTable(self.data)
net.WriteUInt(table.Count(self.items), 32)
net.WriteUInt(table.Count(self.items), 32)
local function writeItem(item)
net.WriteUInt(item:getID(), 32)
net.WriteString(item.uniqueID)
Expand Down
6 changes: 3 additions & 3 deletions plugins/playerinjuries/sv_hooks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ end

function PLUGIN:PlayerDeath(client)
local deathSound = hook.Run("GetPlayerDeathSound", client)
or table.Random(DEATH_SOUNDS)
or DEATH_SOUNDS[math.random(#DEATH_SOUNDS)]
if (client:isFemale() and !deathSound:find("female")) then
deathSound = deathSound:gsub("male", "female")
end
Expand All @@ -48,14 +48,14 @@ end

function PLUGIN:GetPlayerPainSound(client)
if (client:WaterLevel() >= 3) then
return table.Random(DROWN_SOUNDS)
return DROWN_SOUNDS[math.random(#DROWN_SOUNDS)]
end
end

function PLUGIN:PlayerHurt(client, attacker, health, damage)
if ((client.nutNextPain or 0) < CurTime() and health > 0) then
local painSound = hook.Run("GetPlayerPainSound", client)
or table.Random(PAIN_SOUNDS)
or PAIN_SOUNDS[math.random(#PAIN_SOUNDS)]
if (client:isFemale() and !painSound:find("female")) then
painSound = painSound:gsub("male", "female")
end
Expand Down