hasInterface: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " {{uc:{{PAGENAME}}}}" to "") |
Lou Montana (talk | contribs) m (Text replacement - "<sqf>([^↵][^<]*↵[^<]*)<\/sqf>" to "<sqf> $1 </sqf>") |
||
(31 intermediate revisions by the same user not shown) | |||
Line 16: | Line 16: | ||
|s1= [[hasInterface]] | |s1= [[hasInterface]] | ||
|r1=[[Boolean]] | |r1= [[Boolean]] | ||
|x1= < | |x1= <sqf>_isHC = !(hasInterface || isDedicated);</sqf> | ||
|x2= < | |x2= <sqf>_isHC = !hasInterface && !isDedicated;</sqf> | ||
|seealso= [[isDedicated]] | |seealso= [[isDedicated]] [[isServer]] | ||
}} | }} | ||
Line 29: | Line 29: | ||
<dt></dt> | <dt></dt> | ||
<dd class="notedate">Posted on | <dd class="notedate">Posted on 2014-12-21 - 14:55 (UTC)</dd> | ||
<dt class="note">[[User: | <dt class="note">[[User:Killzone_Kid|Killzone_Kid]]</dt> | ||
<dd class="note"> | <dd class="note"> | ||
< | <sqf> | ||
if (isDedicated) then { | |||
//run on dedicated server only | //run on dedicated server only | ||
}; | }; | ||
if (isServer) then { | |||
//run on dedicated server or player host | //run on dedicated server or player host | ||
}; | }; | ||
if (hasInterface) then { | |||
//run on all player clients incl. player host | //run on all player clients incl. player host | ||
}; | }; | ||
if (!isDedicated) then { | |||
//run on all player clients incl. player host and headless clients | //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 | //run on all player clients incl. headless clients but not player host | ||
}; | }; | ||
if (!hasInterface) then { | |||
//run on headless clients and dedicated server | //run on headless clients and dedicated server | ||
}; | }; | ||
if (!hasInterface && !isDedicated) then { | |||
//run on headless clients only | //run on headless clients only | ||
};</ | }; | ||
</sqf> | |||
</dd> | </dd> | ||
</dl> | </dl> |
Latest revision as of 19:43, 3 September 2024
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:
- Example 2:
Additional Information
- See also:
- isDedicated isServer
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
- Posted on 2014-12-21 - 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 };