IsMTAWindowActive

From Multi Theft Auto: Wiki

Jump to: navigation, search

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

  • Chatbox input
  • Console window
  • Main menu
  • Transferbox

To get the status of the debug view, see isDebugViewActive.

Syntax

Returns

Returns true if the focus is on the MTA window, false if it isn't.

Example

Click to collapse [-]
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

Buttons

Checkboxes

Comboboxes

Edit fields


Gridlists

Memos


Progress bars

Radio buttons

Scrollbars

Scroll panes

Static images

Tab panels

Tabs

Text labels

Windows