OnClientMinimize: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "Category:Incomplete Event {{Client event}} __NOTOC__ This event is triggered when the local player minimizes the game screen. ==Example== This example kills any player who ...")
 
Line 8: Line 8:
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
function handleMinimize()
function handleMinimize()
     killPed(getLocalPlayer(),getLocalPlayer())
     setElementHealth(getLocalPlayer(), 0)
end
end
addEventHandler("onClientMinimize",getLocalPlayer(),handleMinimize)
addEventHandler("onClientMinimize",getLocalPlayer(),handleMinimize)

Revision as of 02:36, 5 August 2011

This event is triggered when the local player minimizes the game screen.

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


Client event functions