Помогите со скриптом

h0los

Активный
Автор темы
219
36
Версия SA-MP
  1. 0.3.7-R3
  2. 0.3.7-R4
Скрипт крашит из за кфг помогите может я что то напарталчил.
[ML] (system) arizona-hud-stamina.lua: Script terminated. (1970B00C)
[ML] (system) ARZ_Helper.lua: Script terminated. (1970A9EC)
[ML] (system) AutoAccent.lua: Script terminated. (1970B31C)
[ML] (system) ML-AutoReboot: Script terminated. (1970B4A4)
[ML] (system) TimeOnScreen: Script terminated. (7D72AC84)
[ML] (system) Government Helper: Script terminated. (7D72AF94)
[ML] (system) Police Helper Manager: Script terminated. (7D72BD5C)
[ML] (system) quickcmd.lua: Script terminated. (7D72B2A4)
[ML] (system) RadarID by chapo: Script terminated. (7D72BEE4)
[ML] (system) ML-ReloadAll: Script terminated. (7D72AE0C)
[ML] (system) SF Integration: Script terminated. (7D72C68C)
[ML] (system) Ó ìåíÿ íà êëàâå íåò øèôòà è òî÷êè.lua: Script terminated. (7D72C37C)
[ML] (system) Police Helper Reborn: Script terminated. (7D72B73C)
[ML] (system) Loading script 'D:\arizona\Arizona Games Launcher\bin\arizona\moonloader\arizona-hud-stamina.lua'...
[ML] (system) arizona-hud-stamina.lua: Loaded successfully.
[ML] (system) Loading script 'D:\arizona\Arizona Games Launcher\bin\arizona\moonloader\ARZ_Helper.lua'...
[ML] (system) ARZ_Helper.lua: Loaded successfully.
[ML] (system) Loading script 'D:\arizona\Arizona Games Launcher\bin\arizona\moonloader\asp.lua'...
[ML] (system) asp.lua: Loaded successfully.
[ML] (system) Loading script 'D:\arizona\Arizona Games Launcher\bin\arizona\moonloader\AutoAccent.lua'...
[ML] (system) AutoAccent.lua: Loaded successfully.
[ML] (system) Loading script 'D:\arizona\Arizona Games Launcher\bin\arizona\moonloader\AutoReboot.lua'...
[ML] (system) ML-AutoReboot: Loaded successfully.
[ML] (system) Loading script 'D:\arizona\Arizona Games Launcher\bin\arizona\moonloader\cTime.lua'...
[ML] (system) TimeOnScreen: Loaded successfully.
[ML] (system) Loading script 'D:\arizona\Arizona Games Launcher\bin\arizona\moonloader\Government Helper (modifed).lua'...
[ML] (system) Government Helper: Loaded successfully.
[ML] (system) Loading script 'D:\arizona\Arizona Games Launcher\bin\arizona\moonloader\HelperNomerov.lua'...
[ML] (error) HelperNomerov.lua: ... Games Launcher\bin\arizona\moonloader\HelperNomerov.lua:11: attempt to perform arithmetic on global 'vklnomh' (a nil value)
stack traceback:
... Games Launcher\bin\arizona\moonloader\HelperNomerov.lua:11: in main chunk
[ML] (error) HelperNomerov.lua: Script died due to an error. (2D54DFFC)
[ML] (system) Loading script 'D:\arizona\Arizona Games Launcher\bin\arizona\moonloader\keyboard.lua'...
[ML] (error) KeyBoard: ...izona Games Launcher\bin\arizona\moonloader\keyboard.lua:822: attempt to call a nil value
stack traceback:
...izona Games Launcher\bin\arizona\moonloader\keyboard.lua:822: in main chunk
[ML] (error) KeyBoard: Script died due to an error. (2D54DFFC)
[ML] (system) Loading script 'D:\arizona\Arizona Games Launcher\bin\arizona\moonloader\Police Helper Reborn.luac'...
[ML] (system) Police Helper Manager: Loaded successfully.
[ML] (system) Loading script 'D:\arizona\Arizona Games Launcher\bin\arizona\moonloader\quickcmd.lua'...
[ML] (system) quickcmd.lua: Loaded successfully.
[ML] (system) Loading script 'D:\arizona\Arizona Games Launcher\bin\arizona\moonloader\RadarID by chapo.lua'...
[ML] (system) RadarID by chapo: Loaded successfully.
[ML] (system) Loading script 'D:\arizona\Arizona Games Launcher\bin\arizona\moonloader\reload_all.lua'...
[ML] (system) ML-ReloadAll: Loaded successfully.
[ML] (system) Loading script 'D:\arizona\Arizona Games Launcher\bin\arizona\moonloader\SF Integration.lua'...
[ML] (system) SF Integration: Loaded successfully.
[ML] (system) Loading script 'D:\arizona\Arizona Games Launcher\bin\arizona\moonloader\Ó ìåíÿ íà êëàâå íåò øèôòà è òî÷êè.lua'...
[ML] (system) Ó ìåíÿ íà êëàâå íåò øèôòà è òî÷êè.lua: Loaded successfully.
Government-Helper: Ïðîâåðÿþ àêòóàëüíîñòü ôàéëîâ èãðû!
[ML] (system) asp.lua: Script terminated. (2D54C77C)
[ML] (script) Police Helper Manager: Compatibility test passed.
[ML] (script) Police Helper Manager: Installed manager version: 5 | 1.1.1b
[ML] (script) Police Helper Manager: Reborn core build type: Stable
[ML] (system) Loading script 'D:\arizona\Arizona Games Launcher\bin\arizona\moonloader\Police Helper Reborn\Police Helper Reborn.luac'...
[ML] (script) Police Helper Reborn: [mimgui] Warning! Overwriting existing key "InputText"!
[ML] (system) Police Helper Reborn: Loaded successfully.
[ML] (script) Police Helper Manager: Reborn core version: 84 | 1.2.8
[ML] (script) Police Helper Manager: Checking for updates...
Government-Helper: Ññûëêà íà òåìó BlastHack: https://www.blast.hk/threads/98005/
Government-Helper: Ïîäãîòîâêà ê çàïóñêó...
Government-Helper: Ñêðèïò ãîòîâ ê ðàáîòå!
[ML] (script) ARZ_Helper.lua: v16: Íå ìîãó ïðîâåðèòü îáíîâëåíèå. Ñìèðèòåñü èëè ïðîâåðüòå ñàìîñòîÿòåëüíî íà https://www.dropbox.com/s/jt5k96otghj3b5g/ARZ_Helper.lua?dl=1
[ML] (script) Police Helper Manager: Manager done his work. Unloading...
require "lib.moonloader"
local vkeys = require "vkeys"
local rkeys = require "rkeys"
local imgui = require "imgui"
local inicfg = require 'inicfg'
local mainIni = inicfg.load({
config =
{
vklnomh - true,
text_buffer_name - " "
}
}, "HelperNomerov")
local vklnomh = imgui.ImBool(mainIni.config.vklnomh)
local status = inicfg.load(mainIni, 'HelperNomerov.ini')
if not doesFileExist('moonloader/config/HelperNomerov.ini') then inicfg.save(mainIni, 'HelperNomerov.ini') end
local main_window_state = imgui.ImBool(false)
local text_buffer_name = imgui.ImBuffer(''..mainIni.config.text_buffer_name, 500)
function imgui.OnDrawFrame()
imgui.ShowCursor = main_window_state.v
if main_window_state.v then
imgui.SetNextWindowSize(imgui.ImVec2(700, 450), imgui.Cond.FirstUseEver)
imgui.Begin("HelperNomerov", main_window_state, imgui.WindowFlags.NoResize)
imgui.Text("Привет друг! Давай познакомимся в этом хелпере!")
imgui.InputText('Как тебя зовут?', text_buffer_name)
imgui.Separator()
imgui.Text("Все базовые настройки:")
if imgui.Checkbox("Включить сам скрипт", vklnomh) then
imgui.Text("Скрипт включен")
end
imgui.Separator()
imgui.SetCursorPosX((imgui.GetWindowWidth()-imgui.CalcTextSize('by Hol0s').x)/2)
imgui.TextDisabled('by Hol0s')
imgui.End()
end
end
function main()
sampRegisterChatCommand("nomh", cmd_nomh)
sampAddChatMessage("{F0E68C}[HelperNomerov]{FFFFFF}Скрипт запущен! /nomh")
sampAddChatMessage("{F0E68C}[HelperNomerov]{FFFFFF}Создатель скрипта Holos! /nomh")
imgui.Process = true
while true do
wait(0)
end
end
function cmd_nomh()
main_window_state.v = not main_window_state.v
imgui.Process = main_window_state.v
end


