Difference between revisions of "OnClientMinimize"

From Multi Theft Auto: Wiki
(Undo revision 26827 by MX Master (talk))
(Undo revision 26829 by X86dev (talk))
Line 11: Line 11:
 
<syntaxhighlight lang="lua">
 
<syntaxhighlight lang="lua">
 
function handleMinimize()
 
function handleMinimize()
     setElementHealth(getLocalPlayer(), 0)
+
     setElementHealth( localPlayer, 0 )
 
end
 
end
addEventHandler("onClientMinimize",getLocalPlayer(),handleMinimize)
+
addEventHandler( "onClientMinimize", root, handleMinimize )
 
</syntaxhighlight>
 
</syntaxhighlight>
  

Revision as of 13:26, 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( localPlayer, 0 )
end
addEventHandler( "onClientMinimize", root, handleMinimize )

See Also

Other client events


Client event functions