Xaiman
New Member
- Joined
- Feb 27, 2010
- Messages
- 94
- Reaction score
- 0
Randomly players have stopped getting the first items when they first login to my server.
i have looked all around the forums but nothing has helped. I have plugged in many scripts and none work.
I have no clue whats wrong. I gave the sample chars items also but when i reloged on them, the items were gone x.x
i have looked all around the forums but nothing has helped. I have plugged in many scripts and none work.
Code:
local firstItems = {}
firstItems[0] =
{
2173,
2525,
3965,
2124,
2457,
2647,
2643
}
firstItems[1] =
{
2173,
2525,
2124,
8820,
2649,
2643,
8819
}
firstItems[2] =
{
2173,
2525,
2124,
8820,
2649,
2643,
8819
}
firstItems[3] =
{
2173,
2525,
2124,
2460,
2649,
2643,
2660,
}
firstItems[4] =
{
2173,
2525,
2124,
2460,
2478,
2643,
2465
}
function onLogin(cid)
if getPlayerStorageValue(cid, 30001) == -1 then
for i = 1, table.maxn(firstItems[getPlayerVocation(cid)]) do
doPlayerAddItem(cid, firstItems[getPlayerVocation(cid)][i], 1)
end
local bag = doPlayerAddItem(cid, 10521, 1)
doAddContainerItem(bag, 2160, 2)
doAddContainerItem(bag, 2554, 1)
doAddContainerItem(bag, 2120, 1)
doAddContainerItem(bag, 7618, 1)
setPlayerStorageValue(cid, 30001, 1)
end
return true
end
Code:
<event type="login" name="FirstItems" event="script" value="firstitems.lua"/>
I have no clue whats wrong. I gave the sample chars items also but when i reloged on them, the items were gone x.x