كمل الكود !
function isMouseInPosition ( 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
--[[
x,y,w,h
= أحداثيات الدي أكس حقك
--]]
addEventHandler ("onClientClick",root, function (_,state)
if ( state == "down" ) then
if ( isMouseInPosition(x, y, w, h) ) then
-- الشيء الي تبيه من التأثيرات
end
end
end
)