Ir para conteúdo

Bike Sistem


Flavio97

Posts Recomendados

Venho Trazer + 1 sistema Para Centurion Talvez Pegue No Lunus

Vamus La

 

va em data/actions/script crie um arquivo.lua chamado bike e coloque drento

 

 

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

local sBike = 2547

local t = {

[2547] = {article='a', name='bike', text='Mount, bike!', dtext='Demount, bike!', s=5700, 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 getPlayerStorageValue(cid, s) <= 0 then

doCreatureSay(cid, r.text, 19)

setPlayerStorageValue(cid, s, 1)

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

BikeSpeedOn(cid,800)

if getPlayerSex(cid) == 1 then

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

else

doSetCreatureOutfit(cid, {lookType = 1393, 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)

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

 

 

em vermelho sao e as ID da bike que voce clica para montar

 

Em data/action/action.xml adicione a TAG

 

 

<action itemid="2547" event="script" value="Bike.lua"/>

 

 

Vermelho ID da Bike

 

Azul Nome da Bike Arquivo.lua ex: Bike.lua

 

GOSTO ? REP++

 

Creditos Pra quem Criou O Sistema

Creditos A min Que troce Para Vcs =)

 

Spoiler arrumado

Editado por Flavio97
Link para o comentário
Compartilhar em outros sites

  • 4 weeks later...
×
×
  • Criar Novo...