Ir para conteúdo

Featured Replies

Postado
  • Autor

e a configuração das direçoes tem como ser pelo teclado (pq num antigo sv de 1 amigo o sistema do treno se controlava segurando CTRL+ as setas no teclado :/)

  • Respostas 12
  • Visualizações 1.1k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

Postado
  • Autor

local CAR_ID = {1675, 1676, 1674, 1677}
function onStepIn(cid, item, pos, frompos)
if isPlayer(cid) == TRUE then
if item.actionid <= 100 or item.actionid == getPlayerAccountId(cid)+100 then
local carpos = getThingPos(item.uid)
addEvent(carMove, 200, {cid = cid, oldpos = carpos})
doItemSetAttribute(item.uid, "aid", getPlayerAccountId(cid)+100)
doItemSetAttribute(item.uid, "description", "This vehicle belongs to "..getCreatureName(cid)..".")
else
doPlayerSendCancel(cid, "This vehicle does not belong to you.")
doSendMagicEffect(pos, CONST_ME_POFF)
end
end
end

function carMove(param)
local car = getThingfromPos(param.oldpos)
local newpos = getPlayerLookPos(param.cid)
if getDistanceBetween(getThingPos(param.cid), param.oldpos) == 0 and car.actionid == getPlayerAccountId(param.cid)+100 then
if isInArray(CAR_ID, car.itemid) == true then
local tmp = newpos
tmp.stackpos = 253
if doTileQueryAdd(car.uid, newpos) == 1 and getTilePzInfo(newpos) == FALSE and isCreature(getThingFromPos(tmp).uid) == FALSE then
local carid = CAR_ID[getPlayerLookDir(param.cid)+1]
local newcar = doCreateItem(carid, 1, newpos)
doItemSetAttribute(newcar, "aid", car.actionid)
doItemSetAttribute(newcar, "description", car.description)
doRemoveItem(car.uid, 1)
doTeleportThing(param.cid, newpos, FALSE)
doSendMagicEffect(param.oldpos, CONST_ME_GROUNDSHAKER)
end
end
end
return true
end


Créditos:JordanHenry (OTland) 99%
               Eu 1% por corre atras na net 

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