ACE3/addons/fcs/functions/fnc_reset.sqf
2015-02-14 08:09:52 +01:00

26 lines
719 B
Plaintext

/*
* Author: KoffeinFlummi
*
* Resets the FCS to default.
*
* Arguments:
* 0: Vehicle
*
* Return Value:
* none
*/
#include "script_component.hpp"
private ["_vehicle", "_turret"];
_vehicle = _this select 0;
_turret = _this select 1;
[_vehicle, format ["%1_%2", QGVAR(Distance), _turret], 0] call EFUNC(common,setVariablePublic);
[_vehicle, format ["%1_%2", QGVAR(Magazines), _turret], []] call EFUNC(common,setVariablePublic);
[_vehicle, format ["%1_%2", QGVAR(Elevation), _turret], 0] call EFUNC(common,setVariablePublic);
[_vehicle, format ["%1_%2", QGVAR(Azimuth), _turret], 0] call EFUNC(common,setVariablePublic);
[localize "STR_ACE_FCS_HasBeenReset"] call EFUNC(common,displayTextStructured);