addEvent("okno",true) addEventHandler("okno", root, function(value) if not value then return end tekst = value showCursor(true) addEventHandler("onClientRender", root, ostrzezenie) function warnClose() if isMouseIn(screenW * 0.5555, screenH * 0.5875, screenW * 0.1008, screenH * 0.0653) then -- miejsce buttona if value then removeEventHandler("onClientRender", root, ostrzezenie) end end end end)
function isMouseIn ( x, y, width, height ) if ( not isCursorShowing( ) ) then return false end local sx, sy = guiGetScreenSize ( ) local cx, cy = getCursorPosition ( ) local cx, cy = ( cx * sx ), ( cy * sy ) if ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) then return true else return false end end