Как сделать сообщение типа как от винды?

cort

Активный
Автор темы
244
96
Версия MoonLoader
.026-beta
Как сделать сообщение типа как от винды?
 

chereshnya

Известный
1,291
615
Снимок экрана 2022-06-20 191541.png

ты имеешь ввиду такие уведомления как у меня в правом углу?
 

ARMOR

Waitin' on another black summer to end
Модератор
5,045
7,189
  • Влюблен
Реакции: chereshnya

ewin

Известный
673
372
Lua:
function ShowMessage(text, title, style)
    local messageboxathread = effil.thread(function(text, title, style)
      local ffi = require('ffi')
      ffi.cdef("int MessageBoxA( void* hWnd, const char* lpText, const char* lpCaption, unsigned int uType); ")
      ffi.C.MessageBoxA(nil, text, title, style and (style + 327680) or 327680)
    end)(text, title, style)

    lua_thread.create(function()
      while true do
        wait(0)
        local status, err = messageboxathread:status()

        if not err and status == "completed" then
          return
        end
      end
    end)
  end
 
  • Влюблен
Реакции: Fellespe.

ARMOR

Waitin' on another black summer to end
Модератор
5,045
7,189
  • Нравится
Реакции: cort

cort

Активный
Автор темы
244
96
Lua:
function ShowMessage(text, title, style)
    local messageboxathread = effil.thread(function(text, title, style)
      local ffi = require('ffi')
      ffi.cdef("int MessageBoxA( void* hWnd, const char* lpText, const char* lpCaption, unsigned int uType); ")
      ffi.C.MessageBoxA(nil, text, title, style and (style + 327680) or 327680)
    end)(text, title, style)

    lua_thread.create(function()
      while true do
        wait(0)
        local status, err = messageboxathread:status()

        if not err and status == "completed" then
          return
        end
      end
    end)
  end
Lua:
[20:12:24.396868] (error)    Leader Tools: D:\My Games\GTA bandana\moonloader\LeaderTools.lua:183: attempt to index global 'effil' (a nil value)
stack traceback:
    D:\My Games\GTA bandana\moonloader\LeaderTools.lua: in function 'ShowMessage'
    D:\My Games\GTA bandana\moonloader\LeaderTools.lua:136: in function <D:\My Games\GTA bandana\moonloader\LeaderTools.lua:120>
[20:12:24.397370] (error)    Leader Tools: Script died due to an error. (1E5C595C)
 

ARMOR

Waitin' on another black summer to end
Модератор
5,045
7,189
Lua:
[20:12:24.396868] (error)    Leader Tools: D:\My Games\GTA bandana\moonloader\LeaderTools.lua:183: attempt to index global 'effil' (a nil value)
stack traceback:
    D:\My Games\GTA bandana\moonloader\LeaderTools.lua: in function 'ShowMessage'
    D:\My Games\GTA bandana\moonloader\LeaderTools.lua:136: in function <D:\My Games\GTA bandana\moonloader\LeaderTools.lua:120>
[20:12:24.397370] (error)    Leader Tools: Script died due to an error. (1E5C595C)
Тут тебе нужно подключить effil, в способе #Northn'а не нужно, юзай его
 

ewin

Известный
673
372
Тут тебе нужно подключить effil, в способе #Northn'а не нужно, юзай его
насчет этого сниппета, там при нажатии на кнопку разворачивается игра и все процессы скрипта останавливаются пока окно активно, поэтому мой способ удобнее
 
  • Нравится
Реакции: ARMOR