! ALERT ! THIS IS NOT COMPATIBLE WITH INFINITY !
Not compatible with FxServer Build 2689+.
Since @VenomXNL has stopped working on his Trains Project (XNL-FiveM-Trains-U3), I asked him to take over his code and rework it for OneSync.
I always wanted to make a real living city for my RP server.
So… we need trains for transportation !
For a couple of month, I used his script and modified a lot for making it compatible onesync.
Last month, I saw some people having trouble making it working proprely.
I’v pushed some fix to VenomXNL’s git and It started in my head with several idea.
It was better, since he wanted to stop his dev, to make his project live again.
Iv keeped some utilities he used.
- Spawns a freight train (AI controlled only) which drives around Los Santos
- Spawns 1 or 2 Metro’s (opposite direction and server own can choose 1 or 2 in client.lua)
- Metro’s and the Freight are all AI controlled
- Trains stop at station now ! (VenomXNL don't)
- Passenger system for the Metro’s (NO player limit!)
- Players can walk around IN the Metro train
- Players need to purchase a ticket at Metro stations or at the airport
- Ticket will invalidate when used (players need to buy a new one)
- SMS Style notifications when boarding or buying
- SMS Style Bank error when player doesn’t have enough money (even bank brand can be setup)
- Metro Station Detection (players can only Exit the metro at Metro stations)
- Wanted Level Handling (not allowed to enter while wanted) (also configurable in config.lua)
- ‘Terrorist Detection’ when player is shooting from the metro (resulting in 4 star wanted instantly)
All interaction are done as ‘normal game interaction’ would have been done (in normal online or
single player), no need to type commands or console/chat shortcuts
The ticket machine has animations (using ATM animation for it)
Nearly all options (allowed to enter when wanted, ‘terrorist detection’, Banks Brand sms icon/style, ticket price, number of metro’s to spawn (1 or 2) can easily be configured with variables i’ve created
in the config.lua.
The script is HEAVILY commented so that it should be easier for most to understand what happens
where and how (which would also make it a bit more suitable for beginners i guess)
Known “issues/bugs”
The Metro doors ‘disappear’ when a player enters it as passenger (fully see through) but it still
keeps it’s collision (thus can’t walk through it), i suspect that this is a game/model limitation.
What does the script user/server owner need to do
PLEASE READ THIS PART: You will need to implement your OWN money/bank handling part.
In which i mean that you will need to make sure that the money gets taken from either the
bank account or cash money. May be I will add a universal system for it in the futur.
However I have (very detailed) explained exactly in my code where (and a bit how) you can
add those parts
Screenshots
Where to download
My github
Update
- 1.1: The train now stop at station.
- 1.2 : Fixed a bug for spawning train when the ressource go "too fast" to load.
Added blips for trains. (Can be desactivated in config)
Hope you will be interrested in this rework and give feedback.
Best regards.