onClientBrowserTooltip | Multi Theft Auto: Wiki Skip to content

onClientBrowserTooltip

Client-side
Server-side
Shared

The event is triggered when the user hovers a tooltip.

Parameters

string text
  • text: string containing the tooltip text. Empty string if user is not longer hovering.

Source

element: The webbrowser element.

Code Examples

client

If the user hovers the Google search input field 'Tooltip-Text: Search' will be printed in the chatbox.

local browser = guiCreateBrowser(0, 0, 800, 600, false, false, false)
local theBrowser = guiGetBrowser(browser)
showCursor(true)
addEventHandler( "onClientBrowserCreated", theBrowser, function()
loadBrowserURL(source, "https://www.google.com/?ncr&hl=en")
end)
addEventHandler("onClientBrowserTooltip", root, function(text)
if (text ~= "") then
outputChatBox("Tooltip-Text: "..text)
else
outputChatBox("You are not longer hovering a tooltip")
end
end)