ACE3/addons/common/functions/fnc_disableAI_f.sqf
2015-01-18 20:09:19 +01:00

23 lines
517 B
Plaintext

/**
* fn_disableAI_f.sqf
* @Descr: N/A
* @Author: Glowbal
*
* @Arguments: []
* @Return:
* @PublicAPI: false
*/
#include "script_component.hpp"
private ["_unit","_disable"];
_unit = [_this, 0,ObjNull,[ObjNull]] call BIS_fnc_Param;
_disable = [_this, 1,false,[false]] call BIS_fnc_Param;
if (local _unit && !(IsPlayer _unit)) then {
if (_disable) then {
_unit disableAI "Move";
_unit disableAI "TARGET";
} else {
_unit enableAI "Move";
_unit enableAI "TARGET";
};
};