IsTransferBoxActive: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(New page: __NOTOC__ {{Client function}} This function returns whether the transferbox is visible or not. ==Syntax== <syntaxhighlight lang="lua"> bool isTransferBoxActive () </syntaxhighlight> ===Returns=== Returns ''tru...)
 
m (Added example)
Line 12: Line 12:


==Example==  
==Example==  
This example does...
 
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
--This line does...
function OnClientResrcStart(resourcename)
blabhalbalhb --abababa
if(resourcename==getThisResource()) then
--This line does this...
CheckTransfere()
mooo
end
end
function CheckTransfere()
if isTransferBoxActive() == true then
setTimer(CheckTransfere,2000,1) -- Check again after 2 seconds
else fadeCamera(true) end -- TransferBox isnt active, fade in camera
end
addEventHandler("onClientResourceStart",getRootElement(),OnClientResrcStart)
</syntaxhighlight>
</syntaxhighlight>



Revision as of 19:57, 16 February 2008

This function returns whether the transferbox is visible or not.

Syntax

bool isTransferBoxActive ()

Returns

Returns true if the transferbox is visible, false if not.

Example

function OnClientResrcStart(resourcename)
	if(resourcename==getThisResource()) then
		CheckTransfere()
	end
end
function CheckTransfere()
	if isTransferBoxActive() == true then
		setTimer(CheckTransfere,2000,1) -- Check again after 2 seconds
	else fadeCamera(true) end -- TransferBox isnt active, fade in camera
end
addEventHandler("onClientResourceStart",getRootElement(),OnClientResrcStart)

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