summaryrefslogtreecommitdiff
path: root/gamemode/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'gamemode/init.lua')
-rw-r--r--gamemode/init.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/gamemode/init.lua b/gamemode/init.lua
index b28219a..2d15d1f 100644
--- a/gamemode/init.lua
+++ b/gamemode/init.lua
@@ -80,7 +80,7 @@ net.Receive('givePlayerResource', function(len, ply)
local resSlot = net.ReadInt(32)
local restbl = ply:GetEyeTrace().Entity.deathResources
local tbl1 = string.Split(restbl[resSlot], " ")
- local tbl2 = string.Split(tbl1[2], "x")
+ local tbl2 = string.Split(tbl1[#tbl1], "x")
local amt = tbl2[2]
ply:IncResource( ResToGive, Amount )
@@ -90,7 +90,7 @@ net.Receive('givePlayerResource', function(len, ply)
table.remove(restbl, resSlot)
else
amt = amt - Amount
- restbl[resSlot] = tbl1[1] .. " x" .. amt
+ restbl[resSlot] = ResToGive .. " x" .. amt
end