function BH_theme()
imgui.SwitchContext()
local style = imgui.GetStyle()
local colors = style.Colors
local clr = imgui.Col
local ImVec4 = imgui.ImVec4
local ImVec2 = imgui.ImVec2

style.WindowPadding = ImVec2(6, 4)
style.WindowRounding = 5.0
style.ChildWindowRounding = 5.0
style.FramePadding = ImVec2(5, 2)
style.FrameRounding = 5.0
style.ItemSpacing = ImVec2(7, 5)
style.ItemInnerSpacing = ImVec2(1, 1)
style.TouchExtraPadding = ImVec2(0, 0)
style.IndentSpacing = 6.0
style.ScrollbarSize = 12.0
style.ScrollbarRounding = 5.0
style.GrabMinSize = 20.0
style.GrabRounding = 2.0
style.WindowTitleAlign = ImVec2(0.5, 0.5)
colors[clr.Text] = ImVec4(1.00, 1.00, 1.00, 1.00)
colors[clr.TextDisabled] = ImVec4(0.28, 0.30, 0.35, 1.00)
colors[clr.WindowBg] = ImVec4(0.16, 0.18, 0.22, 1.00)
colors[clr.ChildWindowBg] = ImVec4(0.19, 0.22, 0.26, 1)
colors[clr.PopupBg] = ImVec4(0.05, 0.05, 0.10, 0.90)
colors[clr.Border] = ImVec4(0.19, 0.22, 0.26, 1.00)
colors[clr.BorderShadow] = ImVec4(0.00, 0.00, 0.00, 0.00)
colors[clr.FrameBg] = ImVec4(0.19, 0.22, 0.26, 1.00)
colors[clr.FrameBgHovered] = ImVec4(0.22, 0.25, 0.30, 1.00)
colors[clr.FrameBgActive] = ImVec4(0.22, 0.25, 0.29, 1.00)
colors[clr.TitleBg] = ImVec4(0.19, 0.22, 0.26, 1.00)
colors[clr.TitleBgActive] = ImVec4(0.19, 0.22, 0.26, 1.00)
colors[clr.TitleBgCollapsed] = ImVec4(0.19, 0.22, 0.26, 0.59)
colors[clr.MenuBarBg] = ImVec4(0.19, 0.22, 0.26, 1.00)
colors[clr.ScrollbarBg] = ImVec4(0.20, 0.25, 0.30, 0.60)
colors[clr.ScrollbarGrab] = ImVec4(0.41, 0.55, 0.78, 1.00)
colors[clr.ScrollbarGrabHovered] = ImVec4(0.49, 0.63, 0.86, 1.00)
colors[clr.ScrollbarGrabActive] = ImVec4(0.49, 0.63, 0.86, 1.00)
colors[clr.ComboBg] = ImVec4(0.20, 0.20, 0.20, 0.99)
colors[clr.CheckMark] = ImVec4(0.90, 0.90, 0.90, 0.50)
colors[clr.SliderGrab] = ImVec4(1.00, 1.00, 1.00, 0.30)
colors[clr.SliderGrabActive] = ImVec4(0.80, 0.50, 0.50, 1.00)
colors[clr.Button] = ImVec4(0.41, 0.55, 0.78, 1.00)
colors[clr.ButtonHovered] = ImVec4(0.49, 0.62, 0.85, 1.00)
colors[clr.ButtonActive] = ImVec4(0.49, 0.62, 0.85, 1.00)
colors[clr.Header] = ImVec4(0.19, 0.22, 0.26, 1.00)
colors[clr.HeaderHovered] = ImVec4(0.22, 0.24, 0.28, 1.00)
colors[clr.HeaderActive] = ImVec4(0.22, 0.24, 0.28, 1.00)
colors[clr.Separator] = ImVec4(0.41, 0.55, 0.78, 1.00)
colors[clr.SeparatorHovered] = ImVec4(0.41, 0.55, 0.78, 1.00)
colors[clr.SeparatorActive] = ImVec4(0.41, 0.55, 0.78, 1.00)
colors[clr.ResizeGrip] = ImVec4(0.41, 0.55, 0.78, 1.00)
colors[clr.ResizeGripHovered] = ImVec4(0.49, 0.61, 0.83, 1.00)
colors[clr.ResizeGripActive] = ImVec4(0.49, 0.62, 0.83, 1.00)
colors[clr.CloseButton] = ImVec4(0.41, 0.55, 0.78, 1.00)
colors[clr.CloseButtonHovered] = ImVec4(0.50, 0.63, 0.84, 1.00)
colors[clr.CloseButtonActive] = ImVec4(0.41, 0.55, 0.78, 1.00)
colors[clr.PlotLines] = ImVec4(1.00, 1.00, 1.00, 1.00)
colors[clr.PlotLinesHovered] = ImVec4(0.90, 0.70, 0.00, 1.00)
colors[clr.PlotHistogram] = ImVec4(0.90, 0.70, 0.00, 1.00)
colors[clr.PlotHistogramHovered] = ImVec4(1.00, 0.60, 0.00, 1.00)
colors[clr.TextSelectedBg] = ImVec4(0.41, 0.55, 0.78, 1.00)
colors[clr.ModalWindowDarkening] = ImVec4(0.16, 0.18, 0.22, 0.76)
end
BH_theme()
За ранее спасибо
 

