Skip to content

Instantly share code, notes, and snippets.

View commy2's full-sized avatar

commy2

View GitHub Profile
if (!isServer) exitWith {};
PZG_EnableSound = true;
params ["_logic"];
private _allSounds = [
["A3\Sounds_F\environment\ambient\battlefield\battlefield_explosions1.wss", 20],
["A3\Sounds_F\environment\ambient\battlefield\battlefield_explosions2.wss", 23],
/* -------------------------------------------
Macro: NS_NULL
Description:
Returns a undefined (null) CBA namespace.
Parameters:
None
Example:
//init.sqf
My_fnc_addCustomUniform = {
params [["_unit", objNull, [objNull]], ["_uniform", "", [""]], ["_texture", "", [""]]];
_unit addUniform _uniform;
if (_texture != "") then {
_unit setObjectTextureGlobal [0, _texture];
(uniformContainer _unit) setVariable ["custom_texture", _texture, true];
// by commy2
params ["_group", "_position"];
private _index = currentWaypoint _group;
_group enableAttack false;
private _units = units _group;
private _staticWeapons = _position nearObjects ["StaticWeapon", 50] select {_x emptyPositions "gunner" > 0};
private _buildings = (_position nearObjects ["Building", 50]) apply {_x buildingPos -1} select {count _x > 0};
ID1 = player addEventHandler ["fired", {
systemChat str 1;
player removeEventHandler ["fired", ID1];
}];
player addEventHandler ["fired", {
systemChat str 2;
}];
private _e = [];
private _c = "true" configClasses (configFile >> "CfgVehicles");
{
private _ce = "true" configClasses (_x >> "DestructionEffects") apply {toLower getText (_x >> "type")} select {(_x find "\") isEqualTo -1};
_e append _ce;
_e = _e arrayIntersect _e;
} forEach _c;
_r = configFile >> "CfgWeapons" >> "ItemInfo";
_w = "true" configClasses (configFile >> "CfgWeapons");
_w = _w select {inheritsFrom (_x >> "ItemInfo") == _r} apply {configName _x};
copyToClipBoard str _w;
CBA_fnc_findLoadableWeapon = {//
params [["_unit", objNull, [objNull]], ["_magazine", "", [""]]];
_magazine = toLower _magazine;
private _weaponsMagazines = [
[primaryWeapon _unit, primaryWeaponMagazine _unit],
[handgunWeapon _unit, handgunMagazine _unit],
[secondaryWeapon _unit, secondaryWeaponMagazine _unit],
=====================================================================
== C:\Program Files (x86)\Steam\steamapps\common\Arma 3\arma3.exe
== "C:\Program Files (x86)\Steam\steamapps\common\Arma 3\arma3.exe" "-mod=C:\Program Files (x86)\Steam\steamapps\common\Arma 3\!Workshop\@CBA_A3;C:\Program Files (x86)\Steam\steamapps\common\Arma 3\!Workshop\@ace"
Original output filename: Arma3Retail_DX11
Exe timestamp: 2016/09/21 16:15:19
Current time: 2016/10/03 23:43:12
Type: Public
Build: Stable
=====================================================================
== C:\Program Files (x86)\Steam\steamapps\common\Arma 3\arma3.exe
== "C:\Program Files (x86)\Steam\steamapps\common\Arma 3\arma3.exe" -mod=
Original output filename: Arma3Retail_DX11
Exe timestamp: 2016/09/21 16:15:19
Current time: 2016/10/09 10:37:00
Type: Public
Build: Stable