I have often wanted to make my own trains in FiveM whether it be re-arranging existing trains or use custom train models; however, editing a trains.xml file can be tiresome and time-consuming. This is why I decided to create this resource - a train creator which allows you to edit existing train configurations and make new ones on the fly and save your changes to a trains.xml file that you can actually use.
This resource also includes an example script that shows how to spawn and control these trains after you have made your edits and so on. Although please note that a server restart is needed for changes to take effect.
Additionally, this resource uses a simple ace permission (Train.use) to restrict anyone from opening the menu if you plan on using this resource in a live environment.
I.e. if you would like only admins to be able to use the menu then add the following to your server configuration file:
add_ace group.admin Train.use allow
If you wish to purchase or want some more information please look here at my Tebex store page.
The price I decided to go with was based on the research I had to do and the actual hours spent to create the resource. It may not look like much but there is a lot that goes into this resource and I could lower the price but people have already purchased this resource so it wouldnβt be fair or moral on them.
I understand that! Iβm sure you spent a mad amount of time. Just the price is rather high, and just thought youβd make more sales at a lower price. Was not down grading your work in comparison to the price at all! One day Iβll cop this, but the price is too high for me haha, You have a great week!
There is an example file included that allows you to spawn each train. You could refer to that or If you purchase the resource I can assist further if join the support discord which can be found on the product page on Tebex.
Iβve just been told that trains inherently despawn when not seen by players on FiveM servers, so I was wondering if that would be the case, should I let the train run without controlling it. In your experience with multiple players on your server, has the train despawned while going around the track unsupervised?
I havenβt tested trains with other players but server-side code should be relatively easily made to ensure the train exists on all clients. I would have to look further into this however I have seen multiple servers that have trains that exist on all clients just fine.
Iβm working on a project at the moment but when I get a chance I will implement a server-side example that you can try out. Also, you can download this resource after every update however you may only download it once per update.
This looks very interesting, does it require people with the permission to start the train or will the train just spawn and drive around the map like in Singleplayer?
Hi, the only permissions used by the script is to open or close the menu. As of writing, no permission is required to spawn and drive trains. The intention of this script is to aid developers in modifying train configuration files, and not be used in a live environment with random players.