Hey, when a new player is joining my server he drops a backpack on the ground where all starting items are. but he also gets a backpack with the starting items on himself, so it means he are creating two bags, one that stays on him, and one that he drops on the ground. Below is my firstitems.lua
I want it to be so you don't drop a bag on the ground. Thanks
Code:
local items = {
[1] = { 8819, 8820, 2647, 2509, 2643, 2190, 2120, 2554, 2160, 2173 },
[2] = { 8819, 8820, 2647, 2509, 2643, 2182, 2120, 2554, 2160, 2173 },
[3] = { 2643, 2647, 2463, 2481, 2456, 2544, 2120, 2554, 2160, 2173 },
[4] = { 2643, 2647, 2463, 2481, 2509, 2383, 2120, 2554, 2160, 2173 }
}
function onLogin(cid)
if getPlayerStorageValue(cid, 30001) == -1 then
for voc, item in pairs(items) do
if getPlayerVocation(cid) == voc then
local container = doPlayerAddItem(cid, 1988, 1)
for i = 1, table.maxn(item) do
doAddContainerItem(container, item[i], 1)
end
setPlayerStorageValue(cid, 30001, 1)
end
end
end
return TRUE
end
I want it to be so you don't drop a bag on the ground. Thanks