Hinаta

Известный
778
362
local mainIni = inicfg.load({
config =
{
vklnomh - false,
text_buffer_name - " "
}
}, "HelperNomerov")
а, ну... какого хуя там минусы вместо =?
1699182048128.png
 

h0los

Активный
Автор темы
219
36
а, ну... какого хуя там минусы вместо =?
Посмотреть вложение 220200
ебать заработало спасибо добрый человек

а, ну... какого хуя там минусы вместо =?
Посмотреть вложение 220200
зашел в игру после сохранения кфг ничего не сохранилось помоги пж
 
Последнее редактирование:

Hinаta

Известный
778
362
ничего не сохранилось
а должно было? ты сохранение не сделал
Lua:
require "lib.moonloader"
local vkeys = require "vkeys"
local rkeys = require "rkeys"
local imgui = require "imgui"
local inicfg = require 'inicfg'
local IniFilename = "HelperNomerov.ini"
local encoding = require('encoding')
local u8 = encoding.UTF8
encoding.default = 'CP1251'

local ini = inicfg.load({
    config =
    {
        vklnomh = true,
        text_buffer_name = " "
    }
}, IniFilename)

local vklnomh = imgui.ImBool(ini.config.vklnomh)

local main_window_state = imgui.ImBool(false)
local text_buffer_name = imgui.ImBuffer('' .. ini.config.text_buffer_name, 500)
function imgui.OnDrawFrame()
    imgui.ShowCursor = main_window_state.v
    if main_window_state.v then
        imgui.SetNextWindowSize(imgui.ImVec2(700, 450), imgui.Cond.FirstUseEver)
        imgui.Begin("HelperNomerov", main_window_state, imgui.WindowFlags.NoResize)
        imgui.Text(u8 "Привет друг! Давай познакомимся в этом хелпере!")
        if imgui.InputText(u8 'Как тебя зовут?', text_buffer_name) then
            ini.config.text_buffer_name = text_buffer_name.v
            inicfg.save(ini, IniFilename)
        end
        imgui.Separator()
        imgui.Text(u8 "Все базовые настройки:")
        if imgui.Checkbox(u8 "Включить сам скрипт", vklnomh) then
            ini.config.vklnomh = vklnomh.v
            inicfg.save(ini, IniFilename)
        end
        imgui.Text(u8("Скрипт " .. (vklnomh.v and 'включен' or 'выключен')))
        imgui.Separator()
        imgui.SetCursorPosX((imgui.GetWindowWidth() - imgui.CalcTextSize('by Hol0s').x) / 2)
        imgui.TextDisabled('by Hol0s')
        imgui.End()
    end
