hlennarz Posted March 19, 2018 Share Posted March 19, 2018 (edited) Hey there, gtaforums community. One of my favorite mods is the "New Algorythm for Railway Traffic" mod by Den_spb It basically lets trains spawn on both sides of the tracks in 1 direction each. Unfortunately, this mod adds custom objects (traffic lights) wich correspond to the trains positions but are notoriously glitchy. Sometimes they wont load, sometimes they load wrong objects, sometimes they randomly dissapear and so on. But no matter what goes wrong: the game crashes when a train approaches these objects in any case. these objects are: bltlm.dff colltl.col grtlm.dff rdtlm.dff tltxsm.txd yltlm.dff stored in a custom map file tllgs.ide and no, simply deleting those and their reference in gta.dat doesn't work. Now, Den_spb hasn't been active for 3 years so I doubt there will ever be a revision/reduction of this mod. So I wanted to personally try fix it for my own game, NOT release his altered work or take any credit for it. Unfortunately, I have no scripting experience. EDIT: Luckily i've found an older version of this mod without the additional objects, but unfortunately it will crash during missions. This was fixed in the later version, but I think it would be easier to start working from here on. This is the cleo script : // This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013 {$CLEO .cs} //-------------MAIN--------------- wait 0 [email protected] = 0 [email protected] = 0 [email protected] = 0 [email protected] = 0 [email protected] = 0 [email protected] = 0 wait 1000 :NONAME_51 wait 0 if not [email protected] == 0 jf @NONAME_80 jump @NONAME_115 :NONAME_80 [email protected] = 1 0209: [email protected] = random_int_in_ranges 15 46 wait 0 [email protected] *= 1000 [email protected] = 0 :NONAME_115 wait 0 if not [email protected] == 0 jf @NONAME_144 jump @NONAME_179 :NONAME_144 [email protected] = 1 0209: [email protected] = random_int_in_ranges 15 46 wait 0 [email protected] *= 1000 [email protected] = 0 :NONAME_179 wait 0 if and [email protected] == 1 001D: [email protected] > [email protected] // (int) jf @NONAME_216 [email protected] = 2 :NONAME_216 wait 0 if and [email protected] == 1 001D: [email protected] > [email protected] // (int) jf @NONAME_253 [email protected] = 2 :NONAME_253 wait 0 if [email protected] == 2 jf @NONAME_5499 Actor.StorePos($PLAYER_ACTOR, [email protected], [email protected], [email protected]) if and [email protected] > 956.0 [email protected] > 1281.0 [email protected] > 2 jf @NONAME_334 jump @NONAME_5499 :NONAME_334 [email protected] = 0 if not [email protected] >= 0.0 jf @NONAME_369 jump @NONAME_418 :NONAME_369 if [email protected] >= 0.0 jf @NONAME_404 [email protected] = 1 jump @NONAME_411 :NONAME_404 [email protected] = 2 :NONAME_411 jump @NONAME_464 :NONAME_418 wait 0 if [email protected] >= 0.0 jf @NONAME_457 [email protected] = 4 jump @NONAME_464 :NONAME_457 [email protected] = 3 :NONAME_464 wait 0 if [email protected] == 1 jf @NONAME_493 jump @NONAME_568 :NONAME_493 if [email protected] == 2 jf @NONAME_518 jump @NONAME_2047 :NONAME_518 if [email protected] == 3 jf @NONAME_543 jump @NONAME_3120 :NONAME_543 if [email protected] == 4 jf @NONAME_568 jump @NONAME_3903 :NONAME_568 wait 0 [email protected] = -598.09 [email protected] = 1188.22 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = -325.94 [email protected] = 1248.88 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = -35.79 [email protected] = 1293.15 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = 241.37 [email protected] = 1229.34 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = 536.14 [email protected] = 1247.17 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = 739.12 [email protected] = 1461.33 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = 742.99 [email protected] = 1697.59 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = 742.51 [email protected] = 1787.34 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = 740.75 [email protected] = 2026.49 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = 726.84 [email protected] = 2321.07 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = 801.16 [email protected] = 2609.48 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = 1072.24 [email protected] = 2722.62 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = 1236.12 [email protected] = 2632.27 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = 1481.99 [email protected] = 2632.34 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = 1774.87 [email protected] = 2675.03 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = 2021.92 [email protected] = 2694.18 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = 2229.69 [email protected] = 2690.17 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = 2519.59 [email protected] = 2639.43 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = 2552.81 [email protected] = 2344.89 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = 2735.05 [email protected] = 2111.73 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = 2781.06 [email protected] = 1816.16 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = 2856.25 [email protected] = 1531.03 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = 2864.77 [email protected] = 1239.22 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = 2764.76 [email protected] = 983.25 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = 2764.79 [email protected] = 743.27 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 if [email protected] == 4 jf @NONAME_2047 jump @NONAME_5499 :NONAME_2047 wait 0 [email protected] = 2765.28 [email protected] = 528.72 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = 2781.32 [email protected] = 239.5 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = 2827.61 [email protected] = 36.33 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = 2763.1 [email protected] = -250.25 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = 2467.57 [email protected] = -275.0 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = 2192.47 [email protected] = -357.99 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = 2122.11 [email protected] = -647.61 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = 2284.98 [email protected] = -897.82 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = 2284.99 [email protected] = -1186.05 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = 2273.19 [email protected] = -1484.06 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = 2198.65 [email protected] = -1760.34 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = 1989.68 [email protected] = -1953.75 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = 1696.98 [email protected] = -1953.73 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = 1398.43 [email protected] = -1948.14 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = 1197.64 [email protected] = -1779.76 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = 1002.7 [email protected] = -1556.24 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = 815.0 [email protected] = -1366.51 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = 778.25 [email protected] = -1333.63 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 if [email protected] == 1 jf @NONAME_3120 jump @NONAME_5499 :NONAME_3120 wait 0 [email protected] = 589.52 [email protected] = -1187.75 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = 335.44 [email protected] = -1061.4 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = 49.59 [email protected] = -1018.0 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = -237.89 [email protected] = -1069.9 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = -470.71 [email protected] = -1253.47 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = -742.62 [email protected] = -1133.88 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = -847.02 [email protected] = -1404.64 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = -1113.11 [email protected] = -1514.3 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = -1392.21 [email protected] = -1509.24 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = -1676.36 [email protected] = -1465.42 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = -1876.64 [email protected] = -1258.1 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = -1976.75 [email protected] = -995.47 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = -1978.81 [email protected] = -717.47 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 if [email protected] == 2 jf @NONAME_3903 jump @NONAME_5499 :NONAME_3903 wait 0 [email protected] = -1980.12 [email protected] = -592.06 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = -1960.09 [email protected] = -296.04 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = -1944.42 [email protected] = -11.95 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = -1942.72 [email protected] = 171.88 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = -1756.16 [email protected] = 399.26 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = -1523.12 [email protected] = 568.5 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = -1290.21 [email protected] = 737.81 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = -1082.96 [email protected] = 888.28 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = -992.44 [email protected] = 954.08 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 [email protected] = -760.64 [email protected] = 1122.39 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_4519 if [email protected] == 3 jf @NONAME_4512 jump @NONAME_5499 :NONAME_4512 jump @NONAME_568 :NONAME_4519 wait 0 [email protected] = 0 :NONAME_4530 wait 0 0209: [email protected] = random_int_in_ranges 0 16 if and not [email protected] == 8 not [email protected] == 9 not [email protected] == 14 jf @NONAME_4530 wait 0 [email protected] = -382234 [email protected] *= 16 005A: [email protected] += [email protected] // (int) [email protected] /= 16 [email protected] = 6.643 :NONAME_4621 not &0([email protected],1i) == 0 jf @NONAME_4676 wait 0 Model.Load(&0([email protected],1i)) [email protected] += 6.357 [email protected] += 1 jump @NONAME_4621 :NONAME_4676 038B: load_requested_models 0087: [email protected] = [email protected] // (float) [email protected] += 20.0 [email protected] = -382234 [email protected] *= 16 005A: [email protected] += [email protected] // (int) [email protected] /= 16 :NONAME_4728 wait 0 if not &0([email protected],1i) == 0 jf @NONAME_4792 :NONAME_4754 wait 0 if Model.Available(&0([email protected],1i)) jf @NONAME_4754 [email protected] += 1 jump @NONAME_4728 :NONAME_4792 wait 0 [email protected] = -382234 [email protected] *= 16 005A: [email protected] += [email protected] // (int) [email protected] /= 16 [email protected] += 14 if or &0([email protected],1i) == 0 [email protected] == 7 [email protected] == 13 [email protected] == 15 jf @NONAME_4885 jump @NONAME_5039 :NONAME_4885 008B: [email protected] = &0([email protected],1i) // (int) [email protected] += 1 008A: &0([email protected],1i) = [email protected] // (int) [email protected] += 1 008B: [email protected] = &0([email protected],1i) // (int) 008A: &0([email protected],1i) = [email protected] // (int) [email protected] += 1 008B: [email protected] = &0([email protected],1i) // (int) 008A: &0([email protected],1i) = [email protected] // (int) [email protected] += 1 008B: [email protected] = &0([email protected],1i) // (int) 008A: &0([email protected],1i) = [email protected] // (int) [email protected] += 1 008B: [email protected] = &0([email protected],1i) // (int) &0([email protected],1i) = 0 :NONAME_5039 wait 0 if and [email protected] == 2192.47 [email protected] == -357.99 jf @NONAME_5102 06D8: [email protected] = create_train_at [email protected] [email protected] 60.0 type [email protected] direction 1 jump @NONAME_5186 :NONAME_5102 wait 0 if and [email protected] == 2122.11 [email protected] == -647.61 jf @NONAME_5165 06D8: [email protected] = create_train_at [email protected] [email protected] 70.0 type [email protected] direction 1 jump @NONAME_5186 :NONAME_5165 06D8: [email protected] = create_train_at [email protected] [email protected] 0.0 type [email protected] direction 1 :NONAME_5186 wait 0 [email protected] = 3 [email protected] = 1 06DC: set_train [email protected] acc 16.67 06DD: set_train [email protected] speed 16.67 [email protected] = Marker.CreateAboveCar([email protected]) Marker.SetColor([email protected], 0) 018B: set_marker [email protected] radar_mode 2 [email protected] = -382234 [email protected] *= 16 005A: [email protected] += [email protected] // (int) [email protected] /= 16 [email protected] += 14 if and not &0([email protected],1i) == 0 not [email protected] == 7 not [email protected] == 13 not [email protected] == 15 jf @NONAME_5422 [email protected] += 1 &0([email protected],1i) = 0 [email protected] += 1 008A: &0([email protected],1i) = [email protected] // (int) [email protected] += 1 008A: &0([email protected],1i) = [email protected] // (int) [email protected] += 1 008A: &0([email protected],1i) = [email protected] // (int) [email protected] += 1 008A: &0([email protected],1i) = [email protected] // (int) :NONAME_5422 [email protected] = -382234 [email protected] *= 16 005A: [email protected] += [email protected] // (int) [email protected] /= 16 :NONAME_5454 not &0([email protected],1i) == 0 jf @NONAME_5499 wait 0 Model.Destroy(&0([email protected],1i)) [email protected] += 1 jump @NONAME_5454 :NONAME_5499 wait 0 if [email protected] == 2 jf @NONAME_10670 Actor.StorePos($PLAYER_ACTOR, [email protected], [email protected], [email protected]) if and [email protected] > 956.0 [email protected] > 1281.0 jf @NONAME_5573 jump @NONAME_10670 :NONAME_5573 [email protected] = 0 if not [email protected] >= 0.0 jf @NONAME_5608 jump @NONAME_5657 :NONAME_5608 if [email protected] >= 0.0 jf @NONAME_5643 [email protected] = 1 jump @NONAME_5650 :NONAME_5643 [email protected] = 2 :NONAME_5650 jump @NONAME_5703 :NONAME_5657 wait 0 if [email protected] >= 0.0 jf @NONAME_5696 [email protected] = 4 jump @NONAME_5703 :NONAME_5696 [email protected] = 3 :NONAME_5703 wait 0 if [email protected] == 1 jf @NONAME_5732 jump @NONAME_8214 :NONAME_5732 if [email protected] == 2 jf @NONAME_5757 jump @NONAME_7199 :NONAME_5757 if [email protected] == 3 jf @NONAME_5782 jump @NONAME_6358 :NONAME_5782 if [email protected] == 4 jf @NONAME_5807 jump @NONAME_5807 :NONAME_5807 wait 0 [email protected] = 515.98 [email protected] = 1240.23 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = 226.84 [email protected] = 1238.51 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = -53.4 [email protected] = 1296.12 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = -347.38 [email protected] = 1247.21 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = -631.83 [email protected] = 1185.07 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = -880.27 [email protected] = 1040.72 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = -1030.44 [email protected] = 931.37 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = -1240.99 [email protected] = 778.43 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = -1342.19 [email protected] = 704.87 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 if [email protected] == 1 jf @NONAME_6358 jump @NONAME_10670 :NONAME_6358 wait 0 [email protected] = -1498.99 [email protected] = 590.9 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = -1601.06 [email protected] = 516.83 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = -1837.42 [email protected] = 347.58 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = -1948.42 [email protected] = 100.0 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = -1950.42 [email protected] = -190.28 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = -1982.39 [email protected] = -488.08 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = -1982.55 [email protected] = -768.1 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = -1971.89 [email protected] = -1059.67 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = -1846.91 [email protected] = -1309.37 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = -1629.08 [email protected] = -1486.73 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = -1347.52 [email protected] = -1513.87 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = -1053.53 [email protected] = -1508.42 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = -835.57 [email protected] = -1370.31 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = -718.41 [email protected] = -1128.25 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 if [email protected] == 4 jf @NONAME_7199 jump @NONAME_10670 :NONAME_7199 wait 0 [email protected] = -596.65 [email protected] = -1164.91 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = -349.44 [email protected] = -1223.16 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = -137.48 [email protected] = -1027.47 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = 151.78 [email protected] = -1026.41 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = 438.87 [email protected] = -1107.08 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = 690.56 [email protected] = -1266.07 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = 910.87 [email protected] = -1464.63 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = 1097.41 [email protected] = -1669.8 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = 1293.72 [email protected] = -1894.03 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = 1573.67 [email protected] = -1957.68 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = 1857.49 [email protected] = -1957.93 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = 2152.76 [email protected] = -1957.85 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = 2205.95 [email protected] = -1686.16 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = 2288.74 [email protected] = -1407.02 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = 2288.95 [email protected] = -1110.09 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = 2281.21 [email protected] = -816.01 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = 2078.88 [email protected] = -607.04 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 if [email protected] == 3 jf @NONAME_8214 jump @NONAME_10670 :NONAME_8214 wait 0 [email protected] = 2062.91 [email protected] = -593.55 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = 2087.84 [email protected] = -365.31 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = 2367.59 [email protected] = -284.31 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = 2661.26 [email protected] = -298.92 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = 2832.24 [email protected] = -92.44 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = 2805.3 [email protected] = 182.18 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = 2769.17 [email protected] = 442.68 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = 2768.74 [email protected] = 701.56 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = 2768.72 [email protected] = 983.27 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = 2868.74 [email protected] = 1239.21 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = 2860.0 [email protected] = 1532.27 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = 2785.01 [email protected] = 1782.76 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = 2765.17 [email protected] = 2066.97 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = 2563.53 [email protected] = 2264.64 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = 2551.77 [email protected] = 2560.03 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = 2342.07 [email protected] = 2694.16 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = 2092.4 [email protected] = 2694.22 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = 1797.4 [email protected] = 2682.39 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = 1510.13 [email protected] = 2636.25 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = 1212.03 [email protected] = 2637.34 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = 957.59 [email protected] = 2762.66 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = 768.57 [email protected] = 2550.89 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = 725.39 [email protected] = 2288.51 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = 736.95 [email protected] = 2009.09 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = 738.76 [email protected] = 1746.69 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = 735.12 [email protected] = 1461.95 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 [email protected] = 616.45 [email protected] = 1297.93 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_9816 if [email protected] == 2 jf @NONAME_9809 jump @NONAME_10670 :NONAME_9809 jump @NONAME_5807 :NONAME_9816 wait 0 [email protected] = 0 :NONAME_9827 wait 0 0209: [email protected] = random_int_in_ranges 0 16 if and not [email protected] == 8 not [email protected] == 9 not [email protected] == 14 jf @NONAME_9827 wait 0 [email protected] = -382234 [email protected] *= 16 005A: [email protected] += [email protected] // (int) [email protected] /= 16 [email protected] = 6.643 :NONAME_9918 not &0([email protected],1i) == 0 jf @NONAME_9973 wait 0 Model.Load(&0([email protected],1i)) [email protected] += 6.357 [email protected] += 1 jump @NONAME_9918 :NONAME_9973 038B: load_requested_models 0087: [email protected] = [email protected] // (float) [email protected] += 20.0 [email protected] = -382234 [email protected] *= 16 005A: [email protected] += [email protected] // (int) [email protected] /= 16 :NONAME_10025 wait 0 if not &0([email protected],1i) == 0 jf @NONAME_10089 :NONAME_10051 wait 0 if Model.Available(&0([email protected],1i)) jf @NONAME_10051 [email protected] += 1 jump @NONAME_10025 :NONAME_10089 wait 0 [email protected] = -382234 [email protected] *= 16 005A: [email protected] += [email protected] // (int) [email protected] /= 16 [email protected] += 14 if or &0([email protected],1i) == 0 [email protected] == 7 [email protected] == 13 [email protected] == 15 jf @NONAME_10182 jump @NONAME_10336 :NONAME_10182 008B: [email protected] = &0([email protected],1i) // (int) [email protected] += 1 008A: &0([email protected],1i) = [email protected] // (int) [email protected] += 1 008B: [email protected] = &0([email protected],1i) // (int) 008A: &0([email protected],1i) = [email protected] // (int) [email protected] += 1 008B: [email protected] = &0([email protected],1i) // (int) 008A: &0([email protected],1i) = [email protected] // (int) [email protected] += 1 008B: [email protected] = &0([email protected],1i) // (int) 008A: &0([email protected],1i) = [email protected] // (int) [email protected] += 1 008B: [email protected] = &0([email protected],1i) // (int) &0([email protected],1i) = 0 :NONAME_10336 wait 0 06D8: [email protected] = create_train_at [email protected] [email protected] 0.0 type [email protected] direction 1 [email protected] = 3 [email protected] = 1 06DC: set_train [email protected] acc 16.67 06DD: set_train [email protected] speed 16.67 [email protected] = Marker.CreateAboveCar([email protected]) Marker.SetColor([email protected], 1) 018B: set_marker [email protected] radar_mode 2 [email protected] = -382234 [email protected] *= 16 005A: [email protected] += [email protected] // (int) [email protected] /= 16 [email protected] += 14 if and not &0([email protected],1i) == 0 not [email protected] == 7 not [email protected] == 13 not [email protected] == 15 jf @NONAME_10593 [email protected] += 1 &0([email protected],1i) = 0 [email protected] += 1 008A: &0([email protected],1i) = [email protected] // (int) [email protected] += 1 008A: &0([email protected],1i) = [email protected] // (int) [email protected] += 1 008A: &0([email protected],1i) = [email protected] // (int) [email protected] += 1 008A: &0([email protected],1i) = [email protected] // (int) :NONAME_10593 [email protected] = -382234 [email protected] *= 16 005A: [email protected] += [email protected] // (int) [email protected] /= 16 :NONAME_10625 not &0([email protected],1i) == 0 jf @NONAME_10670 wait 0 Model.Destroy(&0([email protected],1i)) [email protected] += 1 jump @NONAME_10625 :NONAME_10670 wait 0 if and [email protected] == 3 [email protected] == 1 jf @NONAME_11116 Car.StorePos([email protected], [email protected], [email protected], [email protected]) 0509: [email protected] = distance_between_XY 1474.903 2634.637 and_XY [email protected] [email protected] if and 0025: [email protected] > [email protected] // (float) 0025: [email protected] > [email protected] // (float) not [email protected] >= 1474.903 jf @NONAME_10795 06DD: set_train [email protected] speed 0.0 [email protected] = 4 jump @NONAME_11116 :NONAME_10795 0509: [email protected] = distance_between_XY 2866.867 1246.492 and_XY [email protected] [email protected] if and 0025: [email protected] > [email protected] // (float) 0025: [email protected] > [email protected] // (float) [email protected] > 1246.492 jf @NONAME_10877 06DD: set_train [email protected] speed 0.0 [email protected] = 4 jump @NONAME_11116 :NONAME_10877 0509: [email protected] = distance_between_XY 1696.873 -1955.769 and_XY [email protected] [email protected] if and 0025: [email protected] > [email protected] // (float) 0025: [email protected] > [email protected] // (float) [email protected] > 1696.873 jf @NONAME_10959 06DD: set_train [email protected] speed 0.0 [email protected] = 4 jump @NONAME_11116 :NONAME_10959 0509: [email protected] = distance_between_XY 784.326 -1341.736 and_XY [email protected] [email protected] if and 0025: [email protected] > [email protected] // (float) 0025: [email protected] > [email protected] // (float) [email protected] > 784.326 jf @NONAME_11041 06DD: set_train [email protected] speed 0.0 [email protected] = 4 jump @NONAME_11116 :NONAME_11041 0509: [email protected] = distance_between_XY -1943.779 183.2991 and_XY [email protected] [email protected] if and 0025: [email protected] > [email protected] // (float) 0025: [email protected] > [email protected] // (float) not [email protected] >= 183.2991 jf @NONAME_11116 06DD: set_train [email protected] speed 0.0 [email protected] = 4 :NONAME_11116 wait 0 if and [email protected] == 3 [email protected] == 1 jf @NONAME_11562 Car.StorePos([email protected], [email protected], [email protected], [email protected]) 0509: [email protected] = distance_between_XY 1392.746 2634.255 and_XY [email protected] [email protected] if and 0025: [email protected] > [email protected] // (float) 0025: [email protected] > [email protected] // (float) [email protected] > 1392.746 jf @NONAME_11241 06DD: set_train [email protected] speed 0.0 [email protected] = 4 jump @NONAME_11562 :NONAME_11241 0509: [email protected] = distance_between_XY 2867.267 1330.162 and_XY [email protected] [email protected] if and 0025: [email protected] > [email protected] // (float) 0025: [email protected] > [email protected] // (float) not [email protected] >= 1330.162 jf @NONAME_11323 06DD: set_train [email protected] speed 0.0 [email protected] = 4 jump @NONAME_11562 :NONAME_11323 0509: [email protected] = distance_between_XY 1778.116 -1955.706 and_XY [email protected] [email protected] if and 0025: [email protected] > [email protected] // (float) 0025: [email protected] > [email protected] // (float) not [email protected] >= 1778.116 jf @NONAME_11405 06DD: set_train [email protected] speed 0.0 [email protected] = 4 jump @NONAME_11562 :NONAME_11405 0509: [email protected] = distance_between_XY 841.0762 -1393.855 and_XY [email protected] [email protected] if and 0025: [email protected] > [email protected] // (float) 0025: [email protected] > [email protected] // (float) not [email protected] >= 841.0762 jf @NONAME_11487 06DD: set_train [email protected] speed 0.0 [email protected] = 4 jump @NONAME_11562 :NONAME_11487 0509: [email protected] = distance_between_XY -1946.499 81.0843 and_XY [email protected] [email protected] if and 0025: [email protected] > [email protected] // (float) 0025: [email protected] > [email protected] // (float) [email protected] > 81.0843 jf @NONAME_11562 06DD: set_train [email protected] speed 0.0 [email protected] = 4 :NONAME_11562 wait 0 if [email protected] == 4 jf @NONAME_11642 if and [email protected] == 1 01C1: car [email protected] stopped jf @NONAME_11642 [email protected] = 5 0209: [email protected] = random_int_in_ranges 15 21 wait 0 [email protected] *= 1000 [email protected] = 0 :NONAME_11642 wait 0 if [email protected] == 4 jf @NONAME_11722 if and [email protected] == 1 01C1: car [email protected] stopped jf @NONAME_11722 [email protected] = 5 0209: [email protected] = random_int_in_ranges 15 21 wait 0 [email protected] *= 1000 [email protected] = 0 :NONAME_11722 wait 0 if [email protected] == 5 jf @NONAME_11787 if and [email protected] == 1 001D: [email protected] > [email protected] // (int) jf @NONAME_11787 [email protected] = 3 06DD: set_train [email protected] speed 16.67 :NONAME_11787 wait 0 if [email protected] == 5 jf @NONAME_11852 if and [email protected] == 1 001D: [email protected] > [email protected] // (int) jf @NONAME_11852 [email protected] = 3 06DD: set_train [email protected] speed 16.67 :NONAME_11852 wait 0 if [email protected] > 2 jf @NONAME_11969 Actor.StorePos($PLAYER_ACTOR, [email protected], [email protected], [email protected]) Car.StorePos([email protected], [email protected], [email protected], [email protected]) 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_11969 Marker.Disable([email protected]) 07BD: destroy_train [email protected] 07BE: remove_references_to_train [email protected] [email protected] = 0 [email protected] = 0 :NONAME_11969 wait 0 if [email protected] > 2 jf @NONAME_12086 Actor.StorePos($PLAYER_ACTOR, [email protected], [email protected], [email protected]) Car.StorePos([email protected], [email protected], [email protected], [email protected]) 0509: [email protected] = distance_between_XY [email protected] [email protected] and_XY [email protected] [email protected] if [email protected] > 600.0 jf @NONAME_12086 Marker.Disable([email protected]) 07BD: destroy_train [email protected] 07BE: remove_references_to_train [email protected] [email protected] = 0 [email protected] = 0 :NONAME_12086 wait 0 if [email protected] > 2 jf @NONAME_12163 if and not Actor.InCar($PLAYER_ACTOR, [email protected]) 0203: actor $PLAYER_ACTOR near_car [email protected] radius 8.0 8.0 flag 0 on_foot 00E1: player 0 pressed_key 15 jf @NONAME_12163 05CB: AS_actor $PLAYER_ACTOR enter_car [email protected] as_driver 1 ms :NONAME_12163 wait 0 if [email protected] > 2 jf @NONAME_12240 if and not Actor.InCar($PLAYER_ACTOR, [email protected]) 0203: actor $PLAYER_ACTOR near_car [email protected] radius 8.0 8.0 flag 0 on_foot 00E1: player 0 pressed_key 15 jf @NONAME_12240 05CB: AS_actor $PLAYER_ACTOR enter_car [email protected] as_driver 1 ms :NONAME_12240 wait 0 if and [email protected] > 2 [email protected] == 1 jf @NONAME_12310 if and Actor.InCar($PLAYER_ACTOR, [email protected]) 09AE: actor $PLAYER_ACTOR driving_train jf @NONAME_12310 [email protected] = 0 06DD: set_train [email protected] speed 0.0 :NONAME_12310 wait 0 if and [email protected] > 2 [email protected] == 1 jf @NONAME_51 if and Actor.InCar($PLAYER_ACTOR, [email protected]) 09AE: actor $PLAYER_ACTOR driving_train jf @NONAME_12380 [email protected] = 0 06DD: set_train [email protected] speed 0.0 :NONAME_12380 jump @NONAME_51 Can anyone help me out making the code "disabled during missions" ? Another idea was to reverse each trains direction so they are the same like during the story missions (snail trail, wrong side of the tracks...) but that would just be a "bonus". First of i'd like to get this working in the first place. Edited March 19, 2018 by hlennarz Link to comment Share on other sites More sharing options...
hlennarz Posted August 5, 2019 Author Share Posted August 5, 2019 bump Link to comment Share on other sites More sharing options...