IsTransferBoxVisible: Difference between revisions
Jump to navigation
Jump to search
(Created page with "__NOTOC__ {{Server client function}} {{New feature/item|3.0160|1.5.8|20788|Determines if the transfer box should be visible.}} ==Syntax== <syntaxhighlight lang="lua"> bool is...") |
No edit summary |
||
(5 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Server client function}} | {{Server client function}} | ||
{{ | {{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. | ||
== | ==Example== | ||
<section name="Client" class="client" show="true"> | |||
This example defines a command to remove the player's transfer box. | |||
<syntaxhighlight lang="lua"> | |||
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> | |||
==Requirements== | ==Requirements== | ||
{{Requirements|1.5.8-9.20788|1.5.8-9.20788|}} | {{Requirements|1.5.8-9.20788|1.5.8-9.20788|}} | ||
==See Also== | |||
{{Server_functions}} |
Latest revision as of 21:32, 23 September 2021
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 [-]
ClientThis 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)
Requirements
Minimum server version | 1.5.8-9.20788 |
---|---|
Minimum client version | 1.5.8-9.20788 |
Note: Using this feature requires the resource to have the above minimum version declared in the meta.xml <min_mta_version> section. e.g. <min_mta_version server="1.5.8-9.20788" client="1.5.8-9.20788" />
See Also
- getFPSLimit
- getMaxPlayers
- getServerHttpPort
- getServerName
- getServerPassword
- getServerPort
- getVersion
- isGlitchEnabled
- isTransferBoxAlwaysVisible
- isTransferBoxVisible
- setFPSLimit
- setGlitchEnabled
- setMaxPlayers
- setServerPassword
- setTransferBoxVisible
- shutdown