ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Client events
  3. onClientMouseLeave

Event

onClientMouseLeave

The cursor left a GUI control.

Handler

addEventHandler("onClientMouseLeave", root, function(absoluteX, absoluteY) ... end)

Parameters

absoluteXint
X.
absoluteYint
Y.

Differences from MTA:SA

  • These MTA:SA parameters are not here: element enteredGUI

In MTA:SA

function(int absoluteX, int absoluteY, element enteredGUI)

Source

source is the control.

Example

local btn = guiCreateButton(20, 200, 120, 30, "Kup", false)
addEventHandler("onClientMouseLeave", btn, function()
    guiSetAlpha(btn, 0.7)
end, false)

See also