hasInterface: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(example)
No edit summary
Line 41: Line 41:
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_Multiplayer|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_Multiplayer|{{uc:{{PAGENAME}}}}]]
<!-- CONTINUE Notes -->
<dl class="command_description">
<dd class="notedate">Posted on December 21, 2014 - 14:55 (UTC)</dd>
<dt class="note">[[User:Killzone Kid|Killzone Kid]]</dt>
<dd class="note">
<code>[[if]] ([[isDedicated]]) [[then]] {
//run on dedicated server only
};
[[if]] ([[isServer]]) [[then]] {
//run on dedicated server or player host
};
[[if]] ([[hasInterface]]) [[then]] {
//run on all player clients incl. player host
};
[[if]] (![[isDedicated]]) [[then]] {
//run on all player clients incl. player host and headless clients
};
[[if]] (![[isServer]]) [[then]] {
//run on all player clients incl. headless clients but not player host
};
[[if]] (![[hasInterface]]) [[then]] {
//run on headless clients and dedicated server
};
[[if]] (![[hasInterface]] && ![[isDedicated]]) [[then]] {
//run on headless clients only
};</code>
</dd>
</dl>
<!-- DISCONTINUE Notes -->

Revision as of 16:55, 21 December 2014

Hover & click on the images for description

Description

Description:
Returns true if the computer has an interface (a real player). False for a dedicated server or for a headless client.
Groups:
Uncategorised

Syntax

Syntax:
hasInterface
Return Value:
Boolean

Examples

Example 1:
headless = !(hasInterface || isDedicated);
Example 2:
_isHC = !hasInterface && !isDedicated;

Additional Information

See also:
isDedicatedisServer

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Notes

Bottom Section

Posted on December 21, 2014 - 14:55 (UTC)
Killzone Kid
if (isDedicated) then { //run on dedicated server only }; if (isServer) then { //run on dedicated server or player host }; if (hasInterface) then { //run on all player clients incl. player host }; if (!isDedicated) then { //run on all player clients incl. player host and headless clients }; if (!isServer) then { //run on all player clients incl. headless clients but not player host }; if (!hasInterface) then { //run on headless clients and dedicated server }; if (!hasInterface && !isDedicated) then { //run on headless clients only };