Не работает имгуи

degame

Новичок
Автор темы
24
2
Версия SA-MP
  1. 0.3.7 (R1)
Учусь луа скриптингу, почему то имгуи не работает, хотя скрипт нормально открывается
Скрипт:
script_name('Test')
script_author('degame')
script_description('Command')

require "lib.moonloader"
local keys = require "vkeys"
local sampev = require "lib.samp.events"
local imgui = require 'lib.imgui'
local encoding = require 'lib.encoding'
encoding.default = 'CP1251'
u8 = encoding.UTF8

local tag = '[My First Script]:'
local main_color = 0x3B39D1
local main_color_text = "{3B39D1}"
local white_color = "{FFFFFF}"

function main()
    if not isSampLoaded() or not isSampfuncsLoaded() then return end
    while not isSampAvailable() do wait(100) end
    sampAddChatMessage(tag .. ' Был успешно загружен', 0xFFFFFF)
    _, id = sampGetPlayerIdByCharHandle(PLAYER_PED)
    nick = sampGetPlayerNickname(id)
    imgui.Procces = true
    while true do
        wait(0)
    
        if isKeyJustPressed(VK_MBUTTON) then
            sampAddChatMessage("Your NickName: {FFFFFF} "..nick.."   " ..main_color_text.." Your id: {FFFFFF} " ..id,main_color)



        end
    end
end

function sampev.onSendChat(text)
    if text == "mq" then
        return {"Себе так скажи"}
    end
end

function sampev.onSendCommand(command)
    sampAddChatMessage(command, main_color)
end

function sampev.onSendPickedUpPickup(pickup)
    sampAddChatMessage(pickup, main_color)
end

function sampev.onSendEnterVehicle(vehicleid, pass)
    sampAddChatMessage(vehicleid, main_color)
    sampAddChatMessage(pass, main_color)
end

function sampev.onSendExitVehicle(vech)
    sampAddChatMessage(vech, main_color)
end

function sampev.onServerMessage(color, text)
    if string.find(text, 'Водитель трамвая', 1, true) then
        return false
    end
end

function sampev.onShowDialog(diaid, style, title, button1, button2, text)
    sampAddChatMessage(diaid,main_color)
    sampAddChatMessage(style,main_color)
    sampAddChatMessage(title,main_color)
    sampAddChatMessage(button,main_color)
    sampAddChatMessage(button2,main_color)
    sampAddChatMessage(text,main_color)
end

function cmd_imgui(arg)

end

function imgui.OnDrDrawFrame()
    imgui.Begin("Test")
    imgui.Text("Ванечка Акияма иди нахуй")
    imgui.End()
    
end

Мунлоадер лог:
Мунлоадер Лог:
SAMPFUNCS v5.4.1-final rel.21 (SA-MP 0.3.7-R1)
Compiled: Dec 24 2018 03:13:37

Copyright (c) 2013-2018, BlastHack Team <blast.hk>

Base address: 0x66950000.
Initializing opcodes...
Opcodes initialized successfully. Total opcodes: 382.
Hook "CTimer::GetRealTimeScale" installed.
Hook "CPad::Update" installed.
Hook "CCamera::RenderMotionBlur" installed.
Hook "CScriptThread::AddScriptToQueue" installed.
Hook "CScriptThread::RemoveScriptFromQueue" installed.
Hook "CScriptThread::Process" installed.
Hook "WinMainLoop" installed.
Hook "CLoadingScreen::RenderSplash" installed.
Hook "CVehicle::CVehicle" installed.
Hook "CVehicle::~CVehicle" installed.
Hook "CPed::CPed" installed.
Hook "CPed::~CPed" installed.
Initializing plugins...
SF Plugin "BotLinenCottonR1.sf" loaded.
SF Plugin "HideTextDraws.sf" loaded.
samp.dll base addres: 0x03E30000
Hook "SAMP: CNetGame::CNetGame" installed.
Hook "SAMP: CDialog::Close" installed.
Hook "SAMP: QuitGame" installed.
Hook "SAMP: CCmdWindow::ProcessInput" installed.
[ML] (system) Session started.
[ML] 
MoonLoader v.026.5-beta loaded.
[ML] Developers: FYP, hnnssy, EvgeN 1137

[ML] Copyright (c) 2016, BlastHack Team
[ML] https://www.blast.hk/moonloader/

