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

Thanks, this then also resolves A LOT of issues (if not all) :smiley: we’ve had with the trains and metro’s! :smiley:

When we can expect edited version? Im super hyped fo that :slight_smile:

Will see and try my best when i can, unfortunately lots of family circumstances happened at once which caused quite a set-back at the office (thus meaning that i need to catch up on lots of projects again).

Whenever possible i will see that the implementations are pushed asap :slight_smile:

Can i help somehow? I hate waiting

If you have experience with scripting you can also download the source code at my github :slight_smile:

I hope to be able to return to hobby scripting soon but currently more important priority’s for me are family and work related programming projects with an (already due) deadline, hope you can understand will see what i can do when it settles a bit more :slight_smile:

(Note: If you change/update the script, i will also push the update in my main release with appropriate credits where needed of course :slight_smile: )

I got it working (so far) by adding the code that Smallo provided to the client.lua in my Bob74 IPL loader.

@RedFighterNL it fixes the issue of the trains despawning but does not fix the issue of the trains not moving

So, i got it all working, but i would like to have way more metro going around, how can i do that ?

does anyone know how to get the trains so they move instead of staying stationed in one place?

They specifically didn’t write it that way, as the rail is a loop that goes back on itself. at some point the metro cars would meet and go through eachother, and would kill any riders. Having 2 is already a risk, but a low risk.

@Rubylium well @JereTR is 100% right here, two is possible and will MOST LIKELY give no issues, BUT adding more is a guaranteed ‘crash’ (well not as in the trains/metro’s crashing, but as in the passengers getting killed, seriously wounded or even thrown out of the metro’s, or even thrown underneath the map). Due to collisions/colliding issues.

It’s indeed highly recommended to just use two of them and ‘have patience’… It doesn’t take long to go round when there are two metro’s, they don’t go around the whole map (at all), the ‘freight train’ however does take a massive trip around a large part of the map…

And like @JereTR mentioned: the Metro track(s) is basically just “one track”, since it goes round and round :wink:

1 Like

Okay got it.
Thanks for those info, anyway after doing some test I found out that adding npc in general on my server cause client crash after 20/30 minutes of playing ( OneSync server, around 120 player connected almost every time)

So, I keep this nice ressource on my dev server ^^

I share my mapping for the machines a total of 38 even in the desert
I added a little more clean of the station and remove the bag at the arrival airport.
hoping it helps:grinning:
I find the script very well although on my server it is 50% functional if a person will be kind enough to share me his script well done will be really cool.

je partage mon mapping pour les machine un nombre de 38 au total même dans le désert
j ai ajouter un peu plus propreté des gare et enlever les sac a l aéroport d’arrive.
en esperant que ça aide :grinning:
je trouve se scripte très bien bien que sur mon serveur il est a 50% fonctionnel si une personne aurai la gentillesse de me partager son script bien aboutit serai vraiment cool.

@Smallo How do you get the big freight train to not remain stationary and to move with the code you gave. The train remains solid now but will not move


I have to have some item in the inventory for him to come, I have base vrp the train does not appear can help me?

he must go to the platform from something the train will have to arrive

too much drugss guys… cmon.

hi super script but for me no subway or train appears

2 Likes

Doesn’t work for me… the trains and metros don’t stops… useful in my opinion :frowning: sorry

Which is also clearly stated in the elaborate post,

I was working on a completely new system, but ‘adult life’ currently prevents me from working on mods and private projects. I will resume working on it when i got some spare time again.