как создать умный розыск для арз в окне mimgui с настройкой помогите

Arizona Mobile 3

Потрачен
Автор темы
117
12
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Версия MoonLoader
Другое
как создать умный розыск для арз в окне mimgui с настройкой помогите
 

chromiusj

C Y N T H O N I
Модератор
5,049
3,317
для начала ты должен определить цели умного розыска,как он определяет цель, на какой причине,зачем и почему
такой темой ты только делаешь вид что требуешь помощи,хотя это подходит на полноценный заказ
 

chromiusj

C Y N T H O N I
Модератор
5,049
3,317
настройка наказаний и вводишь ник нажмёшь на наказание и онр выдаёт
Lua:
local sampev = require('lib.samp.events')
local imgui = require 'mimgui'
local encoding = require 'encoding'
encoding.default = 'CP1251'
u8 = encoding.UTF8

local renderWindow = imgui.new.bool()

imgui.OnInitialize(function()
    imgui.GetIO().IniFilename = nil
end)
local punishes = {}
local newFrame = imgui.OnFrame(
    function() return renderWindow[0] end,
    function(player)
        local resX, resY = getScreenResolution()
        local sizeX, sizeY = 300, 300
        imgui.SetNextWindowPos(imgui.ImVec2(resX / 2, resY / 2), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5))
        imgui.SetNextWindowSize(imgui.ImVec2(sizeX, sizeY), imgui.Cond.FirstUseEver)
        if imgui.Begin('Main Window', renderWindow) then
            for k, v in ipairs(punishes) do
                if imgui.CollapsingHeader(u8("Дата: " .. v.date .. ", Причина: " .. v.reason)) then
                    if imgui.Button(u8'Дать леща') then
                        sampAddChatMessage('Дали леща', -1)
                    end
                    imgui.SameLine()
                    if imgui.Button(u8'Сломать колени') then
                        sampAddChatMessage('Не смогли сломать колени', -1)
                    end
                end
            end
            if #punishes < 1 then
                imgui.Text(u8'Тут пока что пусто')
            end
            
            imgui.End()
        end
    end
)

function main()
    while not isSampAvailable() do wait(0) end
    sampRegisterChatCommand('nakaz', function()
        renderWindow[0] = not renderWindow[0]
    end)
    wait(-1)
end
function sampev.onShowDialog(dialogId, style, title, button1, button2, text)
    if title:find('История наказания') then
        for line in text:gmatch("[^\r\n]+") do
            local date, situation, reason = line:match('{.-}%[(.-)%]%s(.+)%. Причина:%s(.+)')
            if date and reason then
                local punishment = {date = date, reason = reason}
                table.insert(punishes, punishment)
            end
        end
    end
end
1700326559690.png

вот такого чтоли типо?
 
  • Вау
Реакции: MrDorlik
17
1
Lua:
local sampev = require('lib.samp.events')
local imgui = require 'mimgui'
local encoding = require 'encoding'
encoding.default = 'CP1251'
u8 = encoding.UTF8

local renderWindow = imgui.new.bool()

imgui.OnInitialize(function()
    imgui.GetIO().IniFilename = nil
end)
local punishes = {}
local newFrame = imgui.OnFrame(
    function() return renderWindow[0] end,
    function(player)
        local resX, resY = getScreenResolution()
        local sizeX, sizeY = 300, 300
        imgui.SetNextWindowPos(imgui.ImVec2(resX / 2, resY / 2), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5))
        imgui.SetNextWindowSize(imgui.ImVec2(sizeX, sizeY), imgui.Cond.FirstUseEver)
        if imgui.Begin('Main Window', renderWindow) then
            for k, v in ipairs(punishes) do
                if imgui.CollapsingHeader(u8("Дата: " .. v.date .. ", Причина: " .. v.reason)) then
                    if imgui.Button(u8'Дать леща') then
                        sampAddChatMessage('Дали леща', -1)
                    end
                    imgui.SameLine()
                    if imgui.Button(u8'Сломать колени') then
                        sampAddChatMessage('Не смогли сломать колени', -1)
                    end
                end
            end
            if #punishes < 1 then
                imgui.Text(u8'Тут пока что пусто')
            end
           
            imgui.End()
        end
    end
)

function main()
    while not isSampAvailable() do wait(0) end
    sampRegisterChatCommand('nakaz', function()
        renderWindow[0] = not renderWindow[0]
    end)
    wait(-1)
end
function sampev.onShowDialog(dialogId, style, title, button1, button2, text)
    if title:find('История наказания') then
        for line in text:gmatch("[^\r\n]+") do
            local date, situation, reason = line:match('{.-}%[(.-)%]%s(.+)%. Причина:%s(.+)')
            if date and reason then
                local punishment = {date = date, reason = reason}
                table.insert(punishes, punishment)
            end
        end
    end
end
Посмотреть вложение 221552
вот такого чтоли типо?
Ты сам писал эти коды ?
 

chromiusj

C Y N T H O N I
Модератор
5,049
3,317