• 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!

Doubt in program

hasbro

Member
Joined
Feb 15, 2009
Messages
287
Reaction score
6
Hi, i create one script when the player login in server verify if player have more then 1500 items in depot..but in the first script dont work when the player login in the server kick player..
Lua:
function onLogin(cid)
local depotlimit = getPlayerDepotItems(cid,i)
for i=1,24 do
if depotlimit > 1500 then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your depot contains more of 1500 item.")
end
end
end
This work
Lua:
function onLogin(cid)
local depotlimit = getPlayerDepotItems(cid,1)
if depotlimit > 1500 then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your depot contains more of 1500 item.")
end
end
end
 
In first script you call the variable i which is called below, so:
Lua:
function onLogin(cid)
for i=1,24 do
local depotlimit = getPlayerDepotItems(cid,i)
if depotlimit > 1500 then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your depot contains more of 1500 item.")
end
end
end
 
Back
Top