hasInterface: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "_{10,} " to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments( \("local" or "global"\))?|Effects|Multiplayer Effects( \("local" or "global"\))?|Multiplayer Exe...) |
||
Line 1: | Line 1: | ||
{{Command | {{Command | ||
| arma2oa | | arma2oa | ||
|1.63 | |1.63 | ||
|gr1 = Multiplayer | |gr1 = Multiplayer | ||
| Returns true if the computer has an interface (a real player). False for a dedicated server or for a headless client. | | Returns true if the computer has an interface (a real player). False for a dedicated server or for a headless client. | ||
| [[hasInterface]] | | [[hasInterface]] | ||
| [[Boolean]] | | [[Boolean]] | ||
|x1= <code>_isHC = !([[hasInterface]] <nowiki>||</nowiki> [[isDedicated]]);</code> | |x1= <code>_isHC = !([[hasInterface]] <nowiki>||</nowiki> [[isDedicated]]);</code> | ||
|x2= <code>_isHC = ![[hasInterface]] && ![[isDedicated]];</code> | |x2= <code>_isHC = ![[hasInterface]] && ![[isDedicated]];</code> | ||
| [[isDedicated]], [[isServer]] | | [[isDedicated]], [[isServer]] | ||
}} | }} | ||
Revision as of 00:46, 18 January 2021
Description
- Description:
- Returns true if the computer has an interface (a real player). False for a dedicated server or for a headless client.
- Groups:
- Multiplayer
Syntax
- Syntax:
- hasInterface
- Return Value:
- Boolean
Examples
- Example 1:
_isHC = !(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 };
Categories:
- Scripting Commands
- Introduced with Arma 2: Operation Arrowhead version 1.63
- Arma 2: Operation Arrowhead: New Scripting Commands
- Arma 2: Operation Arrowhead: Scripting Commands
- Command Group: Multiplayer
- Arma 2: Operation Arrowhead: New Scripting Commands List
- Arma 2: Scripting Commands
- Arma 3: Scripting Commands