Ir para conteúdo
  • 0

Talkaction god dar storage por tempo


maikons

Pergunta

Galera dessa vez venho fazer um pedido

 

To com um script do Vodkart que vc compra uma storage por uma talkaction por dias (3) e custa 1kk!

Mas eu queria uma talkaction que o god desse essa storage pro player

Alguém sabe fazer?

 

Script da talkaction de comprar a storage:

 

 

function onSay(cid, words, param)

local storage,days,price = 666,3,2000

if getPlayerStorageValue(cid, storage) >= os.time() then

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"você ainda tem storage até "..os.date("%d %B %Y %X ", getPlayerStorageValue(cid,storage))..".") return true

elseif not doPlayerRemoveMoney(cid, price) then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "você precisa de "..price.." gps para comprar "..days.." dias de storage.") return true

end

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"você comprou "..days.." dias de storage.")

setPlayerStorageValue(cid, storage, os.time()+days*86400)

return true

end

 

 

Link para o comentário
https://xtibia.com/forum/topic/215617-talkaction-god-dar-storage-por-tempo/
Compartilhar em outros sites

3 respostass a esta questão

Posts Recomendados

function onSay(cid, words, param)

 

local player = getPlayerByNameWildcard(param)

local days = 3

local storage = 39202

 

if player then

if getPlayerStorageValue(player, storage) >= os.time() then

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"o player ainda tem storage até "..os.date("%d %B %Y %X ", getPlayerStorageValue(player,storage))..".") return true end

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"vc adc a storage pro " .. param)

setPlayerStorageValue(player, storage, os.time()+days*86400)

else

doPlayerSendCancel(cid, "O PLAYER TA OFF OU N EXISTE.")

end

return true

end

Link para o comentário
https://xtibia.com/forum/topic/215617-talkaction-god-dar-storage-por-tempo/#findComment-1528048
Compartilhar em outros sites

function onSay(cid, words, param)

 

local player = getPlayerByNameWildcard(param)

local days = 3

local storage = 39202

 

if player then

if getPlayerStorageValue(player, storage) >= os.time() then

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"o player ainda tem storage até "..os.date("%d %B %Y %X ", getPlayerStorageValue(player,storage))..".") return true end

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"vc adc a storage pro " .. param)

setPlayerStorageValue(player, storage, os.time()+days*86400)

else

doPlayerSendCancel(cid, "O PLAYER TA OFF OU N EXISTE.")

end

return true

end

 

Vlw cara funcional! Obrigado!

 

Vou reportar pra fecharem :D

Link para o comentário
https://xtibia.com/forum/topic/215617-talkaction-god-dar-storage-por-tempo/#findComment-1528058
Compartilhar em outros sites

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...