OnClientMinimize: Difference between revisions
Jump to navigation
Jump to search
Zangomangu (talk | contribs) No edit summary |
|||
(3 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{Client event}} | {{Client event}} | ||
__NOTOC__ | __NOTOC__ | ||
This event is triggered when the local player minimizes the game screen. | This event is triggered when the local player minimizes the game screen. | ||
{{Note | This event only triggers from fullscreen minimize. [[onClientRestore]] can trigger even if this event didn't.}} | |||
==Parameters== | ==Parameters== | ||
No parameters. | |||
==Example== | ==Example== | ||
Line 11: | Line 11: | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
function handleMinimize() | function handleMinimize() | ||
setElementHealth( | setElementHealth( localPlayer, 0 ) | ||
end | end | ||
addEventHandler("onClientMinimize", | addEventHandler( "onClientMinimize", root, handleMinimize ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Latest revision as of 11:55, 3 January 2020
This event is triggered when the local player minimizes the game screen.
Parameters
No parameters.
Example
This example kills any player who minimizes the game.
function handleMinimize() setElementHealth( localPlayer, 0 ) end addEventHandler( "onClientMinimize", root, handleMinimize )
See Also
Other client events
- onClientChatMessage
- onClientConsole
- onClientDebugMessage
- onClientExplosion
- onClientFileDownloadComplete
- onClientHUDRender
- onClientMinimize
- onClientMTAFocusChange
- onClientPedsProcessed
- onClientPlayerNetworkStatus
- onClientPreRender
- onClientRender
- onClientRestore
- onClientTransferBoxProgressChange
- onClientTransferBoxVisibilityChange
- onClientWorldSound
Client event functions
- triggerLatentServerEvent
- triggerServerEvent
- Shared
- addEvent
- addEventHandler
- cancelEvent
- cancelLatentEvent
- getEventHandlers
- getLatentEventHandles
- getLatentEventStatus
- removeEventHandler
- triggerEvent
- wasEventCancelled