I want to repair this for gmod 13
[LUA]
local function plyjoin(ply)
local path = "drpinv/" .. ply:UniqueID() .. ".txt"
if file.Exists(path) then
ply.inv = glon.decode(file.Read(path))
else
ply.inv = { }
ply.inv._size = 0
ply.inv.sweps = {}
ply.inv.ships = {}
ply.inv.foods = {}
ply:SaveInv()
end
ply:SendInv()
ply.canuse = true --to stop textspam/multiple pickups
if not ply.maxFoods then
ply.maxFoods = 0
end
if not ply.maxDrugs then
ply.maxDrugs = 0
end
end
hook.Add("PlayerInitialSpawn","DrpInvSpawn",plyjoin)
[/LUA]
[LUA]
function meta:SaveInv()
file.Write("drpinv/" .. self:UniqueID() .. ".txt", glon.encode(self.inv))
end
[/LUA]
[highlight](User was banned for this post ("Undescriptive thread title. Again." - postal))[/highlight]
Sorry, you need to Log In to post a reply to this thread.