HU/IsInSlot
Jump to navigation
Jump to search
Szintaxis
isInSlot(x, y, width, height)
Returns
Ha a cursor a dobozban van akkor a visszatérési érték 'igaz' különben pedig 'hamis'
írta Petrik
Code
Click to collapse [-]
Clientlocal x,y = guiGetScreenSize() function isInSlot(dX, dY, dSZ, dM) --Creating function isInSlot if isCursorShowing() then --If your cursor showing local cX ,cY = getCursorPosition() --Get your cursor position cX,cY = cX*x , cY*y --Get cursor position on the resolution if(cX >= dX and cX <= dX+dSZ and cY >= dY and cY <= dY+dM) then --If cursor in the position given return true, cX, cY --If in the position return true else return false --If not in the position return false end end end