Code:
local monsters =
{
["Blightwalker"] = {storage = 59093},
["Ghoul"] = {storage = 59094},
["Grim Reaper"] = {storage = 59095}
}
function onSay(cid, words, param)
if(not checkExhausted(cid, 666, 4)) then
return true
end
local text = "Monsters\n"
for m, s in ipairs(monsters) do
text = text .. "#" .. m .. " = " ..getPlayerStorageValue(s) .. "\n"
end
return doPlayerPopupFYI(cid, text)
end
what's wrong in this script?
Post automatically merged:
Code:
function onSay(cid, words, param)
if(not checkExhausted(cid, 666, 4)) then
return true
end
local text = "=-=-=-=- Monsters -=-=-=-=\n\n"
for m, s in pairs(monsters) do
if getPlayerStorageValue(cid, s.storage) > 0 then
text = text .."-> ".. m .." = "..getPlayerStorageValue(cid, s.storage) .."\n"
end
end
return doShowTextDialog(cid, 1953, text)
end
done, I learned how it works
Last edited: