{"hash":"0xC239DBD9A57D2A71","ns":"VEHICLE","name":"_CREATE_MISSION_TRAIN","slug":"_CREATE_MISSION_TRAIN","official":false,"named":true,"luaName":"CreateMissionTrain","game":"rdr3","apiset":"client","returnType":"Vehicle","params":[{"name":"configHash","type":"Hash"},{"name":"x","type":"float"},{"name":"y","type":"float"},{"name":"z","type":"float"},{"name":"direction","type":"BOOL"},{"name":"passengers","type":"BOOL"},{"name":"p6","type":"BOOL"},{"name":"conductor","type":"BOOL"}],"summary":"For more information, see trainconfigs.ymt To make the train AI controlled, set conductor to true and set the speed once.","descriptions":[{"source":"alloc8or","format":"text","body":"configHash: https://alloc8or.re/rdr3/doc/enums/eTrainConfig.txt\nFor more information, see trainconfigs.ymt\nTo make the train AI controlled, set conductor to true and set the speed once."},{"source":"femga","format":"pre","body":"0xc239dbd9a57d2a71 (By Smallos)\n\nN_0xc239dbd9a57d2a71(trainHash, GetEntityCoords(PlayerPedId()), 0, 0, 1, 1)\nIt's for trains\nWill automatically spawn a train on the closest tracks to the coords specified."}],"examples":[],"aliases":[],"enums":[],"related":["0x0D3630FB07E8B570"],"build":"1207","sources":["alloc8or","femga"],"doc":2,"url":"https://natives.borderlinerp.com/natives/VEHICLE/_CREATE_MISSION_TRAIN","markdownUrl":"https://natives.borderlinerp.com/natives/VEHICLE/_CREATE_MISSION_TRAIN.md","snippets":{"lua":"local retval = CreateMissionTrain(configHash, x, y, z, direction, passengers, p6, conductor)","luaInvoke":"local retval = Citizen.InvokeNative(0xC239DBD9A57D2A71, configHash, x, y, z, direction, passengers, p6, conductor, Citizen.ResultAsInteger())","js":"const retval = CreateMissionTrain(configHash, x, y, z, direction, passengers, p6, conductor);","jsInvoke":"const retval = Citizen.invokeNative('0xC239DBD9A57D2A71', configHash, x + 0.0000001, y + 0.0000001, z + 0.0000001, direction, passengers, p6, conductor, Citizen.returnResultAnyway(), Citizen.resultAsInteger());","csharp":"int retval = Function.Call<int>((Hash)0xC239DBD9A57D2A71, configHash, x, y, z, direction, passengers, p6, conductor);","notes":["Hash parameters: the named function also accepts a string and hashes it for you; `Citizen.InvokeNative` needs the number — pass `joaat(\"name\")` or a backtick literal like `` `name` ``.","Float parameters: Lua integers (`10`, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write `10.0` or `value + 0.0`. The generated JS wrappers add `0.0000001` to non-zero floats for the same reason.","The name is a community guess and may change. If the named call is missing in your client build, use `InvokeNative` with the hash — it always works."]}}