Ir para conteúdo

Featured Replies

Postado

.Qual servidor ou website você utiliza como base? 

Cyan 8.54

Qual o motivo deste tópico? 

Galera queria saber como faço para poder usa a bike e o poké no mesmo tempo.

tipo sempre que eu tento usa o poke enquanto estou utilizando a bike ele não sai ?

 

Você tem o código disponível? Se tiver publique-o aqui: 

local function BikeSpeedOn(cid, t)                  
setPlayerStorageValue(cid, t.s, t.speed) 
doChangeSpeed(cid, -getCreatureSpeed(cid)) 
doChangeSpeed(cid, t.speed) 
end 

local function BikeSpeedOff(cid, t)
setPlayerStorageValue(cid, t.s, -1) 
doRegainSpeed(cid) 
end 

local t = {text='Voce Subiu na Moto!', dtext='Voce Desceu da Moto!', s=5700, speed = 9500}

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

local pos = getThingPos(cid) 

if #getCreatureSummons(cid) >= 1 then
return doPlayerSendCancel(cid, "Retorna seu pokemon para pokebola.")
end
if getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 or 
getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 75846) >= 1 or
getPlayerStorageValue(cid, 6598754) >= 1 or getPlayerStorageValue(cid, 6598755) >= 1 then   --alterado v1.9
   return doPlayerSendCancel(cid, "You can't do that right now.")
end

if getPlayerStorageValue(cid, t.s) <= 0 then
   doSendMagicEffect(pos, 177)
   doCreatureSay(cid, t.text, 19)
   doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'Voce Subiu na Moto.')
   BikeSpeedOn(cid, t)
   if getPlayerSex(cid) == 1 then
      doSetCreatureOutfit(cid, {lookType = 1829}, -1)
   else
       doSetCreatureOutfit(cid, {lookType = 1830}, -1)
   end
else
   doSendMagicEffect(pos, 177)
   doCreatureSay(cid, t.dtext, 19)
   doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'Voce Desceu da Moto.')
   BikeSpeedOff(cid, t)
   doRemoveCondition(cid, CONDITION_OUTFIT)
end
return true
end

 

Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui. 

 

Jamais se desespere em meio as sombrias afeiçoes da sua vida, pois das nuvens mais negras cai água límpida e fecunda

Postado
2 horas atrás, louco3626 disse:

.Qual servidor ou website você utiliza como base? 

Cyan 8.54

Qual o motivo deste tópico? 

Galera queria saber como faço para poder usa a bike e o poké no mesmo tempo.

tipo sempre que eu tento usa o poke enquanto estou utilizando a bike ele não sai ?

 

Você tem o código disponível? Se tiver publique-o aqui: 

local function BikeSpeedOn(cid, t)                  
setPlayerStorageValue(cid, t.s, t.speed) 
doChangeSpeed(cid, -getCreatureSpeed(cid)) 
doChangeSpeed(cid, t.speed) 
end 

local function BikeSpeedOff(cid, t)
setPlayerStorageValue(cid, t.s, -1) 
doRegainSpeed(cid) 
end 

local t = {text='Voce Subiu na Moto!', dtext='Voce Desceu da Moto!', s=5700, speed = 9500}

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

local pos = getThingPos(cid) 

if #getCreatureSummons(cid) >= 1 then
return doPlayerSendCancel(cid, "Retorna seu pokemon para pokebola.")
end
if getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 or 
getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 75846) >= 1 or
getPlayerStorageValue(cid, 6598754) >= 1 or getPlayerStorageValue(cid, 6598755) >= 1 then   --alterado v1.9
   return doPlayerSendCancel(cid, "You can't do that right now.")
end

if getPlayerStorageValue(cid, t.s) <= 0 then
   doSendMagicEffect(pos, 177)
   doCreatureSay(cid, t.text, 19)
   doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'Voce Subiu na Moto.')
   BikeSpeedOn(cid, t)
   if getPlayerSex(cid) == 1 then
      doSetCreatureOutfit(cid, {lookType = 1829}, -1)
   else
       doSetCreatureOutfit(cid, {lookType = 1830}, -1)
   end
else
   doSendMagicEffect(pos, 177)
   doCreatureSay(cid, t.dtext, 19)
   doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'Voce Desceu da Moto.')
   BikeSpeedOff(cid, t)
   doRemoveCondition(cid, CONDITION_OUTFIT)
end
return true
end

 

Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui. 

 

 

Cara tenta usar esse aki

Spoiler

function onUse(cid, item, fromPosition, itemEx, toPosition)
local sBike = 2547
local t = {
[13334] = {article='a', name='Bike', text='Montou na Bike,', dtext='Desceu da Bike', s=9999, condition=bikeCondition},
}
function BikeSpeedOn(cid,nSpeed)
setPlayerStorageValue(cid,sBike,getCreatureSpeed(cid))
doChangeSpeed(cid,-getCreatureSpeed(cid))
doChangeSpeed(cid,nSpeed)
end
function BikeSpeedOff(cid)
doChangeSpeed(cid,-getCreatureSpeed(cid))
doChangeSpeed(cid,getPlayerStorageValue(cid,sBike))
end
 
