IsTransferBoxActive: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
(→‎Example: - translated into English...)
Line 12: Line 12:


==Example==  
==Example==  
This will camera fade in, when resource transfere will be finished.
This makes the camera fade in, once all resource downloads are finished.
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
resourceRoot = getResourceRootElement(getThisResource())
resourceRoot = getResourceRootElement(getThisResource())

Revision as of 15:43, 8 February 2009

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

This makes the camera fade in, once all resource downloads are finished.

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

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