[ML] (info) Working directory: C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader
[ML] (system) Installing pre-game hooks...
[ML] (system) Hooks installed.
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\afk.lua'...
[ML] (system) afk.lua: Loaded successfully.
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\AutoReboot.lua'...
[ML] (system) ML-AutoReboot: Loaded successfully.
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\check-moonloader-updates.lua'...
[ML] (system) Check MoonLoader Updates: Loaded successfully.
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\crackBot.luac'...
[ML] (system) crackBot.luac: Loaded successfully.
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\degame (2) — копия.lua'...
[ML] (system) AntiFlood: Loaded successfully.
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\degame (2).lua'...
[ML] (error) degame (2).lua: ...тратор\Desktop\GTA BY SAMPHACK\moonloader\degame (2).lua:62: ')' expected near '1'
[ML] (error) degame (2).lua: Script died due to an error. (0D2ED70C)
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\imgui_notf.lua'...
[ML] (system) imgui_notf.lua: Loaded successfully.
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\reload_all.lua'...
[ML] (system) ML-ReloadAll: Loaded successfully.
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\SF Integration.lua'...
[ML] (system) SF Integration: Loaded successfully.
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\[ARZ] AutoEat by LUK(1).lua'...
[ML] (system) [ARZ] AutoEat by LUK(1).lua: Loaded successfully.
[ML] (system) Installing post-load hooks...
[ML] (system) Hooks installed.
Direct3DDevice9 hook installed.
Hook "SAMP: RakPeer::HandleRPCPacket" installed.
Initializing SAMP data...
Info initialized.
Pools initialized.
Player pool initialized.
Vehicle pool initialized.
Chat initialized.
Input initialized.
Death list initialized.
Dialog initialized.
Misc data initialized.
Scoreboard initialized.
RakNet initialized.
SAMPFUNCS v5.4.1-final rel.21 (SA-MP 0.3.7-R1) completely loaded!
[loaded] - HideTextDraws | Version: 1.0 [by Artyom Ivanov]
[ML] (system) afk.lua: Script terminated. (0D2C1CC4)
[ML] (system) ML-AutoReboot: Script terminated. (0D2EC16C)
[ML] (system) Check MoonLoader Updates: Script terminated. (0D2F4144)
[ML] (system) crackBot.luac: Script terminated. (0D2F2D2C)
[ML] (system) AntiFlood: Script terminated. (0D2F53C4)
[ML] (system) imgui_notf.lua: Script terminated. (0D2ED70C)
[ML] (system) ML-ReloadAll: Script terminated. (0E397504)
[ML] (system) SF Integration: Script terminated. (0E396A4C)
[ML] (system) [ARZ] AutoEat by LUK(1).lua: Script terminated. (0E39706C)
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\afk.lua'...
[ML] (system) afk.lua: Loaded successfully.
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\AutoReboot.lua'...
[ML] (system) ML-AutoReboot: Loaded successfully.
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\check-moonloader-updates.lua'...
[ML] (system) Check MoonLoader Updates: Loaded successfully.
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\crackBot.luac'...
[ML] (system) crackBot.luac: Loaded successfully.
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\degame (2) — копия.lua'...
[ML] (system) AntiFlood: Loaded successfully.
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\degame (2).lua'...
[ML] (system) Test: Loaded successfully.
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\imgui_notf.lua'...
[ML] (system) imgui_notf.lua: Loaded successfully.
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\reload_all.lua'...
[ML] (system) ML-ReloadAll: Loaded successfully.
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\SF Integration.lua'...
[ML] (system) SF Integration: Loaded successfully.
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\[ARZ] AutoEat by LUK(1).lua'...
[ML] (system) [ARZ] AutoEat by LUK(1).lua: Loaded successfully.
[ML] (script) ML-AutoReboot: Reloading "[ARZ] AutoEat by LUK(1).lua"...
[ML] (system) [ARZ] AutoEat by LUK(1).lua: Script terminated. (1FAFB444)
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\[ARZ] AutoEat by LUK(1).lua'...
[ML] (system) [ARZ] AutoEat by LUK(1).lua: Loaded successfully.
[ML] (system) [ARZ] AutoEat by LUK(1).lua: Script terminated. (1D61C7E4)
[ML] (script) ML-AutoReboot: Reloading "Test"...
[ML] (system) Test: Script terminated. (1FAFBBEC)
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\degame (2).lua'...
[ML] (system) Test: Loaded successfully.
[ML] (system) afk.lua: Script terminated. (0E4E23FC)
[ML] (system) ML-AutoReboot: Script terminated. (0E4E20EC)
[ML] (system) Check MoonLoader Updates: Script terminated. (1FAFB134)
[ML] (system) crackBot.luac: Script terminated. (1FAFBEFC)
[ML] (system) AntiFlood: Script terminated. (1FAFBA64)
[ML] (system) imgui_notf.lua: Script terminated. (1FAFB754)
[ML] (system) ML-ReloadAll: Script terminated. (1FAFBD74)
[ML] (system) SF Integration: Script terminated. (1FAFB2BC)
[ML] (system) Test: Script terminated. (1FAFB8DC)
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\afk.lua'...
[ML] (system) afk.lua: Loaded successfully.
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\AutoReboot.lua'...
[ML] (system) ML-AutoReboot: Loaded successfully.
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\check-moonloader-updates.lua'...
[ML] (system) Check MoonLoader Updates: Loaded successfully.
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\crackBot.luac'...
[ML] (system) crackBot.luac: Loaded successfully.
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\degame (2) — копия.lua'...
[ML] (system) AntiFlood: Loaded successfully.
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\degame (2).lua'...
[ML] (system) Test: Loaded successfully.
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\imgui_notf.lua'...
[ML] (system) imgui_notf.lua: Loaded successfully.
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\reload_all.lua'...
[ML] (system) ML-ReloadAll: Loaded successfully.
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\SF Integration.lua'...
[ML] (system) SF Integration: Loaded successfully.
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\[ARZ] AutoEat by LUK(1).lua'...
[ML] (system) [ARZ] AutoEat by LUK(1).lua: Loaded successfully.
[ML] (system) [ARZ] AutoEat by LUK(1).lua: Script terminated. (0E396EE4)
[ML] (system) afk.lua: Script terminated. (0E38A2AC)
[ML] (system) ML-AutoReboot: Script terminated. (0E38A434)
[ML] (system) Check MoonLoader Updates: Script terminated. (0E38B074)
[ML] (system) crackBot.luac: Script terminated. (0E38B81C)
[ML] (system) AntiFlood: Script terminated. (0E38A744)
[ML] (system) Test: Script terminated. (0E396A4C)
[ML] (system) imgui_notf.lua: Script terminated. (0E39768C)
[ML] (system) ML-ReloadAll: Script terminated. (0E39737C)
[ML] (system) SF Integration: Script terminated. (0E39706C)
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\afk.lua'...
[ML] (system) afk.lua: Loaded successfully.
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\AutoReboot.lua'...
[ML] (system) ML-AutoReboot: Loaded successfully.
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\check-moonloader-updates.lua'...
[ML] (system) Check MoonLoader Updates: Loaded successfully.
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\crackBot.luac'...
[ML] (system) crackBot.luac: Loaded successfully.
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\degame (2) — копия.lua'...
[ML] (system) AntiFlood: Loaded successfully.
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\degame (2).lua'...
[ML] (system) Test: Loaded successfully.
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\imgui_notf.lua'...
[ML] (system) imgui_notf.lua: Loaded successfully.
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\reload_all.lua'...
[ML] (system) ML-ReloadAll: Loaded successfully.
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\SF Integration.lua'...
[ML] (system) SF Integration: Loaded successfully.
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\[ARZ] AutoEat by LUK(1).lua'...
[ML] (system) [ARZ] AutoEat by LUK(1).lua: Loaded successfully.
[ML] (system) [ARZ] AutoEat by LUK(1).lua: Script terminated. (363078F4)
[ML] (script) ML-AutoReboot: Reloading "Test"...
[ML] (system) Test: Script terminated. (1FAE5A0C)
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\degame (2).lua'...
[ML] (system) Test: Loaded successfully.
[ML] (script) ML-AutoReboot: Reloading "Test"...
[ML] (system) Test: Script terminated. (1FAE5A0C)
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\degame (2).lua'...
[ML] (system) Test: Loaded successfully.
[ML] (system) afk.lua: Script terminated. (1FAE50DC)
[ML] (system) ML-AutoReboot: Script terminated. (1FAE5884)
[ML] (system) Check MoonLoader Updates: Script terminated. (1FAE5574)
[ML] (system) crackBot.luac: Script terminated. (1FAE5EA4)
[ML] (system) AntiFlood: Script terminated. (1FAE56FC)
[ML] (system) imgui_notf.lua: Script terminated. (1FAE5264)
[ML] (system) ML-ReloadAll: Script terminated. (3630745C)
[ML] (system) SF Integration: Script terminated. (3630776C)
[ML] (system) Test: Script terminated. (0E39706C)
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\afk.lua'...
[ML] (system) afk.lua: Loaded successfully.
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\AutoReboot.lua'...
[ML] (system) ML-AutoReboot: Loaded successfully.
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\check-moonloader-updates.lua'...
[ML] (system) Check MoonLoader Updates: Loaded successfully.
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\crackBot.luac'...
[ML] (system) crackBot.luac: Loaded successfully.
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\degame (2) — копия.lua'...
[ML] (system) AntiFlood: Loaded successfully.
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\degame (2).lua'...
[ML] (system) Test: Loaded successfully.
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\imgui_notf.lua'...
[ML] (system) imgui_notf.lua: Loaded successfully.
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\reload_all.lua'...
[ML] (system) ML-ReloadAll: Loaded successfully.
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\SF Integration.lua'...
[ML] (system) SF Integration: Loaded successfully.
[ML] (system) Loading script 'C:\Users\Администратор\Desktop\GTA BY SAMPHACK\moonloader\[ARZ] AutoEat by LUK(1).lua'...
[ML] (system) [ARZ] AutoEat by LUK(1).lua: Loaded successfully.
[ML] (system) [ARZ] AutoEat by LUK(1).lua: Script terminated. (1FAE5D1C)
 

Sidney31

Известный
1,124
385
Не указываешь координаты и размеры имгуи окна.
Перед бегином
Lua:
imgui.SetNextWindowPos(imgui.ImVec2(350.0, 250.0), imgui.Cond.FirstUseEver) -- координаты появления x:350, y:250
imgui.SetNextWindowSize(imgui.ImVec2(280.0, 70.0), imgui.Cond.FirstUseEver) -- размер x:280 на y:70 пикселей
 

Похожие темы

  1. Ответы
    7
    Просмотры
    2K
    Помощь
    deleted-user-224036
    D