sw,sh = getScreenResolution()
x,y = sampGetCurrentDialogSize()
sw/2 - x/2, sh/2 - y/2--правый верхний угол диалога
sw/2 + x/2, sh/2 + y/2--левый нижний угол диалога
local memory = require("memory")
function sampGetCurrentDialogSize()
local sampBase = getModuleHandle("samp.dll")
if sampBase ~= nil then
local CDialog = memory.getuint32(sampBase + 0x21A0B8)
local CDXUTDialog = memory.getuint32(CDialog + 0x1C)
local width = memory.read(CDXUTDialog + 0x11E, 4, true)
local height = memory.read(CDXUTDialog + 0x122, 4, true)
return width, height
end
end