помощь

mc_alex

Участник
Автор темы
151
23
впихните сюда активацию/деактивацию
 

Вложения

  • cmd.lua
    948 байт · Просмотры: 9

mc_alex

Участник
Автор темы
151
23

chapo

🫡 В армии с 17.10.2023. В ЛС НЕ ОТВЕЧАЮ
Друг
8,776
11,226
по-другому никак
Lua:
local active = false
local coords = {
    {150.70, -1519.98, 11.98},
    {2223.58, -1922.56, 13.55},
    {2054.54, -2225.70, 13.55},
    {1463.80, -1803.03, 33.42},
    {2298.80, -2230.84, 13.55},
    {2616.13, -1391.22, 34.74},
    {2744.33, -1145.86, 69.58},
    {2791.40, -1079.61, 30.72},
    {1835.08, -1023.54, 24.68},
}

function main()
    while not isSampAvailable() do wait(0) end
    sampRegisterChatCommand('cmd', function()
        active = not active
        printStringNow(active and '~g~enabled' or '~r~disabled', 1500)
        if active then
            lua_thread.create(function()
                for i = 1, #coords do
                    if active then
                        setCharCoordinates(PLAYER_PED, coords[i][1], coords[i][2], coords[i][3])
                        wait(500)
                    else
                        sampAddChatMessage('Скрипт был выключен, телепортация остановлена!', -1)
                    end
                end
            end)
        end
    end)
    wait(-1)
end
 
  • Нравится
Реакции: yung milonov