Am I the only one having server wide problem where everytime I press “Numpad 8” or “F” There is a Red Line/laser coming out of my waist? and I know its from this Script… Because when I turn it off the line/laser gets removed
how??
I pushed out an update that has the distance testing draw lines configured by Config.DebugDraw in config.lua.
It’s disabled by default now.
Do you think if I move the spawn circle inside the trains, that it will be more realistic than flly into the trains? And is there a smart way to brake ? Because I feel like i cant go to 0, without reverse ![]()
is it possible to spawn and go through the city? also the tram in the city every time I push G doesn’t spawn. Any help would be much appreciated.
You actually have to change the config. Had the same issue and fixed it by setting the “trainID” (should be 37) for the trolley one lower. (The script ask for a config that does not exist)
i got 2 questions,
- is it a drag and drop script or how do i install (i have a qbcore server)
- can it be restricted to 1 person so no one else can drive it?
Trying to see if anyone else has had a similar issue, but whenever a train gets around the lumber yard entering Paleto, the game crashes. Wanted to see if anyone had any idea what might be causing it, I haven’t had time to disable custom maps yet and try again
i need help when i will make the train shorter when i do dis and i will spawn the train no train spawnig
Seems like the train id’s have been changing…
I’d check this if you want some updated IDs
I’ll update the topic/github, but seems like the trolley is 25 and long freight train is 17 on fresh install as of 5/19/2024.
Hey there, so I tried this out for the first time 2 nights ago, and realised that the doors open for the front-most car, and the one directly behind it. In consists of 3 or more, this isn’t particularly useful. I’m not much of a LUA wizzkid, so when I tried having a look at ways to modify the code, I was a little stumped. I don’t see any natives to get a count of how many cars are in a consist, so I can’t really iterate through an index. Even if I used the GetTrainDoorCount() native, some light rail vehicles are set out in a way that has 3 of 5 cars having doors, with some solely being vestibule cars. What would be the best way to have more than 2 carriage doors functionally open/close their doors
Do addon trains work with this script? Because when I set up a custom train config in the trains.xml and spawn it in if the main engine is an addon train it doesn’t work but if it’s a default train it works fine.
Are you loading them in? At the top of the client.lua perhaps having something like this:
function loadTrainModels()
local trainsAndCarriages = {
“metrotrain”,
“freight”,
“freightcont1”,
“freightcont2”,
“freightcar”,
“freightcar2”,
“tankercar”,
“freightgrain”,
– custom ones start here
“mycooltrain”
}for _, vehicleName in ipairs(trainsAndCarriages) do local modelHashKey = GetHashKey(vehicleName) RequestModel(modelHashKey) -- load the model -- wait for the model to load while not HasModelLoaded(modelHashKey) do Citizen.Wait(500) end endend
loadTrainModels()
This is how mine looks i can try to show you a photo when i load into the server as well if you want.
Yours looks a little different from mine. Also I guess a better example I can give is if you look in the client.lua and you see where it says (“freight”) and then you see where it says(“freightc”) if I make a custom train and I use freight for the lead engine I can drive it and move it around just fine but say if I don’t want freight to be the lead engine and I want freightc to be the lead engine and I change it i can’t move it or drive it or do anything other than honk the horn.
Why does the fright train spawn instead of the metro train and crash game? i reinstalled it multiple times without editing anything but the freight train location works fine
sorry to ask but can you help me to install this beutiful script??? im doing a fivem server i really want this
Your indexes probably aren’t right. The script uses the games mission trains so you have the find the right index for the metros




