IsMTAWindowActive: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
Line 13: Line 13:


==Example==  
==Example==  
<section name="Client" class="client" show="true">
This function kill a player if it comes out in the standard menu MTA
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
-- TODO
function(thePlayer)
if isMTAWindowActive() then
setElementHealth ( thePlayer, 0.0 )
end
end
</syntaxhighlight>
</syntaxhighlight>



Revision as of 10:29, 24 May 2010

This function returns whether the any system windows that take focus are active. This includes the chatbox input, console window, main menu and transferbox. To get the status of the debug view, see isDebugViewActive.

Syntax

bool isMTAWindowActive ()

Returns

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

Example

<section name="Client" class="client" show="true"> This function kill a player if it comes out in the standard menu MTA

function(thePlayer)
	if isMTAWindowActive()	then
		 setElementHealth ( thePlayer, 0.0 )
	end	 
end

See Also

General functions

Browsers

Buttons

Checkboxes

Comboboxes

Edit Boxes

Gridlists

Memos

Progressbars

Radio Buttons

Scrollbars

Scrollpanes

Static Images

Tab Panels

Tabs

Text Labels

Windows