- 67
- 7
- Версия MoonLoader
- .027.0-preview
хотел сделать бота на автобусника по маршруту джефферсона, но почему то скрипт не работает, подскажите что как
Lua:
require "lib.moonloader"
function main()
if not isSampfuncsLoaded() or not isSampLoaded() then return end
sampRegisterChatCommand("bb", cmd_bot)
local saveX = {}
local saveY = {}
local saveZ = {}
while true do
wait(0)
if isPlayerPlaying(playerHandle) and enabled then
wait(390)
BeginToPoint(1272.800049, -1830.869995, 14.470000, 1.000000, -255, false)
local posX, posY, posZ = GetCoordinates()
local mfind, mposX, mposY, mposZ = SearchMarker(posX, posY, posZ, 50.000000, false)
if mfind then BeginToPoint(mposX, mposY, mposZ, 1.000000, -255, false) end
BeginToPoint(1225.150024, -1832.699951, 14.520000, 1.000000, -255, false)
BeginToPoint(1211.119995, -1846.630005, 14.510000, 1.000000, -255, false)
BeginToPoint(1211.650024, -1854.910034, 14.510000, 1.000000, -255, false)
BeginToPoint(1221.670044, -1858.869995, 14.680000, 1.000000, -255, false)
BeginToPoint(1240.619995, -1858.780029, 14.670000, 1.000000, -255, false)
BeginToPoint(1268.780029, -1854.209961, 14.500000, 1.000000, -255, false)
BeginToPoint(1340.060059, -1854.959961, 14.510000, 1.000000, -255, false)
BeginToPoint(1368.719971, -1868.560059, 14.510000, 1.000000, -255, false)
wait(390)
local posX, posY, posZ = GetCoordinates()
local mfind, mposX, mposY, mposZ = SearchMarker(posX, posY, posZ, 50.000000, false)
if mfind then BeginToPoint(mposX, mposY, mposZ, 1.000000, -255, false) end
BeginToPoint(1423.849976, -1874.609985, 14.510000, 1.000000, -255, false)
BeginToPoint(1634.150024, -1874.689941, 14.510000, 1.000000, -255, false)
local posX, posY, posZ = GetCoordinates()
local mfind, mposX, mposY, mposZ = SearchMarker(posX, posY, posZ, 50.000000, false)
if mfind then BeginToPoint(mposX, mposY, mposZ, 1.000000, -255, false) end
BeginToPoint(1671.060059, -1871.599976, 14.510000, 1.000000, -255, false)
BeginToPoint(1704.680054, -1862.869995, 14.700000, 1.000000, -255, false)
BeginToPoint(1757.380005, -1850.780029, 14.640000, 1.000000, -255, false)
BeginToPoint(1781.599976, -1841.449951, 14.700000, 1.000000, -255, false)
BeginToPoint(1788.770020, -1838.609985, 14.700000, 1.000000, -255, false)
wait(390)
local posX, posY, posZ = GetCoordinates()
local mfind, mposX, mposY, mposZ = SearchMarker(posX, posY, posZ, 50.000000, false)
if mfind then BeginToPoint(mposX, mposY, mposZ, 1.000000, -255, false) end
BeginToPoint(1816.609985, -1832.380005, 14.540000, 1.000000, -255, false)
BeginToPoint(1825.199951, -1840.619995, 14.540000, 1.000000, -255, false)
BeginToPoint(1823.959961, -1862.020020, 14.540000, 1.000000, -255, false)
BeginToPoint(1821.670044, -1889.969971, 14.490000, 1.000000, -255, false)
BeginToPoint(1819.839966, -1907.540039, 14.520000, 1.000000, -255, false)
wait(10000)
BeginToPoint(1819.369995, -1927.109985, 14.510000, 1.000000, -255, false)
BeginToPoint(1834.969971, -1935.219971, 14.510000, 1.000000, -255, false)
BeginToPoint(1852.939941, -1934.599976, 14.510000, 1.000000, -255, false)
local posX, posY, posZ = GetCoordinates()
local mfind, mposX, mposY, mposZ = SearchMarker(posX, posY, posZ, 50.000000, false)
if mfind then BeginToPoint(mposX, mposY, mposZ, 1.000000, -255, false) end
BeginToPoint(1957.089966, -1935.030029, 14.510000, 1.000000, -255, false)
BeginToPoint(1964.209961, -1926.089966, 14.510000, 1.000000, -255, false)
BeginToPoint(1964.459961, -1911.400024, 14.510000, 1.000000, -255, false)
local posX, posY, posZ = GetCoordinates()
local mfind, mposX, mposY, mposZ = SearchMarker(posX, posY, posZ, 50.000000, false)
if mfind then BeginToPoint(mposX, mposY, mposZ, 1.000000, -255, false) end
BeginToPoint(1964.290039, -1859.780029, 14.510000, 1.000000, -255, false)
local posX, posY, posZ = GetCoordinates()
local mfind, mposX, mposY, mposZ = SearchMarker(posX, posY, posZ, 50.000000, false)
if mfind then BeginToPoint(mposX, mposY, mposZ, 1.000000, -255, false) end
wait(10000)
BeginToPoint(1964.349976, -1761.569946, 14.510000, 1.000000, -255, false)
BeginToPoint(1952.800049, -1752.890015, 14.310000, 1.000000, -255, false)
BeginToPoint(1937.040039, -1750.510010, 14.510000, 1.000000, -255, false)
local posX, posY, posZ = GetCoordinates()
local mfind, mposX, mposY, mposZ = SearchMarker(posX, posY, posZ, 50.000000, false)
if mfind then BeginToPoint(mposX, mposY, mposZ, 1.000000, -255, false) end
BeginToPoint(1834.689941, -1749.920044, 14.510000, 1.000000, -255, false)
BeginToPoint(1823.430054, -1739.449951, 14.500000, 1.000000, -255, false)
BeginToPoint(1825.910034, -1724.479980, 14.580000, 1.000000, -255, false)
BeginToPoint(1824.540039, -1661.560059, 14.510000, 1.000000, -255, false)
local posX, posY, posZ = GetCoordinates()
local mfind, mposX, mposY, mposZ = SearchMarker(posX, posY, posZ, 50.000000, false)
if mfind then BeginToPoint(mposX, mposY, mposZ, 1.000000, -255, false) end
wait(10000)
BeginToPoint(1824.280029, -1586.089966, 14.490000, 1.000000, -255, false)
BeginToPoint(1844.910034, -1513.349976, 14.500000, 1.000000, -255, false)
BeginToPoint(1852.250000, -1477.829956, 14.510000, 1.000000, -255, false)
BeginToPoint(1852.219971, -1466.439941, 14.530000, 1.000000, -255, false)
local posX, posY, posZ = GetCoordinates()
local mfind, mposX, mposY, mposZ = SearchMarker(posX, posY, posZ, 50.000000, false)
if mfind then BeginToPoint(mposX, mposY, mposZ, 1.000000, -255, false) end
BeginToPoint(1852.560059, -1253.890015, 14.520000, 1.000000, -255, false)
BeginToPoint(1852.729980, -1194.959961, 24.379999, 1.000000, -255, false)
BeginToPoint(1863.530029, -1178.449951, 24.719999, 1.000000, -255, false)
local posX, posY, posZ = GetCoordinates()
local mfind, mposX, mposY, mposZ = SearchMarker(posX, posY, posZ, 50.000000, false)
if mfind then BeginToPoint(mposX, mposY, mposZ, 1.000000, -255, false) end
BeginToPoint(1870.280029, -1075.099976, 24.799999, 1.000000, -255, false)
BeginToPoint(1880.050049, -1051.310059, 24.850000, 1.000000, -255, false)
BeginToPoint(1893.290039, -1046.500000, 24.870001, 1.000000, -255, false)
BeginToPoint(1910.530029, -1044.829956, 24.950001, 1.000000, -255, false)
BeginToPoint(1947.579956, -1045.770020, 25.129999, 1.000000, -255, false)
BeginToPoint(2004.989990, -1062.750000, 25.570000, 1.000000, -255, false)
local posX, posY, posZ = GetCoordinates()
local mfind, mposX, mposY, mposZ = SearchMarker(posX, posY, posZ, 50.000000, false)
if mfind then BeginToPoint(mposX, mposY, mposZ, 1.000000, -255, false) end
BeginToPoint(2156.879883, -1118.459961, 26.480000, 1.000000, -255, false)
BeginToPoint(2219.020020, -1134.140015, 26.750000, 1.000000, -255, false)
local posX, posY, posZ = GetCoordinates()
local mfind, mposX, mposY, mposZ = SearchMarker(posX, posY, posZ, 50.000000, false)
if mfind then BeginToPoint(mposX, mposY, mposZ, 1.000000, -255, false) end
wait(10000)
BeginToPoint(2276.840088, -1151.349976, 27.850000, 1.000000, -255, false)
BeginToPoint(2310.110107, -1156.239990, 27.930000, 1.000000, -255, false)
BeginToPoint(2394.389893, -1156.790039, 29.990000, 1.000000, -255, false)
BeginToPoint(2534.699951, -1155.050049, 43.599998, 1.000000, -255, false)
BeginToPoint(2669.729980, -1155.510010, 54.470001, 1.000000, -255, false)
local posX, posY, posZ = GetCoordinates()
local mfind, mposX, mposY, mposZ = SearchMarker(posX, posY, posZ, 50.000000, false)
if mfind then BeginToPoint(mposX, mposY, mposZ, 1.000000, -255, false) end
BeginToPoint(2743.189941, -1155.890015, 45.820000, 1.000000, -255, false)
BeginToPoint(2877.360107, -1137.630005, 11.960000, 1.000000, -255, false)
BeginToPoint(2884.760010, -1122.140015, 12.000000, 1.000000, -255, false)
local posX, posY, posZ = GetCoordinates()
local mfind, mposX, mposY, mposZ = SearchMarker(posX, posY, posZ, 50.000000, false)
if mfind then BeginToPoint(mposX, mposY, mposZ, 1.000000, -255, false) end
BeginToPoint(2890.830078, -1065.260010, 12.000000, 1.000000, -255, false)
BeginToPoint(2896.050049, -872.950012, 12.000000, 1.000000, -255, false)
local posX, posY, posZ = GetCoordinates()
local mfind, mposX, mposY, mposZ = SearchMarker(posX, posY, posZ, 50.000000, false)
if mfind then BeginToPoint(mposX, mposY, mposZ, 1.000000, -255, false) end
BeginToPoint(2900.399902, -651.729980, 11.970000, 1.000000, -255, false)
BeginToPoint(2877.090088, -544.760010, 14.370000, 1.000000, -255, false)
BeginToPoint(2837.040039, -464.119995, 20.100000, 1.000000, -255, false)
local posX, posY, posZ = GetCoordinates()
local mfind, mposX, mposY, mposZ = SearchMarker(posX, posY, posZ, 50.000000, false)
if mfind then BeginToPoint(mposX, mposY, mposZ, 1.000000, -255, false) end
BeginToPoint(2741.189941, -358.429993, 26.709999, 1.000000, -255, false)
BeginToPoint(2711.879883, -305.600006, 28.690001, 1.000000, -255, false)
BeginToPoint(2716.399902, -283.739990, 28.879999, 1.000000, -255, false)
BeginToPoint(2726.310059, -254.639999, 29.230000, 1.000000, -255, false)
BeginToPoint(2740.350098, -213.600006, 30.650000, 1.000000, -255, false)
local posX, posY, posZ = GetCoordinates()
local mfind, mposX, mposY, mposZ = SearchMarker(posX, posY, posZ, 50.000000, false)
if mfind then BeginToPoint(mposX, mposY, mposZ, 1.000000, -255, false) end
BeginToPoint(2764.760010, -142.360001, 34.619999, 1.000000, -255, false)
BeginToPoint(2775.050049, -66.320000, 37.070000, 1.000000, -255, false)
BeginToPoint(2784.629883, -17.240000, 36.869999, 1.000000, -255, false)
BeginToPoint(2795.750000, 7.230000, 30.459999, 1.000000, -255, false)
BeginToPoint(2813.300049, 26.469999, 22.540001, 1.000000, -255, false)
BeginToPoint(2825.280029, 33.700001, 21.139999, 1.000000, -255, false)
BeginToPoint(2824.979980, 47.630001, 21.030001, 1.000000, -255, false)
BeginToPoint(2820.429932, 49.320000, 21.120001, 1.000000, -255, false)
BeginToPoint(2811.669922, 49.860001, 21.299999, 1.000000, -255, false)
BeginToPoint(2793.629883, 49.020000, 21.700001, 1.000000, -255, false)
BeginToPoint(2776.020020, 48.290001, 22.180000, 1.000000, -255, false)
local posX, posY, posZ = GetCoordinates()
local mfind, mposX, mposY, mposZ = SearchMarker(posX, posY, posZ, 50.000000, false)
if mfind then BeginToPoint(mposX, mposY, mposZ, 1.000000, -255, false) end
BeginToPoint(2675.239990, 47.360001, 26.530001, 1.000000, -255, false)
BeginToPoint(2619.919922, 45.750000, 27.389999, 1.000000, -255, false)
BeginToPoint(2431.699951, 43.650002, 27.459999, 1.000000, -255, false)
local posX, posY, posZ = GetCoordinates()
local mfind, mposX, mposY, mposZ = SearchMarker(posX, posY, posZ, 50.000000, false)
if mfind then BeginToPoint(mposX, mposY, mposZ, 1.000000, -255, false) end
BeginToPoint(2401.540039, 43.830002, 27.459999, 1.000000, -255, false)
BeginToPoint(2393.870117, 53.830002, 27.450001, 1.000000, -255, false)
BeginToPoint(2393.840088, 62.980000, 27.459999, 1.000000, -255, false)
BeginToPoint(2394.149902, 75.059998, 27.459999, 1.000000, -255, false)
BeginToPoint(2376.159912, 94.339996, 27.610001, 1.000000, -255, false)
BeginToPoint(2353.340088, 94.620003, 27.459999, 1.000000, -255, false)
BeginToPoint(2295.199951, 94.449997, 27.469999, 1.000000, -255, false)
local posX, posY, posZ = GetCoordinates()
local mfind, mposX, mposY, mposZ = SearchMarker(posX, posY, posZ, 50.000000, false)
if mfind then BeginToPoint(mposX, mposY, mposZ, 1.000000, -255, false) end
wait(10000)
BeginToPoint(2240.129883, 94.559998, 27.459999, 1.000000, -255, false)
BeginToPoint(2220.560059, 79.410004, 27.459999, 1.000000, -255, false)
BeginToPoint(2220.659912, 63.000000, 27.459999, 1.000000, -255, false)
BeginToPoint(2220.649902, 52.880001, 27.459999, 1.000000, -255, false)
BeginToPoint(2209.689941, 45.720001, 27.530001, 1.000000, -255, false)
BeginToPoint(2167.929932, 43.709999, 27.459999, 1.000000, -255, false)
BeginToPoint(2036.060059, 43.689999, 30.030001, 1.000000, -255, false)
BeginToPoint(1950.380005, 43.419998, 34.299999, 1.000000, -255, false)
local posX, posY, posZ = GetCoordinates()
local mfind, mposX, mposY, mposZ = SearchMarker(posX, posY, posZ, 50.000000, false)
if mfind then BeginToPoint(mposX, mposY, mposZ, 1.000000, -255, false) end
BeginToPoint(1895.209961, 46.910000, 36.070000, 1.000000, -255, false)
BeginToPoint(1835.010010, 62.810001, 36.730000, 1.000000, -255, false)
BeginToPoint(1768.579956, 97.900002, 34.930000, 1.000000, -255, false)
local posX, posY, posZ = GetCoordinates()
local mfind, mposX, mposY, mposZ = SearchMarker(posX, posY, posZ, 50.000000, false)
if mfind then BeginToPoint(mposX, mposY, mposZ, 1.000000, -255, false) end
BeginToPoint(1694.359985, 128.440002, 32.750000, 1.000000, -255, false)
BeginToPoint(1650.790039, 135.160004, 31.709999, 1.000000, -255, false)
BeginToPoint(1607.089966, 134.619995, 30.980000, 1.000000, -255, false)
BeginToPoint(1545.680054, 118.430000, 30.580000, 1.000000, -255, false)
BeginToPoint(1522.520020, 121.379997, 31.260000, 1.000000, -255, false)
BeginToPoint(1518.459961, 130.229996, 32.049999, 1.000000, -255, false)
local posX, posY, posZ = GetCoordinates()
local mfind, mposX, mposY, mposZ = SearchMarker(posX, posY, posZ, 50.000000, false)
if mfind then BeginToPoint(mposX, mposY, mposZ, 1.000000, -255, false) end
BeginToPoint(1480.089966, 168.889999, 29.700001, 1.000000, -255, false)
BeginToPoint(1243.469971, 272.010010, 20.530001, 1.000000, -255, false)
local posX, posY, posZ = GetCoordinates()
local mfind, mposX, mposY, mposZ = SearchMarker(posX, posY, posZ, 50.000000, false)
if mfind then BeginToPoint(mposX, mposY, mposZ, 1.000000, -255, false) end
wait(10000)
BeginToPoint(1208.959961, 289.250000, 20.610001, 1.000000, -255, false)
BeginToPoint(1207.729980, 306.000000, 20.510000, 1.000000, -255, false)
BeginToPoint(1215.349976, 322.920013, 20.530001, 1.000000, -255, false)
local posX, posY, posZ = GetCoordinates()
local mfind, mposX, mposY, mposZ = SearchMarker(posX, posY, posZ, 50.000000, false)
if mfind then BeginToPoint(mposX, mposY, mposZ, 1.000000, -255, false) end
BeginToPoint(1228.219971, 347.190002, 20.530001, 1.000000, -255, false)
BeginToPoint(1248.729980, 341.679993, 20.530001, 1.000000, -255, false)
BeginToPoint(1289.040039, 322.989990, 20.530001, 1.000000, -255, false)
local posX, posY, posZ = GetCoordinates()
local mfind, mposX, mposY, mposZ = SearchMarker(posX, posY, posZ, 50.000000, false)
if mfind then BeginToPoint(mposX, mposY, mposZ, 1.000000, -255, false) end
BeginToPoint(1322.030029, 321.459991, 20.540001, 1.000000, -255, false)
BeginToPoint(1329.140015, 332.100006, 20.540001, 1.000000, -255, false)
BeginToPoint(1340.209961, 357.850006, 20.540001, 1.000000, -255, false)
local posX, posY, posZ = GetCoordinates()
local mfind, mposX, mposY, mposZ = SearchMarker(posX, posY, posZ, 50.000000, false)
if mfind then BeginToPoint(mposX, mposY, mposZ, 1.000000, -255, false) end
BeginToPoint(1369.619995, 425.529999, 20.570000, 1.000000, -255, false)
BeginToPoint(1364.359985, 450.989990, 21.010000, 1.000000, -255, false)
BeginToPoint(1335.069946, 469.859985, 21.010000, 1.000000, -255, false)
BeginToPoint(1172.569946, 552.460022, 21.010000, 1.000000, -255, false)
local posX, posY, posZ = GetCoordinates()
local mfind, mposX, mposY, mposZ = SearchMarker(posX, posY, posZ, 50.000000, false)
if mfind then BeginToPoint(mposX, mposY, mposZ, 1.000000, -255, false) end
BeginToPoint(1106.699951, 578.179993, 21.010000, 1.000000, -255, false)
BeginToPoint(1085.250000, 575.710022, 21.010000, 1.000000, -255, false)
BeginToPoint(1061.689941, 552.919983, 21.010000, 1.000000, -255, false)
BeginToPoint(1026.829956, 496.570007, 21.010000, 1.000000, -255, false)
BeginToPoint(1013.869995, 470.010010, 21.010000, 1.000000, -255, false)
local posX, posY, posZ = GetCoordinates()
local mfind, mposX, mposY, mposZ = SearchMarker(posX, posY, posZ, 50.000000, false)
if mfind then BeginToPoint(mposX, mposY, mposZ, 1.000000, -255, false) end
BeginToPoint(976.340027, 400.089996, 21.010000, 1.000000, -255, false)
BeginToPoint(939.909973, 378.600006, 21.010000, 1.000000, -255, false)
BeginToPoint(899.390015, 363.170013, 21.010000, 1.000000, -255, false)
local posX, posY, posZ = GetCoordinates()
local mfind, mposX, mposY, mposZ = SearchMarker(posX, posY, posZ, 50.000000, false)
if mfind then BeginToPoint(mposX, mposY, mposZ, 1.000000, -255, false) end
BeginToPoint(856.530029, 350.940002, 21.010000, 1.000000, -255, false)
BeginToPoint(789.119995, 333.130005, 21.020000, 1.000000, -255, false)
BeginToPoint(620.130005, 309.970001, 20.969999, 1.000000, -255, false)
BeginToPoint(590.070007, 300.529999, 19.940001, 1.000000, -255, false)
BeginToPoint(567.530029, 284.739990, 18.629999, 1.000000, -255, false)
BeginToPoint(536.599976, 258.959991, 16.570000, 1.000000, -255, false)
local posX, posY, posZ = GetCoordinates()
local mfind, mposX, mposY, mposZ = SearchMarker(posX, posY, posZ, 50.000000, false)
if mfind then BeginToPoint(mposX, mposY, mposZ, 1.000000, -255, false) end
BeginToPoint(327.410004, 83.430000, 4.600000, 1.000000, -255, false)
local posX, posY, posZ = GetCoordinates()
local mfind, mposX, mposY, mposZ = SearchMarker(posX, posY, posZ, 50.000000, false)
if mfind then BeginToPoint(mposX, mposY, mposZ, 1.000000, -255, false) end
BeginToPoint(246.550003, 45.439999, 3.410000, 1.000000, -255, false)
BeginToPoint(208.990005, 46.990002, 3.240000, 1.000000, -255, false)
BeginToPoint(190.100006, 56.419998, 3.210000, 1.000000, -255, false)
BeginToPoint(135.679993, 82.510002, 3.210000, 1.000000, -255, false)
BeginToPoint(57.040001, 127.169998, 3.200000, 1.000000, -255, false)
local posX, posY, posZ = GetCoordinates()
local mfind, mposX, mposY, mposZ = SearchMarker(posX, posY, posZ, 50.000000, false)
if mfind then BeginToPoint(mposX, mposY, mposZ, 1.000000, -255, false) end
wait(10000)
BeginToPoint(-61.230000, 198.330002, 3.210000, 1.000000, -255, false)
BeginToPoint(-124.620003, 222.080002, 7.150000, 1.000000, -255, false)
BeginToPoint(-152.009995, 228.990005, 10.550000, 1.000000, -255, false)
local posX, posY, posZ = GetCoordinates()
local mfind, mposX, mposY, mposZ = SearchMarker(posX, posY, posZ, 50.000000, false)
if mfind then BeginToPoint(mposX, mposY, mposZ, 1.000000, -255, false) end
BeginToPoint(-189.410004, 238.399994, 13.120000, 1.000000, -255, false)
BeginToPoint(-206.520004, 227.419998, 13.160000, 1.000000, -255, false)
BeginToPoint(-214.600006, 216.740005, 12.750000, 1.000000, -255, false)
BeginToPoint(-223.479996, 197.110001, 11.020000, 1.000000, -255, false)
BeginToPoint(-260.720001, 108.309998, 2.190000, 1.000000, -255, false)
local posX, posY, posZ = GetCoordinates()
local mfind, mposX, mposY, mposZ = SearchMarker(posX, posY, posZ, 50.000000, false)
if mfind then BeginToPoint(mposX, mposY, mposZ, 1.000000, -255, false) end
BeginToPoint(-289.440002, 30.790001, 2.240000, 1.000000, -255, false)
BeginToPoint(-302.279999, -26.040001, 2.210000, 1.000000, -255, false)
BeginToPoint(-313.130005, -94.449997, 2.210000, 1.000000, -255, false)
BeginToPoint(-310.690002, -163.210007, 2.300000, 1.000000, -255, false)
BeginToPoint(-296.320007, -194.919998, 2.210000, 1.000000, -255, false)
local posX, posY, posZ = GetCoordinates()
local mfind, mposX, mposY, mposZ = SearchMarker(posX, posY, posZ, 50.000000, false)
if mfind then BeginToPoint(mposX, mposY, mposZ, 1.000000, -255, false) end
BeginToPoint(-248.759995, -272.260010, 2.320000, 1.000000, -255, false)
BeginToPoint(-168.720001, -360.529999, 2.210000, 1.000000, -255, false)
local posX, posY, posZ = GetCoordinates()
local mfind, mposX, mposY, mposZ = SearchMarker(posX, posY, posZ, 50.000000, false)
if mfind then BeginToPoint(mposX, mposY, mposZ, 1.000000, -255, false) end
wait(10000)
BeginToPoint(-94.230003, -425.230011, 2.200000, 1.000000, -255, false)
BeginToPoint(-6.100000, -481.950012, 5.470000, 1.000000, -255, false)
BeginToPoint(24.559999, -508.239990, 10.850000, 1.000000, -255, false)
BeginToPoint(42.230000, -536.659973, 11.280000, 1.000000, -255, false)
BeginToPoint(48.540001, -568.570007, 9.680000, 1.000000, -255, false)
BeginToPoint(45.400002, -631.929993, 4.370000, 1.000000, -255, false)
BeginToPoint(56.680000, -659.989990, 5.230000, 1.000000, -255, false)
BeginToPoint(75.790001, -671.669983, 6.160000, 1.000000, -255, false)
BeginToPoint(126.279999, -684.679993, 7.510000, 1.000000, -255, false)
BeginToPoint(178.360001, -679.820007, 12.210000, 1.000000, -255, false)
BeginToPoint(198.809998, -659.760010, 18.549999, 1.000000, -255, false)
BeginToPoint(232.690002, -608.820007, 33.150002, 1.000000, -255, false)
BeginToPoint(258.640015, -575.219971, 39.849998, 1.000000, -255, false)
BeginToPoint(284.589996, -565.469971, 41.700001, 1.000000, -255, false)
local posX, posY, posZ = GetCoordinates()
local mfind, mposX, mposY, mposZ = SearchMarker(posX, posY, posZ, 50.000000, false)
if mfind then BeginToPoint(mposX, mposY, mposZ, 1.000000, -255, false) end
BeginToPoint(525.630005, -621.950012, 32.330002, 1.000000, -255, false)
BeginToPoint(652.070007, -662.210022, 17.760000, 1.000000, -255, false)
BeginToPoint(674.210022, -671.380005, 17.370001, 1.000000, -255, false)
BeginToPoint(679.299988, -682.510010, 17.299999, 1.000000, -255, false)
BeginToPoint(679.179993, -706.799988, 17.270000, 1.000000, -255, false)
BeginToPoint(689.320007, -828.830017, 43.529999, 1.000000, -255, false)
local posX, posY, posZ = GetCoordinates()
local mfind, mposX, mposY, mposZ = SearchMarker(posX, posY, posZ, 50.000000, false)
if mfind then BeginToPoint(mposX, mposY, mposZ, 1.000000, -255, false) end
BeginToPoint(705.750000, -865.380005, 44.380001, 1.000000, -255, false)
BeginToPoint(732.270020, -886.340027, 44.380001, 1.000000, -255, false)
BeginToPoint(784.869995, -920.049988, 44.360001, 1.000000, -255, false)
BeginToPoint(791.799988, -941.869995, 42.669998, 1.000000, -255, false)
BeginToPoint(794.369995, -1001.130005, 31.680000, 1.000000, -255, false)
BeginToPoint(795.229980, -1120.670044, 24.850000, 1.000000, -255, false)
local posX, posY, posZ = GetCoordinates()
local mfind, mposX, mposY, mposZ = SearchMarker(posX, posY, posZ, 50.000000, false)
if mfind then BeginToPoint(mposX, mposY, mposZ, 1.000000, -255, false) end
BeginToPoint(795.090027, -1242.089966, 15.020000, 1.000000, -255, false)
BeginToPoint(795.260010, -1357.209961, 14.510000, 1.000000, -255, false)
local posX, posY, posZ = GetCoordinates()
local mfind, mposX, mposY, mposZ = SearchMarker(posX, posY, posZ, 50.000000, false)
if mfind then BeginToPoint(mposX, mposY, mposZ, 1.000000, -255, false) end
BeginToPoint(805.289978, -1397.369995, 14.580000, 1.000000, -255, false)
BeginToPoint(835.179993, -1407.869995, 14.430000, 1.000000, -255, false)
BeginToPoint(853.489990, -1409.319946, 14.280000, 1.000000, -255, false)
BeginToPoint(940.549988, -1407.709961, 14.380000, 1.000000, -255, false)
BeginToPoint(1050.449951, -1407.150024, 14.490000, 1.000000, -255, false)
BeginToPoint(1246.130005, -1407.810059, 14.140000, 1.000000, -255, false)
local posX, posY, posZ = GetCoordinates()
local mfind, mposX, mposY, mposZ = SearchMarker(posX, posY, posZ, 50.000000, false)
if mfind then BeginToPoint(mposX, mposY, mposZ, 1.000000, -255, false) end
wait(10000)
BeginToPoint(1324.739990, -1408.209961, 14.440000, 1.000000, -255, false)
BeginToPoint(1341.270020, -1415.469971, 14.500000, 1.000000, -255, false)
BeginToPoint(1342.079956, -1426.189941, 14.510000, 1.000000, -255, false)
BeginToPoint(1338.859985, -1447.119995, 14.510000, 1.000000, -255, false)
BeginToPoint(1321.260010, -1498.270020, 14.510000, 1.000000, -255, false)
BeginToPoint(1297.939941, -1554.560059, 14.510000, 1.000000, -255, false)
BeginToPoint(1295.810059, -1581.819946, 14.510000, 1.000000, -255, false)
BeginToPoint(1295.390015, -1670.599976, 14.510000, 1.000000, -255, false)
BeginToPoint(1294.560059, -1835.170044, 14.510000, 1.000000, -255, false)
BeginToPoint(1283.780029, -1850.459961, 14.520000, 1.000000, -255, false)
BeginToPoint(1262.780029, -1838.680054, 14.610000, 1.000000, -255, false)
BeginToPoint(1250.459961, -1833.560059, 14.530000, 1.000000, -255, false)
end
end
end
function BeginToPoint(x, y, z, radius, move_code, isSprint)
repeat
local posX, posY, posZ = GetCoordinates()
SetAngle(x, y, z)
MovePlayer(move_code, isSprint)
local dist = getDistanceBetweenCoords3d(x, y, z, posX, posY, z)
wait(0)
until not enabled or dist < radius
end
function MovePlayer(move_code, isSprint)
setGameKeyState(1, move_code)
if isSprint then setGameKeyState(16, 255) end
end
function SetAngle(x, y, z)
local posX, posY, posZ = GetCoordinates()
local pX = x - posX
local pY = y - posY
local zAngle = getHeadingFromVector2d(pX, pY)
if isCharInAnyCar(playerPed) then
local car = storeCarCharIsInNoSave(playerPed)
setCarHeading(car, zAngle)
else
setCharHeading(playerPed, zAngle)
end
restoreCameraJumpcut()
end
function GetCoordinates()
if isCharInAnyCar(playerPed) then
local car = storeCarCharIsInNoSave(playerPed)
return getCarCoordinates(car)
else
return getCharCoordinates(playerPed)
end
end
function cmd_bot(param)
enabled = not enabled
if enabled then
sampAddChatMessage(string.format("[%s]: Активирован", thisScript().name), 0x40FF40)
else
sampAddChatMessage(string.format("[%s]: Деактивирован", thisScript().name), 0xFF4040)
end
end
function teleportPlayer(x, y, z)
if isCharInAnyCar(playerPed) then
setCharCoordinates(playerPed, x, y, z)
end
setCharCoordinatesDontResetAnim(playerPed, x, y, z)
end
function setCharCoordinatesDontResetAnim(char, x, y, z)
if doesCharExist(char) then
local ptr = getCharPointer(char)
setEntityCoordinates(ptr, x, y, z)
end
end
function setEntityCoordinates(entityPtr, x, y, z)
if entityPtr ~= 0 then
local matrixPtr = readMemory(entityPtr + 0x14, 4, false)
if matrixPtr ~= 0 then
local posPtr = matrixPtr + 0x30
writeMemory(posPtr + 0, 4, representFloatAsInt(x), false) --X
writeMemory(posPtr + 4, 4, representFloatAsInt(y), false) --Y
writeMemory(posPtr + 8, 4, representFloatAsInt(z), false) --Z
end
end
end
function SearchMarker(posX, posY, posZ, radius, isRace)
local ret_posX = 0.0
local ret_posY = 0.0
local ret_posZ = 0.0
local isFind = false
for id = 0, 31 do
local MarkerStruct = 0
if isRace then MarkerStruct = 0xC7F168 + id * 56
else MarkerStruct = 0xC7DD88 + id * 160 end
local MarkerPosX = representIntAsFloat(readMemory(MarkerStruct + 0, 4, false))
local MarkerPosY = representIntAsFloat(readMemory(MarkerStruct + 4, 4, false))
local MarkerPosZ = representIntAsFloat(readMemory(MarkerStruct + 8, 4, false))
if MarkerPosX ~= 0.0 or MarkerPosY ~= 0.0 or MarkerPosZ ~= 0.0 then
if getDistanceBetweenCoords3d(MarkerPosX, MarkerPosY, MarkerPosZ, posX, posY, posZ) < radius then
ret_posX = MarkerPosX
ret_posY = MarkerPosY
ret_posZ = MarkerPosZ
isFind = true
radius = getDistanceBetweenCoords3d(MarkerPosX, MarkerPosY, MarkerPosZ, posX, posY, posZ)
end
end
end
return isFind, ret_posX, ret_posY, ret_posZ
end