function onSay(cid, words, param)
local days = 10
local price = 50000
local storage = 7777
local daysvalue = days * 24 * 60 * 60
local storageplayer = getPlayerStorageValue(cid, 13001)
local timenow = os.time()
if getPlayerStorageValue(cid, 13001) - os.time() <= 0 then
time = timenow + daysvalue
else
time = storageplayer + daysvalue
end
if(words == "!buyvip") then
if not doPlayerRemoveMoney(cid, price) then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você precisa de "..price.." gp's para colocar vip.")
doPlayerAddItem(cid,2148,50000)
return true
end
if getPlayerStorageValue(cid, storage) ~= 1 then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você precisa completar a quest para renovar sua vip.") return true
end
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados "..days.." dias de VIP no seu character.")
setPlayerStorageValue(cid, 13001, time)
end
return true
end