• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

New player dropping bp on floor

flaxe

the one and only
Joined
Jun 12, 2009
Messages
336
Reaction score
2
Location
Sweden
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

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
 
Back
Top