Postado Junho 23, 2021 4 anos Ola tenho esse script que compra storage mas queria colocar tempo de dias e depois acabase o tempo alguem pode modificar pramin? @Vodkart local t = { price = 1000000, -- Preço a ser cobrado. storage = 12333 -- Storage que irá ganhar. } function onSay(cid, words, param, channel) if getPlayerStorageValue(cid, t.storage) < 1 then if doPlayerRemoveMoney(cid, t.price) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns, agora você tem acesso a área VIP.") setPlayerStorageValue(cid, t.storage, 1) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você precisa de "..t.price.." gold coins para comprar VIP.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você já é VIP!") end return true end Editado Junho 25, 2021 4 anos por Luanmax21 (veja o histórico de edições)
Postado Julho 14, 2021 3 anos Em 23/06/2021 em 20:44, Luanmax21 disse: Ola tenho esse script que compra storage mas queria colocar tempo de dias e depois acabase o tempo alguem pode modificar pramin? @Vodkart local t = { price = 1000000, -- Preço a ser cobrado. storage = 12333 -- Storage que irá ganhar. } function onSay(cid, words, param, channel) if getPlayerStorageValue(cid, t.storage) < 1 then if doPlayerRemoveMoney(cid, t.price) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns, agora você tem acesso a área VIP.") setPlayerStorageValue(cid, t.storage, 1) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você precisa de "..t.price.." gold coins para comprar VIP.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você já é VIP!") end return true end Citar <action itemid="ID_DO_ITEM" script="Vips/Vip.lua" /> Citar function onUse(cid, item, fromPosition, itemEx, toPosition) local config={ removeOnUse = "yes" -- remover quando usar ("yes" or "no") } local days = 1 -- dias que serão adicionados local daysvalue = days * 24 * 60 * 60 local storageplayer = getPlayerStorageValue(cid, 13714) local timenow = os.time() if getPlayerStorageValue(cid, 13714) - os.time() <= 0 then time = timenow + daysvalue else time = storageplayer + daysvalue end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foi Adicionado ".. days .." Dia de Vip Donate no Seu Character.") setPlayerStorageValue(cid, 13714, time) addEvent(doRemoveCreature, 2*1000, cid, true) local quantity = math.floor((getPlayerStorageValue(cid, 13714) - timenow)/(24 * 60 * 60)) doSendMagicEffect(getPlayerPosition(cid), math.random(30,30)) if (config.removeOnUse == "yes") then doRemoveItem(item.uid, 1) end 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.