IsTransferBoxVisible: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
(Remove obsolete Requirements section)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{Server client function}}
{{Server client function}}
{{New feature/item|3.0159|1.5.8|20788|Determines if the transfer box should be visible.}}
{{Added feature/item|1.5.9|1.5.8|20788|Determines if the transfer box is visible.}}


==Syntax==
==Syntax==
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
bool isTransferBoxVisible()
bool isTransferBoxVisible ( )
</syntaxhighlight>
</syntaxhighlight>


Line 13: Line 13:
On '''client''' this returns a boolean, whether the transfer box should be visible or not at the time of invocation.
On '''client''' this returns a boolean, whether the transfer box should be visible or not at the time of invocation.


==Examples==
==Example==
{{Needs Example}}
<section name="Client" class="client" show="true">
 
This example defines a command to remove the player's transfer box.
==Requirements==
<syntaxhighlight lang="lua">
{{Requirements|1.5.8-9.20788|1.5.8-9.20788|}}
function isVisible ()
    if isTransferBoxVisible () then
        setTransferBoxVisible (false)
        outputChatBox ("* "..getPlayerName (localPlayer).." you are downloading the server!", 255, 255, 255, true)     
    end
end
addCommandHandler ("download2", isVisible)
</syntaxhighlight>
</section>


==See Also==
==See Also==
{{Shared_server_functions}}
{{Server_functions}}

Latest revision as of 17:25, 7 November 2024

Determines if the transfer box is visible.

Syntax

bool isTransferBoxVisible ( )

Returns

On server this returns a boolean, whether the transfer box should be visible during downloads or not.

On client this returns a boolean, whether the transfer box should be visible or not at the time of invocation.

Example

Click to collapse [-]
Client

This example defines a command to remove the player's transfer box.

function isVisible ()
    if isTransferBoxVisible () then 
        setTransferBoxVisible (false)
        outputChatBox ("* "..getPlayerName (localPlayer).." you are downloading the server!", 255, 255, 255, true)      
    end
end
addCommandHandler ("download2", isVisible)

See Also