[RELEASE] FiveM Freight train (AI) and enterable trams (as passenger) (Suited for Roleplay to)

hello

Dose anyone know how to add more cars to the freight train to make more realistic like for Role Play

thz

hello, i dont know how to dev.

Just wanted to point all the recent messages and questions in regards to this mod/script to the fact that it’s very important to read the initial post.

Reason for this is that there are SEVERE issues with this script, these issues are due to the game engine not being compatible with how we wanted to spawn the trains and how GTA itself actually tried to ‘migrate’ the ‘active objects’ to the closest player being the host.

Lot’s of explanation to exactly explain how and why these things are a problem, but the ‘tldr explanation’ is just: Don’t use this mod/script (anymore) or be prepared for trains suddenly de-spawning etc.

As for questions as "how can i make the trains longer’ etc etc: You can’t when using it this way. This script just uses the original methods of spawning (the trains are NOT manually scripted but just triggered to ‘activate the native trains’). However this native system (used in this way) is not anything near stable.

2 Likes

prop_train_ticket_02
or
prop_train_ticket_02_tu

hej hur ska man kunna jonia server

I’m being pushed backwards in the train and I can’t walk how can I fix this?

My script is working fine, but when the subway arrives, it opens the doors automatically, and because of that sometimes the player enters the subway and ends up leaving alone a few seconds later. Is there any way to block the doors from opening or hitch the ped to the train?

Script crashes my game as soon aas I load in

Sorry, I replied as fast as possible but it’s up for moderation once again, which is also one of the reasons why I stopped working on FiveM back then (delaying support, reply’s and wasting time for me with it) :woman_facepalming:

Like my post already states at the top:
NOTE: Mine is abandoned! an no longer being worked on by me!
You can still use mine if you like, but it has known bugs (as listed bellow), and
isn’t marked as 100% finished either yet!

I have stopped working on FiveM or GTA V scripts for over 4 years now, and lots has changed with FiveM, so compatibility is highly doubtful due to the many changes which FiveM kept implementing, the fact that a lot of stuff was still in development or research when this train system was build/experimented with, and then there is OneSync (which is even a completly different system, of which I don’t know if this script is compatible).

But with just a simple “Crashes my game as soon as i load in”, nobody will be able to help you at all :wink:

IF people are able to help out they need a decent crash report/log or at least more information like:
What server are you running on, what version/release are you running on (are you for example forcing it to run a previous DLC, or the latest one etc). What are the frameworks or possible other conflicting scripts you are using etc.

Maybe with a bit more information like that others might be able to help you, I unfortunately can’t help anymore since I don’t do anything with FiveM at all anymore.

Maybe someone even has a new/better version by now which does what mine did :slight_smile:

I have a question, am I able to put the metro on ymap tracks that were custom made, or will it only specifically be able to work on the rails inside the game?

Honestly? This system doesn’t work decently at all (anymore). It literally has been years since I used it myself, or since I have looked at it.

All this has been said in the main post though (shown in bold even), please read the main post to see the issues, and where to find a (possible) newer version of someone who took over from me (if he’s still working on it though).

My friend! Got everything working but the option to stop and board the tram. (I got it working once somehow someway hours ago but haven’t been able to get it since. What is the functionality to do so? The damn subway just keeps going.

  • Daniel

Hey Daniel,

Like mentioned in my previous reply to someone else and stated in the main post, this script is VERY outdated and quite problematic (by now). I personally recommend not to use it at all anymore to be honest (I myself haven’t for years, and neither have I worked on it for years anymore).

In the main post I have linked to someone whom took over and ‘upgraded it’, but I will have to be honest: I don’t know how far he got, don’t know what he changed and if he still maintains it.

The stopping of the trains however was never part of this script. I used ‘forced spawned trains’ which ran using the game engine itself. However it turned out that when more and more people joined the server that it could become VERY problematic due to the game engine and the way it handles the train/traffic system.

It would for example cause several trains to spawn at the same time, it would cause trains to suddenly despawn and more of the alike.

So IF you got it working, please keep this in mind, because in my personal opinion it would be a much better solution to just enable the main trains/tracks while not letting this script manage the trains themselves :slight_smile:

1 Like

It saids the last time he logged in was middle of 2022 … not gonna work. We need someone else now who knows more on what to do. Cause thats no bueno!! 100’s of other servers already have it working, but a little unfair nobody has come forth except you guys and it’s been limited support…

Hold on, I will download it from github, and see if it can ‘remove the crashing code’

And implement the ‘snippet’ I just added to the main post.

That however should not fix all problems, BUT I expect (NO PROMISES THOUGH!) that It would solve most problems

DO NOT KNOW however if the ‘standard railroad track activation’ will also cause the trains/metro’s to stop at stations, you’ll have to try that yourself if you don’t mind.

BUT do please also keep in mind: This is not ‘official support’ and does not mean I’m “back at this script” for maintaining it again :wink: :slightly_smiling_face:

I have since moved on from the regular FiveM servers onto other larger projects (not FiveM related), and thus have very limited time… but will take a quick glance and see what I can do.

1 Like

Thank you so much!! I have been trying to ride the actual subway for 3-4 hours now trying to figure this out lol. I even jumped in front of the train to try and stop it… should’ve known better lol

On another note, how do you change the vanilla train (freight train) to something like a “bullet train” model ? I’d imagine that’s an easier task but I’ve never done it.

Np, I have the trains working now (enterable and stopping) activating the native system…

However I now need to figure out a way to automatically give players a 1 star wanted level when entering a train without a ticket… (since the doors are now automatically opening and closing also).

However it has been quite a while I messed with FiveM, so I’m trying to find some natives for it (not all respond as you might expect, so please hold on a bit longer).

For the model change you would have to stream a new train model to replace the old one, but that’s a whole different story though :wink:

I would recommend searching the forum for something like: Streaming custom vehicles :slight_smile:

Goated . Appreciate that!! We’re looking for your new download link! lol

I think I found a few forums that mention changing the vanilla model to use your own, but I’ll see if I can handle it first lol. since it appears its an old model which use the DLC files.

It seems to be working now…

Adaption made (still testing it a bit): Ticket will now automatically activate when entering the metro, and invalidate once you leave it again (SO EVEN AT THE SAME STATION THOUGH!)

Not sure if it’s 100% fool proof, but seems to work. I however don’t have much time to spend on this, but I’m guessing that you or someone else might work on from it once it’s updated again :slight_smile:

Still doing some small tests quickly, and then I can upload it again.

BUT YET AGAIN: It’s a one-time-update, it will not receive further support due to the massive lack of time I have :slight_smile:

1 Like