Postado Junho 8, 2020 5 anos mesma coisa ele da 7 dias de premium mas criao player toda hora ai vai aumentando ,queria apenas 1 x por acc Editado Junho 8, 2020 5 anos por Mutilok (veja o histórico de edições)
Postado Junho 8, 2020 5 anos Autor Diretor 3 minutos atrás, Mutilok disse: mesma coisa ele da 7 dias de premium mas criao player toda hora ai vai aumentando ,queria apenas 1 x por acc vipganhos = 7, -- Quantidade de vip ganhos na conta. function onUse(cid, item, fromPosition, itemEx, toPosition) --Script by L3K0T local leko = { itemqt = 1, --quantidade de item que vai ser usado vipganhos = 7, -- Quantidade de vip ganhos na conta. verificarvip = 0, -- verificação no banco de dados. msg = "Você ganhou 2 dias de vip.", --menssagem que o player recebe dentro do jogo. msgfail = "Falhou", --apenas pra testar o sistema, para desativar é só por -- do lado aonde marquei com A. ver = 1 } if getPlayerVipLeko(cid) == leko.verificarvip then doPlayerAddPremiumDays(cid, leko.vipganhos) doPlayerAddVipLeko(cid, leko.ver) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, leko.msg) doRemoveItem(item.uid, leko.itemqt) end if getPlayerVipLeko(cid) == leko.ver then --A doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, leko.msgfail) --A end --A return true end --Funções banco de dados by L3K0T function getPlayerVipLeko(cid) local Verh = db.getResult("SELECT `verificar` FROM `accounts` WHERE `id` = " .. getPlayerAccountId(cid) .. "") if Verh:getID() ~= LUA_ERROR then local VerP= Verh:getDataInt("verificar") Verh:free() return VerP end return LUA_ERROR end function doPlayerAddVipLeko(cid, ver) local verih = getPlayerVipLeko(cid) + ver if verih >= 0 then db.query("UPDATE `accounts` SET `verificar` = `verificar` + " .. ver .. " WHERE `id` = " .. getPlayerAccountId(cid) .. ";") return TRUE end return FALSE end function doPlayerRemoveVipLeko(cid, ver) local veriih = getPlayerVipLeko(cid) - ver if veriih >= 0 then db.query("UPDATE `accounts` SET `verificar` = `verificar` - " .. ver .. " WHERE `id` = " .. getPlayerAccountId(cid) .. ";") return TRUE end return FALSE end Eu sou um entusiasta da programação apaixonado por ajudar a comunidade open source a crescer. Sempre em busca de novos desafios e oportunidades para contribuir com meu código. #OpenSource #Programação #Contribuição
Postado Junho 8, 2020 5 anos asim e um item inicial no meu servidor ale add bless + um efeito doSendDistanceShoot(position, {x = position.x + math.random(-7, 7), y = position.y + math.random(-5, 5), z = position.z}, math.random(1,41)) tem como adicionar pelo menos os efeitos ?
Postado Junho 8, 2020 5 anos Autor Diretor 3 horas atrás, Mutilok disse: asim e um item inicial no meu servidor ale add bless + um efeito doSendDistanceShoot(position, {x = position.x + math.random(-7, 7), y = position.y + math.random(-5, 5), z = position.z}, math.random(1,41)) tem como adicionar pelo menos os efeitos ? function onUse(cid, item, fromPosition, itemEx, toPosition, position) --Script by L3K0T local leko = { itemqt = 1, --quantidade de item que vai ser usado vipganhos = 7, -- Quantidade de vip ganhos na conta. verificarvip = 0, -- verificação no banco de dados. msg = "Você ganhou 2 dias de vip.", --menssagem que o player recebe dentro do jogo. msgfail = "Falhou", --apenas pra testar o sistema, para desativar é só por -- do lado aonde marquei com A. ver = 1, position = getCreaturePosition(cid), def = 1, atef = 41, } if getPlayerVipLeko(cid) == leko.verificarvip then doPlayerAddPremiumDays(cid, leko.vipganhos) doPlayerAddVipLeko(cid, leko.ver) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, leko.msg) doRemoveItem(item.uid, leko.itemqt) doSendDistanceShoot(leko.position, {x = leko.position.x + math.random(-7, 7), y = leko.position.y + math.random(-5, 5), z = leko.position.z}, math.random(leko.def,leko.atef)) end if getPlayerVipLeko(cid) == leko.ver then --A doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, leko.msgfail) --A --doSendDistanceShoot(leko.position, {x = leko.position.x + math.random(-7, 7), y = leko.position.y + math.random(-5, 5), z = leko.position.z}, math.random(leko.def,leko.atef)) test end --A return true end --Funções banco de dados by L3K0T function getPlayerVipLeko(cid) local Verh = db.getResult("SELECT `verificar` FROM `accounts` WHERE `id` = " .. getPlayerAccountId(cid) .. "") if Verh:getID() ~= LUA_ERROR then local VerP= Verh:getDataInt("verificar") Verh:free() return VerP end return LUA_ERROR end function doPlayerAddVipLeko(cid, ver) local verih = getPlayerVipLeko(cid) + ver if verih >= 0 then db.query("UPDATE `accounts` SET `verificar` = `verificar` + " .. ver .. " WHERE `id` = " .. getPlayerAccountId(cid) .. ";") return TRUE end return FALSE end function doPlayerRemoveVipLeko(cid, ver) local veriih = getPlayerVipLeko(cid) - ver if veriih >= 0 then db.query("UPDATE `accounts` SET `verificar` = `verificar` - " .. ver .. " WHERE `id` = " .. getPlayerAccountId(cid) .. ";") return TRUE end return FALSE end Eu sou um entusiasta da programação apaixonado por ajudar a comunidade open source a crescer. Sempre em busca de novos desafios e oportunidades para contribuir com meu código. #OpenSource #Programação #Contribuição
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.