Skip to content

Instantly share code, notes, and snippets.

View simplified_ArmaWorld.sqf
private _pairs = [
[PunktEins, "wpPunkt11"],
[PunktZwei, "wpPunkt21"],
[PunktDrei, "wpPunkt22"],
[PunktVier, "wpPunkt31"],
[PunktFuenf, "wpPunkt32"],
[PunktSechs, "wpPunkt33"],
[PunktSieben, "wpPunkt34"],
[PunktAcht, "wpPunkt41"],
[PunktNeun, "wpPunkt42"],
View ArmaWorld.sqf
/*
init.sqf
Trigger: PuEiSta
*/
if (isServer) then {
0 spawn {
waitUntil {
waitUntil {
// Transition to "Blue controlled" state
View config_r_armadev.cpp
// description.ext
class CfgFunctions {
#include "CfgFunctions.hpp"
#include "KP\KPPLM\KPPLM_functions.hpp"
class SAF {
#define SAF_FNCS
#include "sushi_scripts\core\init.cpp"
#include "sushi_scripts\breach\init.cpp"
#undef SAF_FNCS
View force-single-mode-multiple_reddit.sqf
// init.sqf
["weaponMode", {
params ["_unit", "_newWeaponMode", "_oldWeaponMode"];
private _weapon = currentMuzzle _unit;
if (_newWeaponMode != "Single") then {
private _weapons = ["arifle_MX_F", "hlc_rifle_CQBR"];
private _cfgWeapons = configFile >> "CfgWeapons";
if (_weapons findIf {_weapon isKindOf [_x, _cfgWeapons]} != -1) then {
View force-single-mode_reddit.sqf
// init.sqf
["weaponMode", {
params ["_unit", "_newWeaponMode", "_oldWeaponMode"];
private _weapon = currentMuzzle _unit;
if (_weapon isKindOf ["hlc_rifle_CQBR", configFile >> "CfgWeapons"] && _newWeaponMode != "Single") then {
[_unit, _weapon, "Single"] call CBA_fnc_selectWeapon;
};
}, true] call CBA_fnc_addPlayerEventHandler;
View SQF-quantifiers.md

forAny

∃xC(x)

private _array = [1,2,3,4,5];
private _condition = {_x > 10};

_array findIf _condition != -1

"There is some X in _array such that X > 10."

View init XEH Plane@r-armadev.sqf
// init.sqf
["Plane", "InitPost", {
params ["_plane"];
if (side group driver _plane == east) then {
_plane flyInHeightASL 600;
};
}, nil, nil, true] call CBA_fnc_addClassEventHandler;
View mid mission intel.sqf
if (!isServer) exitWith {};
private _object = "Land_Ketchup_01_F" createVehicle position cameraOn;
[_object, {
params ["_object"];
_object setVariable ["RscAttributeDiaryRecord_texture", "a3\structures_f_epc\Items\Documents\Data\document_secret_01_co.paa"];
_object setVariable ["RscAttributeDiaryRecord", ["<_intelName>", localize "STR_iV_IntelText", ""]];
_object setVariable ["recipients", west];
_object call BIS_fnc_initIntelObject;
View bomber RHS debug console.sqf
if (!isServer) exitWith {};
private _dir = getDir player;
private _position = aimPos player;
_dir = _dir + 90;
private _direction = [cos _dir, sin _dir, 0];
private _fnc_carpetBomber = {
params ["_position", "_direction"];
private _distance = 1000;
View bomber CUP trigger.sqf
if (!isServer) exitWith {};
private _dir = 90;
private _position = getPosASL thisTrigger;
_dir = -_dir - 90;
private _direction = [cos _dir, sin _dir, 0];
private _fnc_carpetBomber = {
params ["_position", "_direction"];
private _distance = 3000;
You can’t perform that action at this time.