local v, r = getCreaturePosition(cid), t[item.itemid]
local s = r.s
local pos = {x = v.x, y = v.y, z = v.z}
if r then
if getPlayerStorageValue(cid, 25000) == 5 then
return
end
if getPlayerStorageValue(cid, 23000) == 5 then
return
end
 
if getPlayerStorageValue(cid, 17001) == 1 or getPlayerStorageValue(cid, 63215) == 1 or getPlayerStorageValue(cid, 17000) == 1 then
doPlayerSendCancel(cid, "You can't use bike while ride/fly/surf.")
return true
end
if getPlayerSlotItem(cid, CONST_SLOT_AMMO).uid == item.uid then
doPlayerSendCancel("Não está no slot correto")
return true
end
if getPlayerStorageValue(cid, s) <= 0 then
doCreatureSay(cid, r.text, 19)
setPlayerStorageValue(cid, s, 1)
BikeSpeedOn(cid,140000)
if getPlayerSex(cid) == 1 then
doSetCreatureOutfit(cid, {lookType = 1829, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1)
else
doSetCreatureOutfit(cid, {lookType = 1829, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1)
end
 
elseif getPlayerStorageValue(cid, s) == 1 then
doCreatureSay(cid, r.dtext, 19)
setPlayerStorageValue(cid, s, 0)
BikeSpeedOff(cid)
return doRemoveCondition(cid, CONDITION_OUTFIT)
else
return doPlayerSendCancel(cid, 'You can\'t do this.')
end
else
return doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE, 'Report bugs in Bike system.')
end
end

 

Em local sBike = "2547 "  < Você coloca o id aonde a bike vai ficar se tiver um sloot certo para ela so mudar e colocar o lugar do sloot se n tiver pode deixar esse ai
Em local t = { [13334] =  < você coloca o id da bike q vai trasforma

 

E em tag vc coloca

 

<action itemid="ID DO ITEM DA BIKE" event="script" value="NOME DO ARQUIVO.lua"/>

Editado por iury alves potter
Faltando informação (veja o histórico de edições)

Postado
  • Autor
39 minutos atrás, iury alves potter disse:

Cara tenta usar esse aki

  Mostrar conteúdo oculto

function onUse(cid, item, fromPosition, itemEx, toPosition)
local sBike = 2547
local t = {
[13334] = {article='a', name='Bike', text='Montou na Bike,', dtext='Desceu da Bike', s=9999, condition=bikeCondition},
}
function BikeSpeedOn(cid,nSpeed)
setPlayerStorageValue(cid,sBike,getCreatureSpeed(cid))
doChangeSpeed(cid,-getCreatureSpeed(cid))
doChangeSpeed(cid,nSpeed)
end
function BikeSpeedOff(cid)
doChangeSpeed(cid,-getCreatureSpeed(cid))
doChangeSpeed(cid,getPlayerStorageValue(cid,sBike))
end
 
local v, r = getCreaturePosition(cid), t[item.itemid]
local s = r.s
local pos = {x = v.x, y = v.y, z = v.z}
if r then
if getPlayerStorageValue(cid, 25000) == 5 then
return
end
if getPlayerStorageValue(cid, 23000) == 5 then
return
end
 
if getPlayerStorageValue(cid, 17001) == 1 or getPlayerStorageValue(cid, 63215) == 1 or getPlayerStorageValue(cid, 17000) == 1 then
doPlayerSendCancel(cid, "You can't use bike while ride/fly/surf.")
return true
end
if getPlayerSlotItem(cid, CONST_SLOT_AMMO).uid == item.uid then
doPlayerSendCancel("Não está no slot correto")
return true
end
if getPlayerStorageValue(cid, s) <= 0 then
doCreatureSay(cid, r.text, 19)
setPlayerStorageValue(cid, s, 1)
BikeSpeedOn(cid,140000)
if getPlayerSex(cid) == 1 then
doSetCreatureOutfit(cid, {lookType = 1829, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1)
else
doSetCreatureOutfit(cid, {lookType = 1829, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1)
end
 
elseif getPlayerStorageValue(cid, s) == 1 then
doCreatureSay(cid, r.dtext, 19)
setPlayerStorageValue(cid, s, 0)
BikeSpeedOff(cid)
return doRemoveCondition(cid, CONDITION_OUTFIT)
else
return doPlayerSendCancel(cid, 'You can\'t do this.')
end
else
return doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE, 'Report bugs in Bike system.')
end
end

 

Em local sBike = "2547 "  < Você coloca o id aonde a bike vai ficar se tiver um sloot certo para ela so mudar e colocar o lugar do sloot se n tiver pode deixar esse ai
Em local t = { [13334] =  < você coloca o id da bike q vai trasforma

 

E em tag vc coloca

 

<action itemid="ID DO ITEM DA BIKE" event="script" value="NOME DO ARQUIVO.lua"/>

 

Aeww Vlw cara funcionou aqui <3

Jamais se desespere em meio as sombrias afeiçoes da sua vida, pois das nuvens mais negras cai água límpida e fecunda

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.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo