Postado Setembro 14, 2015 9 anos Gostaria de saber se tem como modificar esse script, para que só possa usar uma storage especifica... local items = {{2160, 50}, {2163, 100}, {2563, 100}, ...} --{{ID_do_item, quantia_requerida}, {ID_do_item, quantia_requerida}, ...} function onSay(cid) local str = "" for _, item in pairs(items) do if str == "" then str = getItemInfo(item[1]).name.." - ["..getPlayerItemCount(cid, item[1]).."/"..item[2].."]" else str = str.."\n"..getItemInfo(item[1]).name.." - ["..getPlayerItemCount(cid, item[1]).."/"..item[2].."]" end end doPlayerPopupFYI(cid, "You have:\n"..str) return true end Por favor ajudem.
Postado Setembro 14, 2015 9 anos local config = { storage = 9999, -- storage necessario items = {{2160, 50}, {2163, 100}, {2563, 100}, ...} --{{ID_do_item, quantia_requerida}, {ID_do_item, quantia_requerida}, ...} } function onSay(cid) if(getPlayerStorageValue(cid, config.storage) == -1) then return doPlayerSendCancel(cid, "You cannot use this command.") end local str = "" for _, item in pairs(config.items) do if str == "" then str = getItemInfo(item[1]).name.." - ["..getPlayerItemCount(cid, item[1]).."/"..item[2].."]" else str = str.."\n"..getItemInfo(item[1]).name.." - ["..getPlayerItemCount(cid, item[1]).."/"..item[2].."]" end end doPlayerPopupFYI(cid, "You have:\n"..str) return true end
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.