ACE3/addons/spectator/functions/fnc_updateSides.sqf
Kyle Mckay e47e18001f
Docs - Update my display name everywhere (#9330)
* Update display name in team

* Update display name everywhere

* order

https://youtu.be/VYycQTm2HrM

---------

Co-authored-by: BrettMayson <brett@mayson.io>
2023-08-17 12:02:17 +02:00

32 lines
686 B
Plaintext

#include "script_component.hpp"
/*
* Author: kymckay
* Adds or removes sides from the selection available to spectate. Local effect.
*
* Default selection is [west,east,resistance,civilian]
*
* Arguments:
* 0: Sides to add <ARRAY>
* 1: Sides to remove <ARRAY>
*
* Return Value:
* Sides available <ARRAY>
*
* Example:
* [[west], [east,civilian]] call ace_spectator_fnc_updateSides
*
* Public: Yes
*/
params [["_addSides",[],[[]]], ["_removeSides",[],[[]]]];
// Add and remove sides
_addSides append (GVAR(availableSides) - _removeSides);
// Only need array of unique sides
_addSides = _addSides arrayIntersect _addSides;
GVAR(availableSides) = _addSides;
_addSides