OnClientMinimize: Difference between revisions
Jump to navigation
Jump to search
m (example's typo fix) |
|||
Line 11: | Line 11: | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
function handleMinimize() | function handleMinimize() | ||
setElementHealth( | setElementHealth(getLocalPlayer(), 0) | ||
end | end | ||
addEventHandler( "onClientMinimize", | addEventHandler("onClientMinimize",getLocalPlayer(),handleMinimize) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 13:25, 24 August 2011
This event is triggered when the local player minimizes the game screen.
Parameters
None
Example
This example kills any player who minimizes the game.
function handleMinimize() setElementHealth(getLocalPlayer(), 0) end addEventHandler("onClientMinimize",getLocalPlayer(),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