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

hey mate,thank you for your awesome script that a lot of people waited and want to have.About the vendor machines ,what exactly you want in order to make them work?The prop id of the vendor?cause on code walker i can see the station as 1 object that points on a ymap ,when i open the ymap i can see the prop name of the vendors of a station i am right now as Prop_RoofVent_06a (6 machines) and Prop_RoofVent_01a (2 machines).Could this be handy or i am completely lost?
Thank you for your cool mod and work mate,i wish i could help you but i am sure that i am lost on this…

1 Like

Hey Thanks man :slight_smile: Totally appreciate your feedback :smiley:
To make them work I just will have to go to all statios and save the coordinates when
players are standing exactly infront of the machines. It turns out (at least as far as we
can all see and figure out now) that the vending machines on those above ground
stations are not ‘sepperate objects’, but part of the whole strainstation ‘object’/mappart. Which means they are undetectable.

I had the same issue with certain locations where people could sit (not telling anything
yet since i don’t want to spoil the upcoming release :wink: ), so i had to manually map over 400 locations in that instance to.

As for Prop_RoofVent_06a:
Prop_RoofVent_06a

So nope those are not the ticket vending machines haha :wink: :slight_smile: Do appreciate your thinking along and trying to help out :smiley:

Sadly you’re correct with it being one item, see dt1_21_station for the pill hard to swallow, what’s harder though is going to every one and getting coords, so thanks for that, makes the end user experience alot better, hope everything ends up awesome

1 Like

Tell me about it :rofl: just finished doing that two and half day’s straight for 659 (just checked haha) for a certain function which will be released when it’s done.

Well when this release is done i will return to the trains part and add those vending machines guys :slight_smile:

Hey venom, are you able to add a live blip of where the train/trams are?
would be a great feature!

1 Like

Definitly #1 on my ‘wishlist’ for the trains since i’ve also had this for my (own scripted) trains in SA-MP (old San Andreas).

The problem here though is that the trains are not ‘server sided AI’, and until i’ve found a way to make
a (STABLE) reference to the trains from other clients (whom where not the ones whom spawned (“aka hosted”) the train) without generating server traffic with it I can’t do much (YET) about it

Only ‘solution’ now would be to keep sending the train coordinates from players whom are in range to the server, which in turn would keep triggering client events to update it (aka: Lots of unneeded traffic).

This is AS FAR AS IN KNOW at the moment the only possible way, since players for example can also ‘block the metro’ with a vehicle, so even 'scripting a fake blip will result in it loosing track.

BUT there is someone else also working on a train system, which we HOPE doesn’t have the despawn
issue, and if that’s the case i/we will fix the issue and see if it’s possible to make the blips again :slight_smile:

1 Like

Considering the live blips they are useless as when u are inside the subwaystation you are unable to see them in the big map . so you dont get an idea how far the trains are .

1 Like

When in the pause menu map you can press Caps Lock and it will expand to the whole map not just when in the subway or akither interior. This is a part of GTA.

1 Like

Hello I need your help ! I don’t find name for this props please Help Me !

1 Like

Those are not props unfortunately, if they where i would have included them to :frowning:
I have literally been at every train station to make the radius of it so you can enter/leave the metro. What needs to be done is making a list of cordinate points and heading to make sure we can override the location of the player when standing at one of those.

The object itself however is not usable since R* unfortunately included them as part of the map in those sections apparently.

I WILL include those locations when i have some time to spare, unfortunately currently quite busy with two other big releases still. so it’s on planning to also add those :slight_smile:

2 Likes

If you buy a ticket and then logout and back in again you lose your ticket :frowning:

Where did you buy the ticket?

@OpalaoComodoro86

Underground station.

This does not appear for me.

@OpalaoComodoro86 Make sure you download at the bottom of the post where it says “Where to download”. Most people (inc myself) originally download from the link that he put in the post that shows the one he based his off of not realizing that it was not his.
If you download the wrong one you cannot buy tickets, you have to get the one from his Github at the bottom of the post.
But anyway the OPs one has a bug where you buy a ticket and if you logout and back in you lose your ticket and have to buy another one.

This is correct, the original doesn’t have any ticket options or so. However the ‘losing the ticket’ isn’t a bug ;). it’s done on purpose this way so anyone can use his/her own database system to implement saving of the tickets for example (else i would have to make several ‘different versions’ just to support ticket saving and money deduction (if you look at the source code you will also see that the script currently does NOT take money (is also stated in the main post :slight_smile: )

There however IS a bug which is related to trains/metro’s de-spawning or not spawning for some people, we don’t have any issues but lots of people do. Currently it’s uncertain if this is due to natives (functions) of the game, if it’s due to conflicts between other scripts (we have found out by another user that BetterAI (some AI car script improvement) does cause issues with the native train spawning system though. So that is a bug that users currently should keep in mind when using the script.

The ‘losing the ticket’ however isn’t a bug, since users can implement this saving system on their own database if they want (either ESX, vRP, Es etc etc). Since my server is fully from scratch and doesn’t use any framework i decided not to implement my database saving (since it would not work for others) :slight_smile:

You can do it an easy way and make the ticket into an item in your inventory and then remove it when you enter the train. There is alot of ways to implement that the ticket stays after logout. Doing it the database way like OP says is also an option. but imo database for just an ticket to metro is kinda uneccesary

Well inventory IS in a database actually :wink: and was also what i was referring to :). My own (non published) framework uses a database with inventory for items, statistics and property ownerships for example, but this is exactly the reason why i have removed the ‘saving the ticked’ code from my release, since my database structure is very different from other commonly used systems like ESX.

Inventory is thus what i means (but still exactly the same: a database)

Yeah that is true, but when i read the comments i got the feeling that you guys where talking about making a single table just for the tickets to the metro and that felt weird haha :smiley:

1 Like