-- onServerMessage
if text:match("^{......}%a+_%a+%[%d+%]: {......}(%d+)$") then
pnumber = text:match("^{......}%a+_%a+%[%d+%]: {......}(%d+)$")
phone_window_state.v = not phone_window_state.v
end
-- OnDrawFrame
if phone_window_state.v then
local input = sampGetInputInfoPtr()
local input = getStructElement(input, 0x8, 4)
local windowPosX = getStructElement(input, 0x8, 4)
local windowPosY = getStructElement(input, 0xC, 4)
imgui.SetNextWindowPos(imgui.ImVec2(windowPosX, windowPosY + 30 + 15), imgui.Cond.FirstUseEver)
imgui.SetNextWindowSize(imgui.ImVec2(result:len()*10, 30))
imgui.Begin('Number', phone_window_state, imgui.WindowFlags.NoTitleBar + imgui.WindowFlags.NoResize + imgui.WindowFlags.NoMove)
imgui.CenterTextColoredRGB(u8(pnumber))
imgui.End()
end