I have this working action script, when i click the corpse on the ground it gives me an obsidian lance, and starts a quest on it.
But when i have another bag inside, it keeps saying that i have no room avaible, what can i do? i need this working even if the bag are full, to put the item in the other bag.
Lua:
function onUse(cid)
local queststatus = getPlayerStorageValue(cid,50125)
if queststatus == -1 then
local bp = getPlayerSlotItem(cid, CONST_SLOT_BACKPACK)
if getContainerSize(bp.uid) == getContainerCap(bp.uid) then
doPlayerSendTextMessage(cid,22,"You have no room")
else
if (getPlayerFreeCap(cid) >= 80) then
doPlayerSendTextMessage(cid,22,"You have found a obsidian lance in the human hands.")
doPlayerAddItem(cid, 2425, 1)
setPlayerStorageValue(cid,50125,1)
else
doPlayerSendTextMessage(cid,22,"You have found a obsidian lance. Weighing 80.00 oz it is too heavy.")
end
end
else
doPlayerSendTextMessage(cid,22,"The dead human has nothing on.")
end
end
But when i have another bag inside, it keeps saying that i have no room avaible, what can i do? i need this working even if the bag are full, to put the item in the other bag.