end

function main()
    repeat wait(0) until isSampAvailable()
    if not doesFileExist('moonloader/config/HelperNomerov.ini') then inicfg.save(ini, 'HelperNomerov.ini') end
    sampRegisterChatCommand("nomh", function()
        main_window_state.v = not main_window_state.v
        imgui.Process = main_window_state.v
    end)
    sampAddChatMessage("{F0E68C}[HelperNomerov]{FFFFFF}Скрипт запущен! /nomh")
    sampAddChatMessage("{F0E68C}[HelperNomerov]{FFFFFF}Создатель скрипта Holos! /nomh")
    imgui.Process = true
    wait(-1)
end

function BH_theme()
    imgui.SwitchContext()
    local style = imgui.GetStyle()
    local colors = style.Colors
    local clr = imgui.Col
    local ImVec4 = imgui.ImVec4
    local ImVec2 = imgui.ImVec2

    style.WindowPadding = ImVec2(6, 4)
    style.WindowRounding = 5.0
    style.ChildWindowRounding = 5.0
    style.FramePadding = ImVec2(5, 2)
    style.FrameRounding = 5.0
    style.ItemSpacing = ImVec2(7, 5)
    style.ItemInnerSpacing = ImVec2(1, 1)
    style.TouchExtraPadding = ImVec2(0, 0)
    style.IndentSpacing = 6.0
    style.ScrollbarSize = 12.0
    style.ScrollbarRounding = 5.0
    style.GrabMinSize = 20.0
    style.GrabRounding = 2.0
    style.WindowTitleAlign = ImVec2(0.5, 0.5)
    colors[clr.Text] = ImVec4(1.00, 1.00, 1.00, 1.00)
    colors[clr.TextDisabled] = ImVec4(0.28, 0.30, 0.35, 1.00)
    colors[clr.WindowBg] = ImVec4(0.16, 0.18, 0.22, 1.00)
    colors[clr.ChildWindowBg] = ImVec4(0.19, 0.22, 0.26, 1)
    colors[clr.PopupBg] = ImVec4(0.05, 0.05, 0.10, 0.90)
    colors[clr.Border] = ImVec4(0.19, 0.22, 0.26, 1.00)
    colors[clr.BorderShadow] = ImVec4(0.00, 0.00, 0.00, 0.00)
    colors[clr.FrameBg] = ImVec4(0.19, 0.22, 0.26, 1.00)
    colors[clr.FrameBgHovered] = ImVec4(0.22, 0.25, 0.30, 1.00)
    colors[clr.FrameBgActive] = ImVec4(0.22, 0.25, 0.29, 1.00)
    colors[clr.TitleBg] = ImVec4(0.19, 0.22, 0.26, 1.00)
    colors[clr.TitleBgActive] = ImVec4(0.19, 0.22, 0.26, 1.00)
    colors[clr.TitleBgCollapsed] = ImVec4(0.19, 0.22, 0.26, 0.59)
    colors[clr.MenuBarBg] = ImVec4(0.19, 0.22, 0.26, 1.00)
    colors[clr.ScrollbarBg] = ImVec4(0.20, 0.25, 0.30, 0.60)
    colors[clr.ScrollbarGrab] = ImVec4(0.41, 0.55, 0.78, 1.00)
    colors[clr.ScrollbarGrabHovered] = ImVec4(0.49, 0.63, 0.86, 1.00)
    colors[clr.ScrollbarGrabActive] = ImVec4(0.49, 0.63, 0.86, 1.00)
    colors[clr.ComboBg] = ImVec4(0.20, 0.20, 0.20, 0.99)
    colors[clr.CheckMark] = ImVec4(0.90, 0.90, 0.90, 0.50)
    colors[clr.SliderGrab] = ImVec4(1.00, 1.00, 1.00, 0.30)
    colors[clr.SliderGrabActive] = ImVec4(0.80, 0.50, 0.50, 1.00)
    colors[clr.Button] = ImVec4(0.41, 0.55, 0.78, 1.00)
    colors[clr.ButtonHovered] = ImVec4(0.49, 0.62, 0.85, 1.00)
    colors[clr.ButtonActive] = ImVec4(0.49, 0.62, 0.85, 1.00)
    colors[clr.Header] = ImVec4(0.19, 0.22, 0.26, 1.00)
    colors[clr.HeaderHovered] = ImVec4(0.22, 0.24, 0.28, 1.00)
    colors[clr.HeaderActive] = ImVec4(0.22, 0.24, 0.28, 1.00)
    colors[clr.Separator] = ImVec4(0.41, 0.55, 0.78, 1.00)
    colors[clr.SeparatorHovered] = ImVec4(0.41, 0.55, 0.78, 1.00)
    colors[clr.SeparatorActive] = ImVec4(0.41, 0.55, 0.78, 1.00)
    colors[clr.ResizeGrip] = ImVec4(0.41, 0.55, 0.78, 1.00)
    colors[clr.ResizeGripHovered] = ImVec4(0.49, 0.61, 0.83, 1.00)
    colors[clr.ResizeGripActive] = ImVec4(0.49, 0.62, 0.83, 1.00)
    colors[clr.CloseButton] = ImVec4(0.41, 0.55, 0.78, 1.00)
    colors[clr.CloseButtonHovered] = ImVec4(0.50, 0.63, 0.84, 1.00)
    colors[clr.CloseButtonActive] = ImVec4(0.41, 0.55, 0.78, 1.00)
    colors[clr.PlotLines] = ImVec4(1.00, 1.00, 1.00, 1.00)
    colors[clr.PlotLinesHovered] = ImVec4(0.90, 0.70, 0.00, 1.00)
    colors[clr.PlotHistogram] = ImVec4(0.90, 0.70, 0.00, 1.00)
    colors[clr.PlotHistogramHovered] = ImVec4(1.00, 0.60, 0.00, 1.00)
    colors[clr.TextSelectedBg] = ImVec4(0.41, 0.55, 0.78, 1.00)
    colors[clr.ModalWindowDarkening] = ImVec4(0.16, 0.18, 0.22, 0.76)
end

BH_theme()