Code:
local itemList = {
[2463] = 1,
[2647] = 1,
[2525] = 1,
[5924] = 1,
[2160] = 1
}
function onUse(cid, item, frompos, topos)
if getPlayerStorageValue(cid, 5669) ~= -1 then
for itemid, count in pairs(itemList) do
doPlayerAddItem(cid, itemid, count)
end
setPlayerStorageValue(cid, 5669, 1)
doPlayerSendTextMessage(cid, 22, "Congratulations " .. getPlayerName(cid) .. ", you got your starter equipment!")
else
doPlayerSendTextMessage(cid, 22, "You have already got your starter equipment!")
end
return 1
end
This script is supposed to give all new players a set of items (at the top) but it says "you have already got your starter equipment" to everyone even totally new chars..anyone knows why?