[DISCONTINUED] [ESX] - Los Santos Transit

Los Santos Transit ( Company creation project )

Hello everyone,
for the first time I would like to share my project with the FiveM community ! This project is build… But you can see advancements on this topic :slight_smile:

Project releases:

1. | esx_metrodriver | State of development: 98%

  1. Autonomous Metro - stops automatically at all stations (Frequencies and intervals between subways completely alterable in the configuration file)

  2. Metro controllable - Derailment in excessive speed, emergency stops, and many other things

  3. Passenger informations (next stop, …) in the train, and various indications for driving assistance (speed limit, next intersection, …)

  4. Diverse passengers amount in the train randomly at the stations (When player drive the metro only)

2. | esx_lstransit | State of development: 0%

  1. Headquarters of the company (offices)

3. | esx_busdriver | State of development: 30%

  1. Player can drive a bus

  2. Passenger informations (next stop, …) in the train, and various indications for driving assistance (speed limit, next station, GPS, …)

  3. All GTA natives bus lines available in bus GPS

And more in future updates :wink:
I do not set a release date but I think I have completed the development within one to two weeks …

Enjoy later!

7 Likes

Are you managing this yourself or are you using the gta natives which handle all metro stuff.

Because letting gta itself take care of the trains is probably better as gta will automaticly take care of spawning new metros, and despawning and stopping at stations

I’m not using native because the native can’t do all of what I want… I created a little system for prevent trains collisions :slight_smile:

1 Like

Ok that looks good, i just remember some people having issues with metro’s respawning sometimes randomly when doing it manually. But goodluck i guess looks good :smile:

1 Like

I just don’t understand why the doors cannot be closed… xD I can’t lock them ?! This is the last goal for this part of script … :confused:

I’ve tested… And I just sync entities (metro and driver) on the network and this problême did not resurface

In our server we created a transit metro system too, not manual but using the default metro stuff of gta. We also had the same problem when someone was inside the metro the doors just didn’t close

When using door close natives it would still be open… i did something ugly which would just force the door closed every tick if the train is driving with a speed.

Also metro trains doors don’t have inside collision so you could just jump out, maybe that’s why in your SP you never can walk in a metro while it’s driving

Well … Well thank you you just save me time! Pity…

If you ever need help i could send my example code

With pleasure… :slight_smile:

I’m parsing a list of trams in the area every second (to save performance only every sec)

Then only filter out the trams which the speed is >1 and close those doors every tick. But you probably don’t need all that as you already have a list of trains

Yes I have

Just… One more question…

local function GetVehicleSeat(MetroTrain)
    seat_id     = false
    seats       = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }
    for i=1, #seats, 1 do
        Citizen.Wait(50)
        if IsVehicleSeatFree(MetroTrain, seats[i]) then
            seat_id = seats[i]
            break
        end
    end
    return seat_id
end

When I do that the only seat available is 1,2 !!? The others seats can’t usable? :thinking:

Not sure about that, maybe rockstar games only programmed 2 seats for driver and inside because more were never needed

Ahhh s**t, only 2 passengers… That’s what I currently have :confused: but it’s not a lot

Ye maybe you could program a specific offset using GetOffsetFromEntityInWorldCoords() and then set the player on that place and play sit animation

Seems like an interesting topic to do more research about

Nooo… Don’t give me the solution at 00h xD I can’t go sleep now !!

Thx :ok_hand:

Update?

1 Like

Also creating a similar addon. But its a job tho. Didnt want to follow esx even tho its a little dependent on it. Its called pro_bussdriver. Im arround 40-50% finished. How far along are u?
Also using GPS tracker for busstops. With notification after leaving busstop -> We are now heading to (nameofbusstop). This is fully customized with no natives as the player drives. But its completed with being able to ferry both NPC and Player at the same time Unless the buss if full ofc. Let me know how far you are. Maybe we can share some things? :slight_smile:

I have a lot of things to do at the moment and I intend to resume development, and fix the last problems on the 3 scripts. For the bus driving script I have completely finished, I have not yet caught the painne to detail my progress … xD
I send all in one release, the next week if all is ok for me… :slight_smile:

HI did you release there scripts they look real good?