mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
e06c6f7835
* General - Replace toLower with toLowerANSI where applicable * whoops Co-authored-by: PabstMirror <pabstmirror@gmail.com> * Update addons/repair/functions/fnc_setHitPointDamage.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Update addons/repair/dev/draw_showRepairInfo.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Update addons/tagging/XEH_preStart.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Update addons/vehicle_damage/functions/fnc_handleCookoff.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Update addons/tagging/XEH_preStart.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * comparment -> compartment * Update fnc_showHud.sqf * Update fnc_registerObjects.sqf * Update addons/common/functions/fnc_cbaSettings_settingChanged.sqf --------- Co-authored-by: PabstMirror <pabstmirror@gmail.com> Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
49 lines
1.1 KiB
Plaintext
49 lines
1.1 KiB
Plaintext
#include "..\script_component.hpp"
|
|
/*
|
|
* Author: Kingsley
|
|
* Handles the chat command usage by admin.
|
|
*
|
|
* Arguments:
|
|
* 0: Chat Text <STRING>
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* [""] call ace_fortify_fnc_handleChatCommand
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
params ["_args"];
|
|
TRACE_1("handleChatCommand",_args);
|
|
|
|
_args = _args splitString " ";
|
|
if (_args isEqualTo []) exitWith {ERROR("Bad command");};
|
|
private _command = toLowerANSI (_args select 0);
|
|
_args deleteAt 0;
|
|
|
|
switch (_command) do {
|
|
// Turns fortify mode on
|
|
case "on": {
|
|
missionNamespace setVariable [QGVAR(fortifyAllowed), true, true];
|
|
};
|
|
|
|
// Turns fortify mode off
|
|
case "off": {
|
|
missionNamespace setVariable [QGVAR(fortifyAllowed), false, true];
|
|
};
|
|
|
|
// Registers fortify presets for given side
|
|
default {
|
|
_args params [["_preset", "small"], ["_budget", "-1"]];
|
|
|
|
private _side = [_command] call FUNC(parseSide);
|
|
_budget = parseNumber _budget;
|
|
|
|
private _objects = [_preset] call FUNC(getPlaceableSet);
|
|
|
|
[QGVAR(registerObjects), [_side, _budget, _objects]] call CBA_fnc_serverEvent;
|
|
};
|
|
};
|