[ESX, Standalone] FiveM Trains, Works with OX inventory and target system

Showcase video

FiveM Trains | ESX VERSION

This script returns trains to the game, you can buy tickets, ride around the city with your friends on the subway, or get on a freight train and drive to the Blaine County

Features

  • Seat and walk in passenger trains and walk on cargo trains, doors in passenger train is closing
  • Buy tickets if you have ESX, then ticket add to your inventory and removes if you ride train. You can make it works standalone, you will be able to buy tickets, without paying money.
  • Support for OX inventory and target system, also you can integrate your own notifications
  • Server side is open to change, you can integrate your own framework or change something.
  • Incredible config file, you can customize absolutely all things in this script.
  • Blip for trains on map(You can disable it)
  • Works with “no npc” plugins
  • /trains command to disable trains(You can disable it)
  • Fast support and regular updates
  • Tested with my buddies, works beautiful.
  • In all scenarios resmon is 0.02 ms

Config file:

image

Buy escrowed vesrion on TEBEX now! [7$ + Taxes]

Buy Open Source vesrion on TEBEX now! [20$ + Taxes]

CHECK IT OUT ON OUR TEST SERVER FOR FREE

QB CORE/Your framework Version of this script: Click

:books: Other releases:

Code is accessible No
Subscription-based No
Lines (approximately) 400
Requirements ESX, or standalone
Support Yes
4 Likes

You put the post back after adding just fifty lines?

1 Like

It would be great if you can also drive black (So without ticket!)

1 Like

Edit: Okay, fair enough.

1 Like

Bruh, this is litterally free script.

Don’t buy this…

Download this free script:

1 Like

As I said before to @JZersche, this script and the previous script don’t work for me and some peoples, and i don’t have any help with it because it’s 4 years old script. So I created this one, For those who do not want to buy, you can try to download this script.

That resource works for me. Why pay for something when it is free.

ChangeLog V1.3:

Added ESX integration
Now you can configure ESX on/off and ticket price if you using ESX

it would be cool :

if the ticket was in the item
put blips for the trains when it moves
and the integer of the ox_target

:smiling_face_with_three_hearts:

1 Like

ChangeLog V1.4:

Ticket is now an item and deleting if you ride the metro once(If you using ESX)
Doors in trains is now closing

Preview

Added Ox_Target Integration

This um… Isn’t going to work on OneSync Infinity, so it’s literally pointless. Neither is the free script that was linked here.

Idk, how much testing you did on these, but um, I did ALOT. once you have more than a 3 people on a server with this, going by how u are doing it, It will spawn a new train for every single player.
Because of the OneSync entity radius, it will spawn a new train for every one, because the clients don’t know about the existing ones. Which results in having around 20 trains crashing into each other. At the moment, there is no way to get actually working trains with OneSync infinity. I’m pretty sure I have gotten the closest to it, but it’s still massively unstable because of the Entity radius. Overall, unless your server is from 2019, your wasting your money. Because This Just isn’t possible yet with OneSync Infinity

Edit Note: if you intend to have only you on your server and just fuck around with trains by yourself, amazing script, but this is NOT a multiplayer thing that will work as intended

1 Like

It will also spawn a new one, as soon as a player goes 424 units away from it, which means that having multiple people moving around the map, can cause ALOT of them to spawn.

So you should probably add a disclaimer that this won’t work for 99% of people
(bearing in mind, OneSync infinity became free for everyone in December 2020 (and also that ESX requires it), so if your server isn’t using it, you probably don’t know what your doing)

Does also show how little effort you put into a script your charging money for.

So far, none of my customers (Most of them use ESX) Does not complain that something is wrong with the trains, please do not mislead people and do not call me as if I have not tested anything on Onesync Infinity with ESX.

You have not. It does not work, it’s not possible for it to work. That just isn’t how OneSync infinity works. Please read my messages for why. This is no different to the 2019 and 2018 scripts that add trains. And you do it the exact same way as them. And they are all marked as broken. Because they do not and cannot work. Utilising the GTA method will not work. Because there is 0 persistence at all.

All the scripts that are free and 4 years old just crash my server and they use other logic, I look their source code and I can say that it is different from mine, just understand me.

I do not understand you. I have been doing source code level research on trains for months, and have tried every single way physically possible and its impossible to get it working due to engine limitations. No method which involves a “Spawn Rate”, will work, since that means u are using the standard GTA native to enable them. Which has been the method since 2018, and will not work in a multiplayer environment correctly, due to (what seems like) engine limitations. It’s just not a possible task right now, to have fully working, synced trains.

Edit: The only way “todo it properly” right now, is to have all the logic handled on the server side and use Culling radius natives to make the entity always owned by a player. Which, considering, such natives have been marked as depricated and HIGHLY EXPERIMENTAL, are not something you should be using a paid script, since doing it this way causes issues such as:
Server to randomly crash
Player to crash on train spawn
5 trains spawning at once
No trains successfully spawning and crashing the client which is spawning it
Player randomly crashing
Parts of the train will randomly disappear for some clients
Random NPCs take the entity handle of the train, causing the client to have a new one spawn.
Train will sometimes “glitch out” due to unknown ownership.
Having more than 3 client can cause all clients to crash
And that is just the issues discribable with words.

1 Like

Tested with my 3 friend and me(4 peoples online), we are riding on trains and metro like hour and nothing happens, working fine. Maybe FiveM fixed it, i know bugs with old scripts, but my scripts working fine. I can send video if you need that. Testing on Onesync ON(With infinity)