This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this addEventHandler ["killed", {_this call commy_fnc_moveOffRoad}]; | |
// init.sqf | |
commy_fnc_moveOffRoad = { | |
#define DISTANCE_TO_MOVE 10 | |
params ["_wreck"]; | |
private _road0 = roadAt _wreck; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_logic = _this select 0; | |
_units = _this select 1; | |
_activated = _this select 2; | |
if (_activated) then { | |
//--- Terminate when not created on the server | |
if (!isserver && local _logic && isnull (getassignedcuratorunit _logic)) exitwith { | |
[format ["%1 is trying to create curator logic ModuleCurator_F",profilename],"bis_fnc_error",false] call bis_fnc_mp; | |
deletevehicle _logic; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Author: Karel Moricky | |
Description: | |
Splendid arsenal viewer | |
Parameter(s): | |
0: STRING - mode | |
1: ANY - params (see below) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define NEWLINE toString [13,10] | |
private _file = "file.txt"; | |
private _delta = 0; | |
private _fnc_convert = { | |
private _result = 0; | |
private _digits = _this splitString ":"; | |
reverse _digits; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define DLC_APEX 395180 | |
commy_allTanoaMarkers = []; | |
addMissionEventHandler ["Map", { | |
params ["_isOpened"]; | |
if (_isOpened) then { | |
private _tanoaObjects = allMissionObjects "" select {getObjectDLC _x isEqualTo DLC_APEX}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commy_fnc_nearest = { | |
params ["_origin", "_objects"]; | |
private _distances = _objects apply {_x distanceSqr _origin}; | |
_objects select (_distances find selectMin _distances) | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//init.sqf | |
{ | |
_x addEventHandler ["CuratorObjectEdited", { | |
params ["", "_object"]; | |
if (!local _object) then { | |
[_object, getDir _object] remoteExec ["setDir", _object]; | |
}; | |
}]; | |
} forEach allCurators; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private _allAddons = "true" configClasses (configFile >> "CfgPatches") apply {configName _x}; | |
// existing curators (has to run on server) | |
{ | |
_x addCuratorAddons _allAddons; | |
} forEach allCurators; | |
// all future curators created via createUnit (has to run on all machines) | |
activateAddons _allAddons; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private _filter = ["NameCityCapital", "NameCity", "NameVillage"]; | |
private _names = configProperties [configFile >> "CfgWorlds" >> worldName >> "Names", "isClass _x"]; | |
// filter out all non-cities | |
_names = _names select {getText (_x >> "type") in _filter}; | |
// convert array of configs into array of classnames | |
_names = _names apply {configName _x}; | |
_names |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
My_Draw_PFH = objNull; | |
addMissionEventHandler ["MapSingleClick", { | |
if (isNull My_Draw_PFH) then { | |
params ["", "_pos"]; | |
My_Draw_PFH = [ | |
{ | |
private _pos1 = (findDisplay 12 displayCtrl 51) ctrlMapScreenToWorld getMousePosition; |