ACE3/addons/common/functions/fnc_isPlayer.sqf
jonpas 742626ff1a
General - Relative script_component.hpp includes (#9378)
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2023-09-12 20:58:10 +02:00

23 lines
669 B
Plaintext

#include "..\script_component.hpp"
/*
* Author: bux578, commy2, akalegman
* Checks if a unit is a player / curator controlled unit.
* This now includes both local and non-local remote controlled zeus units. (Remotes from another zeus machine)
*
* Arguments:
* 0: unit to be checked <OBJECT>
* 1: exclude remote controlled units <BOOL>
*
* Return Value:
* Is unit a player? <BOOL>
*
* Example:
* [cursorTarget, false] call ace_common_fnc_isPlayer;
*
* Public: Yes
*/
params ["_unit", ["_excludeRemoteControlled", false]];
(isPlayer _unit) || {(!_excludeRemoteControlled) && {!isNull (_unit getVariable ["bis_fnc_moduleRemoteControl_owner", objNull])}}