Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local TRAIN_HASHES = {
- -1464742217,
- -577630801,
- -1901305252,
- -1719006020,
- 519580241,
- 1495948496,
- 1365127661,
- -1083616881,
- 1030903581,
- -2006657222,
- 1285344034,
- -156591884,
- 987516329,
- -1740474560,
- -651487570,
- -593637311,
- 1094934838,
- 1054492269,
- 1216031719,
- }
- -- train list command (/trains)
- RegisterCommand("trains", function()
- print("id", "hash", "wagons")
- for trainId, trainHash in next, TRAIN_HASHES do
- print(trainId, trainHash, N_0x635423d55ca84fc8(trainHash))
- end
- end)
- CURRENT_TRAIN = nil
- function SpawnTrain(n)
- local trainHash = TRAIN_HASHES[n]
- local trainWagons = N_0x635423d55ca84fc8(trainHash)
- for wagonIndex = 0, trainWagons - 1 do
- local trainWagonModel = N_0x8df5f6a19f99f0d5(trainHash, wagonIndex)
- PerformRequest(trainWagonModel)
- end
- local train = N_0xc239dbd9a57d2a71(trainHash, GetEntityCoords(PlayerPedId()), 0, 0, 1, 1)
- SetTrainSpeed(train, 0.0)
- TaskWarpPedIntoVehicle(PlayerPedId(), train, -1)
- CURRENT_TRAIN = train
- end
- -- train spawn command (/train id)
- RegisterCommand("train", function(source, args, raw)
- local n = tonumber(args[1])
- SpawnTrain(n)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement