Ir para conteúdo
  • 0

[Galera Ajuda Porfavor] Vip_Time Error


LeoTK

Pergunta

galera estou com um problema no meu vip_time eu baixei meu server e ele veio tudo configurado para mysql para site eu troquei quase tudo pra sqlite pra jogar sem o site mais quando eu do use no iten que da a vip o vip_time da erro irei colocar a

 

ACTION VIP:

function onUse(cid, item, fromPosition, itemEx, toPosition)

local config={

removeOnUse = "yes" -- remover quando usar ("yes" or "no")

}

local days = 30 -- dias que serão adicionados

local daysvalue = days * 24 * 60 * 60

local storageplayer = getPlayerStorageValue(cid, 13540)

local timenow = os.time()

if getPlayerStorageValue(cid, 13540) - os.time() <= 0 then

time = timenow + daysvalue

else

time = storageplayer + daysvalue

end

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados ".. days .." dias de VIP no seu character.")

setPlayerStorageValue(cid, 13540, time)

local quantity = math.floor((getPlayerStorageValue(cid, 13540) - timenow)/(24 * 60 * 60))

doSendMagicEffect(getPlayerPosition(cid), math.random(28,30))

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. quantity .." dias de VIP restantes.")

if (config.removeOnUse == "yes") then

doRemoveItem(item.uid, 1)

end

return TRUE

end

 

 

CREATURESCTRIP VIP:

--[[ by vodkart ]]--

function onLogin(cid)

 

if getPlayerStorageValue(cid, 13540) - os.time() > 0 then

setPlayerStorageValue(cid, 9898, 1)

end

 

local pos = {x = 70, y = 30, z = 7} -- posiçao do templo.

 

function Vodka(cid)

if isPlayer(cid) then

db.executeQuery("UPDATE `players` SET `name` = '"..string.sub(getCreatureName(cid), 7).."' WHERE `id` = "..getPlayerGUID(cid)..";")

doRemoveCreature(cid)

end

end

 

if getPlayerStorageValue(cid, 9898) == 1 and getPlayerStorageValue(cid, 13540) - os.time() < 1 or getPlayerStorageValue(cid, 13540) - os.time() == 0 then

doTeleportThing(cid, pos)

doPlayerPopupFYI(cid, "Sua vip Account acabou.")

setPlayerStorageValue(cid, 9898, -1)

if string.find(tostring(getCreatureName(cid)),"[[Vip]]") then

addEvent(Vodka, 3*1000, cid)

end

end

return TRUE

end

 

 

 

BOM QUEM PUDER ME DIZER OU ARRUMAR AHH SCTRIP EU DO +REP VALEUS

Link para o comentário
Compartilhar em outros sites

0 respostass a esta questão

Posts Recomendados

Até agora não há respostas para essa pergunta

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...