KE
dúvida

Ajuda Com Esse Script De Door

Por KennyConrad, 14 de nov. de 2012 em Scripts

script
2
884
KennyConradK
14 de novembro de 2012 às 10:06

Galera meu script de door por resets está com um bug ao player abrir a porta a porta abre normalmente ao ele sair a porta fecha normalmente mais se ele clica na porta com a porta aberta a porta começa a se transformar em outras portas teria como alguem me ajudar aki está o script

 

function getResets(cid)
local check = db.getResult("SELECT `reset` FROM `players` WHERE `id`= "..getPlayerGUID(cid))
return check:getDataInt("reset") <= 0 and 0 or check:getDataInt("reset") end
function onUse(cid, item, frompos, item2, topos)
local reset_need = 30
if getResets(cid) < reset_need then
return doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "Voce não tem mais de "..reset_need.." resets.")
end
doTransformItem(item.uid, item.itemid + 1)
doTeleportThing(cid, topos, TRUE)
return true
end

Yan OliveiraY
14 de novembro de 2012 às 16:26

Ve se da certo agora:

 

function getResets(cid)
local check = db.getResult("SELECT `reset` FROM `players` WHERE `id`= "..getPlayerGUID(cid))
return check:getDataInt("reset") <= 0 and 0 or check:getDataInt("reset") end
function onUse(cid, item, frompos, item2, topos)
local reset_need = 30
if getResets(cid) < reset_need then
return doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "Voce não tem mais de "..reset_need.." resets.")
end
doTransformItem(item.uid, item.itemid + 1)
doTeleportThing(cid, topos, true)
return false
end