Wavoz
Oldschooler
- Joined
- Jul 10, 2011
- Messages
- 1,021
- Reaction score
- 84
So i have been trying to figure out how do i get first items spawn on the required slots.
No matter what i do rope and shovel keep spawning on "hands" but i want them to spawn in container.
Script looks like that:
I have changed order of items but still i don't understand why does rope and shovel want to spawn on hands slot....
No matter what i do rope and shovel keep spawning on "hands" but i want them to spawn in container.
Script looks like that:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="First Items" version="1.0" author="XXX" contact="otland.net" enabled="yes">
<config name="firstitems_config"><![CDATA[
config = {
storage = 30001,
items = {2463, 2525, 2457, 2647, 2643}
}
]]></config>
<event type="login" name="FirstItems" event="script"><![CDATA[
domodlib('firstitems_config')
function onLogin(cid)
if(getPlayerStorageValue(cid, config.storage) > 0) then
return true
end
doPlayerSetMaxCapacity(cid, 520)
doAddContainerItem(doPlayerAddItem(cid, 1988, 1), 2674, 10)
doPlayerAddItem(cid, 2120, 1)
doPlayerAddItem(cid, 2554, 1)
doPlayerAddItem(cid, 7620, 1)
if (getPlayerVocation(cid) == 1) then
doPlayerAddItem(cid, 2190, 1)
elseif (getPlayerVocation(cid) == 2) then
doPlayerAddItem(cid, 2182, 1)
elseif (getPlayerVocation(cid) == 3) then
doPlayerAddItem(cid, 2456, 1)
doPlayerAddItem(cid, 2544, 1)
elseif (getPlayerVocation(cid) == 4) then
doPlayerAddItem(cid, 2383)
doPlayerAddItem(cid, 2428)
doPlayerAddItem(cid, 2417)
end
doPlayerSetMaxCapacity(cid, 540)
for _, id in ipairs(config.items) do
doPlayerAddItem(cid, id, 1)
end
setPlayerStorageValue(cid, config.storage, 1)
setPlayerStorageValue(cid, 19732, 100)
return true
end
]]></event>
</mod>
I have changed order of items but still i don't understand why does rope and shovel want to spawn on hands slot....