ACE3/addons/common/functions/fnc_isPlayer.sqf

20 lines
549 B
Plaintext
Raw Normal View History

/*
2015-06-08 10:09:49 +00:00
* Author: bux578, commy2, akalegman
* Checks if a unit is a player / curator controlled unit.
* Currently returns false for non-local remote controlled zeus units. (Remotes from another zeus machine)
*
* Arguments:
2015-09-18 19:12:40 +00:00
* 0: unit to be checked <OBJECT>
* 1: exclude remote controlled units <BOOL>
*
* Return Value:
2015-09-18 19:12:40 +00:00
* Is unit a player? <BOOL>
*
* Public: Yes
*/
2015-01-13 19:56:02 +00:00
#include "script_component.hpp"
2015-09-18 19:12:40 +00:00
params ["_unit", ["_excludeRemoteControlled", false]];
2015-06-08 10:09:49 +00:00
2015-09-19 20:27:23 +00:00
isPlayer _unit || (!_excludeRemoteControlled && {_unit == call FUNC(player)}) // return