How do I make it so I give multiple items in 1 container?
For example, I'm working on a script for someone and it's supposed take money and give a backpack with a rope and shovel inside when you say something.
This is what I have so far:
I've tried everything, even using ipairs, but I could be using that incorrectly.
Anyone know a solution?
For example, I'm working on a script for someone and it's supposed take money and give a backpack with a rope and shovel inside when you say something.
This is what I have so far:
Lua:
items = {2120, 2554}
function onSay(cid, words, param, channel)
if isPlayer(cid) and getPlayerMoney(cid) >= 500 then
doPlayerRemoveMoney(cid, 500)
doAddContainerItem(doPlayerAddItem(cid, 1988, 1), items, 1)
end
return true
end
I've tried everything, even using ipairs, but I could be using that incorrectly.
Anyone know a solution?