Jump to content

Train Sync


MasterTobi

Recommended Posts

Speed 10... Sounds pretty drastic, isn't somewhere between 1 and 1.5 the max speed of the Infernus? :shock:

Anyway, if a car goes further than a specific range, MTA doesn't do anything with it anymore until it comes back into the screen. The reason for this is that areas in GTA San Andreas beyond a specific distance from the camera (± 300 meters if I remember correctly) don't have any collisions and all that loaded.

It could also have something to do with a current bug with trains and corners. (issue #4829)

In the first case, you can try solving it by warping the player into the train, or let him follow it. In the second case, you can only put the train somewhere else, or try to fix the issue in the MTA source code. But that would be a very hard thing to do, so that means you'll just need to be patient in this case.

Link to comment

hm ok :( but there is function names engineSetModelLODDistance ( int model, float distance ). It means i can switch the distance from an object or model over 500units or not ?!

But when i write

engineSetModelLODDistance (449, 1000 )

or

Tram1 = createVehicle(449,1794.4580078125, -1953.744140625, 13.546875, 90.476531982422 )
engineSetModelLODDistance (Tram1, 1000 )

"499 = Tram" then say me the Console engineSetModelLODDistance attempt to call global

what is wrong?! i need help :)

Link to comment

Hm...im not sure about that, but it should be possible to port your Ped into a Train

and setting his ControlState for driving forwards to true.

First you put your Ped into the Created Train (Vehicle-Definition "YourTrain") with the Ped-Definition "Traindriverped".

Then...

setTrainDerailable( YourTrain, false)
setPedControlState ( Traindriverped, "forwards", true )

After this you check if the Ped entered a Area/Gangzone (near a Station) and set the Trains Speed to 0.

Or you get the Players Speed and reduce the Speed till it´s 0.

Link to comment

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...