IsTransferBoxActive: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (Added example)
Line 22: Line 22:
if isTransferBoxActive() == true then
if isTransferBoxActive() == true then
setTimer(CheckTransfere,2000,1) -- Check again after 2 seconds
setTimer(CheckTransfere,2000,1) -- Check again after 2 seconds
else fadeCamera(true) end -- TransferBox isnt active, fade in camera
else fadeCamera(true) -- TransferBox isnt active, fade in camera
end
end
end
addEventHandler("onClientResourceStart",getRootElement(),OnClientResrcStart)
addEventHandler("onClientResourceStart",getRootElement(),OnClientResrcStart)

Revision as of 19:58, 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)  -- TransferBox isnt active, fade in camera
	end
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