LUA:
function onLogin(cid)
-- Register events.
registerCreatureEvent(cid, "PlayerDeath")
registerCreatureEvent(cid, "killarena")
-- First Items
if getPlayerStorageValue(cid,30001) == -1 then
if getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 5 then
doPlayerAddItem(cid,2190,1)
elseif getPlayerVocation(cid) == 2 or getPlayerVocation(cid) == 6 then
doPlayerAddItem(cid,2182,1)
elseif getPlayerVocation(cid) == 3 or getPlayerVocation(cid) == 7 then
doPlayerAddItem(cid,2389,1)
elseif getPlayerVocation(cid) == 4 or getPlayerVocation(cid) == 8 then
doPlayerAddItem(cid,2412,1)
end
doPlayerAddItem(cid,2525,1)
doPlayerAddItem(cid,2465,1)
doPlayerAddItem(cid,2481,1)
doPlayerAddItem(cid,2478,1)
doPlayerAddItem(cid,2643,1)
doPlayerAddItem(cid,1988,1)
setPlayerStorageValue(cid,30001,1)
end
-- Donations
if getPlayerStorageValue(cid,30002) == -1 then --Experience points
setPlayerStorageValue(cid,30002,1)
end
return 1
end
This is my login.lua
When i use the first items script, every player gets storagevalues 10001001 -> 10001018, however if i just remove the script that gives players items the value doesn't appear. Anyone here know why?
Thanks