LO

[Encerrado] Bike System Do Slicer

Por loucodemais, 03 de nov. de 2012 em Tópicos Sem Resposta

script
5
626
loucodemaisL
03 de novembro de 2012 às 22:13

 

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

 

local sBike = 5701

 

local t = {

[12782] = {article='a', name='bike', text='Mount, bike!', dtext='Demount, bike!', s=5700, condition=bikeCondition},

} --mude o [ ] pro id do item q vai usar a bike...

 

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 #getCreatureSummons(cid) >= 1 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 getPlayerStorageValue(cid, s) <= 0 then

doSendMagicEffect(pos, 177)

doCreatureSay(cid, r.text, 19)

setPlayerStorageValue(cid, s, 1)

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'You have mounted ' .. r.article .. ' '.. r.name .. '.')

BikeSpeedOn(cid,500)

if getPlayerSex(cid) == 1 then

doSetCreatureOutfit(cid, {lookType = 1490, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1)

else

doSetCreatureOutfit(cid, {lookType = 1482, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1)

end

elseif getPlayerStorageValue(cid, s) == 1 then

doSendMagicEffect(pos, 177)

doCreatureSay(cid, r.dtext, 19)

setPlayerStorageValue(cid, s, 0)

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'You haven demouted ' .. r.article .. ' '.. r.name .. '.')

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

 

 

slicer ou alguem q saiba... eu coloquei a bike do kpdo no meu serve ai trokei ai no script mais n ficou coloria como q faiz pra ele fica colorida?

 

 

 

eu tetei bota assim:

 

doSetCreatureOutfit(cid, {lookType = 1490, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1)

else

doSetCreatureOutfit(cid, {lookType = 1482, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1)

 

não pegou =/. tem outro geito?

 

tanto tentei que conssegui sozinho dnovo ^^

Editado Novembro 3 por loucodemais

HolyMaNH
04 de novembro de 2012 às 11:45

altera essa parte

 if getPlayerSex(cid) == 1 then
doSetCreatureOutfit(cid, {lookType = 1490, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1)
else
doSetCreatureOutfit(cid, {lookType = 1482, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1)
end

para essa:

if getPlayerSex(cid) == 1 then
  doSetCreatureOutfit(cid, {lookType = 1490, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}, -1)
  else
   doSetCreatureOutfit(cid, {lookType = 1482, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}, -1)
  end 

loucodemaisL
04 de novembro de 2012 às 14:11

GOD Gniu

 

ja conssegui antes, mais vlw talvez tenha alguem q precise tbm =D

 

 

 

alguem pode mover o topico?

SlicerS
04 de novembro de 2012 às 16:58

o topico ja esta movido... tentem n postar coisas nessa area...

Editado Novembro 4 por Slicer

5 anos depois...
StigalS
20 de abril de 2018 às 00:34
A questão neste tópico de suporte foi encerrada por falta de respostas. Este tópico está fechado e foi movido para Suporte - Tópicos Sem Resposta.

+ Caso a dúvida não tenha sido resolvida você poderá criar outro tópico solicitando ajuda.
* Lembre-se que é permitido dar UP no tópico a cada 24 horas para assim o destacar e manter movimentado.