onClientGUIScroll | Multi Theft Auto: Wiki Skip to content

onClientGUIScroll

Client-side
Server-side
Shared

This event is fired when a GUI scrollbar is scrolled.

Parameters

element scrolled
  • scrolled: the scrollbar element that was scrolled.

Source

element: The source of this event is the scrollbar element that got scrolled.

Code Examples

client

This example outputs a message with the new scroll position when a scrollbar is scrolled.

function onClientGUIScroll(scrollBar)
outputChatBox("The new scroll position is "..guiScrollBarGetScrollPosition(scrollBar))
end
addEventHandler("onClientGUIScroll", root, onClientGUIScroll)