Hello everyone!
I’m currently trying to implement a system on my FiveM server where trains (or subways) can travel along a predefined route, stop at designated stations, wait for a short while, and then depart again. I’ve come across the native CREATE_MISSION_TRAIN, but I’m having trouble understanding how it works and keep experiencing crashes. I’d really appreciate any guidance or clarifications you can provide.
Here are some specific questions I have:
- Functionality: Can
CREATE_MISSION_TRAINactually be used to create a fully functioning train/subway that stops at stations, waits, and continues on a route? - Parameters: Which parameters (like train type, direction, etc.) do I need to pass to this native so it doesn’t crash my server? The documentation is a bit vague, and I’m not sure if I’m using the correct values.
- Control & Automation: Do I need to handle speed, stopping, and restarting manually in scripts, or is there a way to automate this behavior through the native (or other related functions)?
- Crashes: Why does
CREATE_MISSION_TRAINoften cause crashes? Could it be from incorrect route IDs, the wrong train model, or a missing data setup?
If anyone has implemented trains or subways using this native and can share some insights, code snippets, or links to working examples, I’d be incredibly grateful. Thanks in advance for your help and any tips you can offer!
Best regards!