Помогите починить скрипт

umeHHo oH

Активный
Автор темы
162
25
LUA:
require "lib.moonloader"
local keys = require "vkeys"

local imgui = require('imgui')
local act = true

local inicfg = require 'inicfg'
local directIni = 'sbiv.ini'
local ini = inicfg.load(inicfg.load({
    act = {
        act = true,
    },
}, directIni))

inicfg.save(ini, directIni)
local waitfrom = imgui.ImInt(ini.act1)
local window = imgui.ImBool(false)

function main()
    if not isSampLoaded() or not isSampfuncsLoaded() then return end
      while not isSampAvailable() do wait(100) end
      sampRegisterChatCommand("onsbiv", function() act.v = true
        printStringNow(string.format("~p~ SBIV - %s", "activated"), 1000)
      end)
      sampRegisterChatCommand("offsbiv", function() act.v = false
        printStringNow(string.format("~p~ SBIV - %s", "deactivated"), 1000)
      end)
      while true do
      wait(0)

    if act.v == true then
    if isKeyJustPressed(VK_1) and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() and not isSampfuncsConsoleActive() then sampSendChat("/usedrugs 3") wait(10) sampSendChat(" ") end

    if isKeyJustPressed(VK_2) and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() and not isSampfuncsConsoleActive() then sampSendChat("/usemed") wait(10) sampSendChat(" ") end
   
    else
   
    if isKeyJustPressed(VK_1) and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() and not isSampfuncsConsoleActive() then sampSendChat("/usedrugs 3") wait(10) end

    if isKeyJustPressed(VK_2) and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() and not isSampfuncsConsoleActive() then sampSendChat("/usemed") wait(10) end end

    if isKeyJustPressed(VK_L) and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() and not isSampfuncsConsoleActive() then sampSendChat("/lock") end

    if isKeyJustPressed(VK_CAPITAL) and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() and not isSampfuncsConsoleActive() then sampSendChat("/anims 1") wait(10) setVirtualKeyDown(VK_RETURN, true) wait(600) setVirtualKeyDown(VK_RETURN, false) end

end
end

function save()
    ini.act = act.v
    inicfg.save(ini, directIni)
end

[09:38:29.844463] (error) BindKey_0.1: C:\Games\GTA San Andreas\moonloader\BindKey.lua:19: sol: no matching function call takes this number of arguments and the specified types
stack traceback:
[C]: in function 'ImInt'
C:\Games\GTA San Andreas\moonloader\BindKey.lua:19: in main chunk
 

umeHHo oH

Активный
Автор темы
162
25

Вложения

  • BindKey.lua
    2 KB · Просмотры: 3