.Qual servidor ou website você utiliza como base?
Base DXP
Qual o motivo deste tópico?
Problema em armazenar valor correto no storage.
Está surgindo algum erro? Se sim coloque-o aqui.
Você tem o código disponível? Se tiver publique-o aqui:
local sorte = {600001, 0}
local onoff = 0
function onUse(cid, item, fromPos, toPos)
if onoff == 0 then
sorte[2] = getPlayerStorageValue(cid, sorte[1]) + 1.30
setPlayerStorageValue(cid, sorte[1], sorte[2])
doPlayerSendTextMessage(cid, 22, "Valor da storage:" ..sorte[2].. ".")
doPlayerSendTextMessage(cid, 22, "O seu trevo está ligado.")
onoff = 1
else
sorte[2] = getPlayerStorageValue(cid, sorte[1]) - 1.30
setPlayerStorageValue(cid, sorte[1], sorte[2])
doPlayerSendTextMessage(cid, 22, "Valor da storage:" ..sorte[2].. ".")
doPlayerSendTextMessage(cid, 22, "O seu trevo está desligado.")
onoff = 0
end
end
Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.