isMTAWindowActive | Multi Theft Auto: Wiki Skip to content

isMTAWindowActive

Client-side
Server-side
Shared

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function returns whether any system windows that take focus are active. This includes:

Note

You cannot rely on this function to get the focus state of the MTA window - use isMTAWindowFocused instead

Syntax

isMTAWindowActive ( )

Code Examples

client

This piece of script will kill a player if he has any of the above system windows open

function dontAllowAnyOpenWindow ()
if isMTAWindowActive () then
setElementHealth ( getLocalPlayer(), 0.0 )
end
end
setTimer ( dontAllowAnyOpenWindow, 50, 0 )

See Also

GUI Functions