• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[LUA] StorageValue question.

Kyran

Member
Joined
Jan 17, 2009
Messages
68
Reaction score
5
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
 
Back
Top