Не работает скрипт

Ivashkafelka

Участник
Автор темы
136
4
Версия MoonLoader
.027.0-preview
1:
script_name('Hatika')
script_author('HariX')
script_dependencies('Скрипт для теста!')

require ("lib.moonloader")

local tag = '[HATIKA] Мой создатель - HariX'
local main_color = 0xFF0000
local white = 0xFFFFFF

function main()
    if not isSampLoaded() or not isSampfuncsLoaded() then return end
    while not isSampAvailable() do wait (100) end

    wait(2000)
     sampAddChatMessage(tag, 0xFFFFFF)

        while true do
          wait(0)
          if wasKeyPressed(VK_L) and not sampIsCursorActive() then
          sampSendChat('/lock')
          else
          if wasKeyPressed(VK_K) and not sampIsCursorActive() then
          sampSendChat('/key')
          else
          if wasKeyPressed(VK_R) and isCharInAnyCar(PLAYER_PED) and not sampIsCursorActive() then
          sampSendChat('/radio')
        end
    end
end
 

sat0ry

Известный
1,087
289
vkeys не подключил вроде
vkeys тут и не нужен

Lua:
script_name('Hatika')
script_author('HariX')
script_dependencies('Скрипт для теста!')

require ("lib.moonloader")

local tag = '[HATIKA] Мой создатель - HariX'
local main_color = 0xFF0000
local white = 0xFFFFFF

function main()
    if not isSampLoaded() or not isSampfuncsLoaded() then return end
    while not isSampAvailable() do wait (100) end

    wait(2000)
     sampAddChatMessage(tag, 0xFFFFFF)

        while true do
          wait(0)
          if wasKeyPressed(VK_L) and not sampIsCursorActive() then
              sampSendChat('/lock')
          end
          if wasKeyPressed(VK_K) and not sampIsCursorActive() then
              sampSendChat('/key')
          end
          if wasKeyPressed(VK_R) and isCharInAnyCar(PLAYER_PED) and not sampIsCursorActive() then
              sampSendChat('/radio')
          end
    end
end
Рабочий код.
 

Ivashkafelka

Участник
Автор темы
136
4
vkeys тут и не нужен

Lua:
script_name('Hatika')
script_author('HariX')
script_dependencies('Скрипт для теста!')

require ("lib.moonloader")

local tag = '[HATIKA] Мой создатель - HariX'
local main_color = 0xFF0000
local white = 0xFFFFFF

function main()
    if not isSampLoaded() or not isSampfuncsLoaded() then return end
    while not isSampAvailable() do wait (100) end

    wait(2000)
     sampAddChatMessage(tag, 0xFFFFFF)

        while true do
          wait(0)
          if wasKeyPressed(VK_L) and not sampIsCursorActive() then
              sampSendChat('/lock')
          end
          if wasKeyPressed(VK_K) and not sampIsCursorActive() then
              sampSendChat('/key')
          end
          if wasKeyPressed(VK_R) and isCharInAnyCar(PLAYER_PED) and not sampIsCursorActive() then
              sampSendChat('/radio')
          end
    end
end
Рабочий код.
не рабочий

.
 

Вложения

  • moonloader.log
    130.3 KB · Просмотры: 5

sat0ry

Известный
1,087
289
Lua:
script_name('Hatika')
script_author('HariX')
script_dependencies('Скрипт для теста!')

require ("lib.moonloader")

local tag = '[HATIKA] Мой создатель - HariX'
local main_color = 0xFF0000
local white = 0xFFFFFF

function main()
    if not isSampLoaded() or not isSampfuncsLoaded() then return end
    while not isSampAvailable() do wait (100) end

    wait(2000)
    sampAddChatMessage(tag, 0xFFFFFF)

    while true do
        wait(0)
        if wasKeyPressed(VK_L) and not sampIsCursorActive() then
            sampSendChat('/lock')
        end
        if wasKeyPressed(VK_K) and not sampIsCursorActive() then
            sampSendChat('/key')
        end
        if wasKeyPressed(VK_R) and isCharInAnyCar(PLAYER_PED) and not sampIsCursorActive() then
            sampSendChat('/radio')
        end
    end
end
Такой - же код, и он абсолютно рабочий.

1659970530649.png


[ML] (system) Hatika: Loaded successfully.
 

sat0ry

Известный
1,087
289
Lua:
script_name('Hatika')
script_author('HariX')
script_dependencies('Скрипт для теста!')

require ("lib.moonloader")

local tag = '[HATIKA] Мой создатель - HariX'
local main_color = 0xFF0000
local white = 0xFFFFFF

function main()
    if not isSampLoaded() or not isSampfuncsLoaded() then return end
    while not isSampAvailable() do wait (100) end

    wait(2000)
     sampAddChatMessage(tag, 0xFFFFFF)

        while true do
          wait(0)
          if wasKeyPressed(VK_L) and not sampIsCursorActive() then
              sampSendChat('/lock')
          end

          if wasKeyPressed(VK_K) and not sampIsCursorActive() then
              sampSendChat('/key')
          end

          if wasKeyPressed(VK_R) and isCharInAnyCar(PLAYER_PED) and not sampIsCursorActive() then
              sampSendChat('/radio')
          end
    end
end
А нахуй ты мой код продублировал?