Jump to content

trains


Oekeokiki

Recommended Posts

Posted

Hello all,

I am trying to let a train drive across the bidge between San Fierro and the desert.

The problem is, when I use /train, the train is spawning but not starting to ride/drive.

I used for setTrainSpeed (train, 50) and (train, 0.5) but none of these work.

Is there something wrong with my script or is it just not possible?

btw: I changed the script to serverside but it doesn't work either.

function train (command)
local train = createVehicle (537, -1514, 576, 35)
local trainped = createPed (252, -1515, 580, 35)
warpPedIntoVehicle (trainped, train)
setTrainSpeed (train, 50)
end
addCommandHandler ("train", train)

Thanks in advance,

Oekeokiki

Posted

He was as close as seeing the train, though I don't know how close you have to be.

Did you try to use setTrainDirection before the speed as well?

Posted
He was as close as seeing the train, though I don't know how close you have to be.

Did you try to use setTrainDirection before the speed as well?

Yes i did, i tried every possible solution and order i could imagine :P

Posted

Trains are kind of buggy. At least I think they still are, the issues started somewhere in the nightlies, before 1.0 and I can't find any changelog entries about them.

Posted

Ok, so the trains are just buggy. But is that also the reason why this doesn't work or not? The problem is that i even don't get errors from the console.

Posted
Ok, so the trains are just buggy. But is that also the reason why this doesn't work or not? The problem is that i even don't get errors from the console.

The bug I noticed was about trains having difficulties with moving, especially in turns. If you're close enough to the train for it to have streamed in, then I can't really see any reason why it shouldn't work.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...