require "lib.moonloader"
local KEY_H, script_enabled = 72, true
function main()
if isSampAvailable() then
sampAddChatMessage("[SIGNAL] Загружен. by: нейросеть", 0x1E90FF)
sampRegisterChatCommand("signal", cmd_signal)
end
while true do
wait(0)
if not isSampAvailable() then wait(1000) goto continue end
if script_enabled then
for i = 0, 2049 do
if sampIs3dTextDefined(i) then
local text, color, x, y, z = sampGet3dTextInfoById(i)
if text and text:find("Посигнальте Чтобы доставить груз") then
local px, py, pz = getCharCoordinates(PLAYER_PED)
if math.sqrt((x-px)^2+(y-py)^2+(z-pz)^2) < 10.0 then
setVirtualKeyDown(KEY_H, true)
wait(50)
setVirtualKeyDown(KEY_H, false)
wait(2000)
end
end
end
end
end
::continue::
end
end
function cmd_signal()
script_enabled = not script_enabled
sampAddChatMessage("[SIGNAL] Скрипт " .. (script_enabled and "активирован" or "деактивирован"), script_enabled and 0x1E90FF or 0xFF0000)
end