├── .gitignore └── Antistasi ├── tests └── test_runner.sqf ├── debug ├── fnc_init.sqf ├── cfgFunctions.hpp └── fnc_initDead.sqf ├── Scripts ├── UPSMON │ ├── COMMON │ │ ├── Core │ │ │ └── fnc │ │ │ │ ├── Nouveau document texte.txt │ │ │ │ ├── UPSMON_GetCOS.sqf │ │ │ │ ├── UPSMON_GetSIN.sqf │ │ │ │ ├── UPSMON_GetPos2D.sqf │ │ │ │ ├── UPSMON_StrLen.sqf │ │ │ │ ├── UPSMON_distancePosSqr.sqf │ │ │ │ ├── UPSMON_StrInStr.sqf │ │ │ │ ├── UPSMON_deleteDead.sqf │ │ │ │ ├── UPSMON_createsign.sqf │ │ │ │ ├── UPSMON_DeleteWP.sqf │ │ │ │ ├── UPSMON_StrToArray.sqf │ │ │ │ ├── UPSMON_getArg.sqf │ │ │ │ ├── UPSMON_setArg.sqf │ │ │ │ ├── UPSMON_SN_EHFIREDNEAR.sqf │ │ │ │ ├── UPSMON_getDirPos.sqf │ │ │ │ ├── UPSMON_Getunitsincargo.sqf │ │ │ │ ├── UPSMON_SN_EHHIT.sqf │ │ │ │ ├── UPSMON_arrayShufflePlus.sqf │ │ │ │ ├── UPSMON_Nighttime.sqf │ │ │ │ ├── UPSMON_rotpoint.sqf │ │ │ │ ├── UPSMON_randomPos.sqf │ │ │ │ └── UPSMON_StrIndex.sqf │ │ ├── unit │ │ │ └── fnc │ │ │ │ ├── UPSMON_doStop.sqf │ │ │ │ ├── UPSMON_doGetOut.sqf │ │ │ │ ├── UPSMON_dowatch.sqf │ │ │ │ ├── UPSMON_DoSurrender.sqf │ │ │ │ ├── UPSMON_cancelstop.sqf │ │ │ │ ├── UPSMON_deadbodies.sqf │ │ │ │ ├── UPSMON_movetoDriver.sqf │ │ │ │ ├── UPSMON_movetogunner.sqf │ │ │ │ ├── UPSMON_DoSmokeScreen.sqf │ │ │ │ ├── UPSMON_surrended.sqf │ │ │ │ └── UPSMON_Disableunitloop.sqf │ │ ├── vehicles │ │ │ └── fnc │ │ │ │ ├── UPSMON_UnitsGetIn.sqf │ │ │ │ ├── UPSMON_selectvehicles.sqf │ │ │ │ ├── UPSMON_GetNearestStatics.sqf │ │ │ │ ├── UPSMON_GetNearestVehicles.sqf │ │ │ │ ├── UPSMON_GetIn_NearestVehicles.sqf │ │ │ │ ├── UPSMON_Allowgetin.sqf │ │ │ │ ├── UPSMON_Emptyturret.sqf │ │ │ │ ├── UPSMON_FN_unitsInCargo.sqf │ │ │ │ ├── UPSMON_Fn_Gunnercrew.sqf │ │ │ │ ├── UPSMON_UnitsGetOut.sqf │ │ │ │ ├── UPSMON_fnc_commonTurrets.sqf │ │ │ │ └── UPSMON_EjectUnits.sqf │ │ ├── terrain │ │ │ └── Init.sqf │ │ ├── MP │ │ │ ├── init.sqf │ │ │ └── fnc │ │ │ │ └── UPSMON_fnc_setVehicleVarName.sqf │ │ ├── Cover │ │ │ └── init.sqf │ │ ├── target │ │ │ └── fnc │ │ │ │ └── UPSMON_Eniesnear.sqf │ │ ├── markerAlpha.sqf │ │ ├── Group │ │ │ └── fnc │ │ │ │ ├── UPSMON_getNearestSoldier.sqf │ │ │ │ ├── UPSMON_Cangrpmaneuver.sqf │ │ │ │ └── UPSMON_grptype.sqf │ │ ├── Params │ │ │ └── fnc │ │ │ │ ├── UPSMON_GetRespawndelay.sqf │ │ │ │ ├── UPSMON_GetRespawntime.sqf │ │ │ │ ├── UPSMON_GetParams.sqf │ │ │ │ ├── UPSMON_NOSMOKE.sqf │ │ │ │ ├── UPSMON_GetRespawnpos.sqf │ │ │ │ └── UPSMON_GetGroupspeed.sqf │ │ ├── UPSMON_closedoor.sqf │ │ ├── buildings │ │ │ └── fnc │ │ │ │ ├── UPSMON_Isroof.sqf │ │ │ │ └── UPSMON_gethighestbldpos.sqf │ │ └── Init.sqf │ ├── MODULES │ │ ├── ARTILLERY │ │ │ └── fnc │ │ │ │ ├── UPSMON_Flaretime.sqf │ │ │ │ └── UPSMON_artilleryBatteryout.sqf │ │ ├── FORTIFY │ │ │ └── Fnc │ │ │ │ └── UPSMON_movetoBuilding.sqf │ │ ├── ORDERS │ │ │ ├── UPSMON_SUPPLY │ │ │ │ ├── Init.sqf │ │ │ │ └── fnc │ │ │ │ │ └── UPSMON_GetSupplyPos.sqf │ │ │ ├── UPSMON_RELAX │ │ │ │ └── Init.sqf │ │ │ ├── UPSMON_PATROL │ │ │ │ └── Init.sqf │ │ │ ├── UPSMON_DEFEND │ │ │ │ └── Init.sqf │ │ │ ├── UPSMON_RETREAT │ │ │ │ └── Init.sqf │ │ │ ├── UPSMON_Transport │ │ │ │ └── fnc │ │ │ │ │ └── UPSMON_KeepAltitude.sqf │ │ │ ├── UPSMON_ASSAULT │ │ │ │ └── Init.sqf │ │ │ ├── UPSMON_REINFORCEMENT │ │ │ │ └── Init.sqf │ │ │ ├── UPSMON_PATROLSRCH │ │ │ │ └── Init.sqf │ │ │ └── UPSMON_FLANK │ │ │ │ └── Init.sqf │ │ ├── Init.sqf │ │ ├── AMBUSH │ │ │ └── Init.sqf │ │ └── UPSMON_ModifyUcthis.sqf │ └── Get_pos │ │ ├── UPSMON_pos_fnc_getpos.sqf │ │ ├── UPSMON_pos_fnc_issameposition.sqf │ │ ├── UPSMON_pos_fnc_rotateposition.sqf │ │ ├── UPSMON_pos_fnc_findclosestposition.sqf │ │ ├── UPSMON_pos_fnc_getmarkershape.sqf │ │ ├── UPSMON_pos_fnc_getposfromcircle.sqf │ │ └── UPSMON_pos_fnc_isinrectangle.sqf └── Infos │ ├── How to use UPSMON script.pdf │ └── Credits.txt ├── location ├── fnc_size.sqf ├── fnc_type.sqf ├── fnc_garrison.sqf ├── fnc_position.sqf ├── fnc_all.sqf ├── fnc_dictionary.sqf ├── fnc_busy.sqf ├── fnc_nearest.sqf ├── fnc_cities.sqf ├── fnc_spawned.sqf ├── fnc_get.sqf ├── fnc_forced_spawned.sqf ├── fnc_deinitialize.sqf ├── fnc_exists.sqf ├── fnc_initialize.sqf ├── fnc_addAllRoadblocks.sqf ├── fnc_S.sqf ├── fnc_T.sqf ├── fnc_getCityRoads.sqf ├── fnc_getNameSize.sqf ├── fnc_remove.sqf ├── fnc_TS.sqf ├── fnc_spawn.sqf ├── fnc_addRoadblock.sqf ├── fnc_despawn.sqf ├── fnc_toDict.sqf ├── fnc_side.sqf ├── fnc_removeRoadblocks.sqf ├── fnc_increaseBusy.sqf ├── fnc_set.sqf ├── spawn │ ├── fnc_AAFwait_capture.sqf │ ├── fnc_FIAwait_capture.sqf │ └── fnc_AAFlocation_clean.sqf └── fnc_add.sqf ├── mission ├── fnc_status.sqf ├── fnc_type.sqf ├── fnc_location.sqf ├── fnc_all.sqf ├── fnc_dictionary.sqf ├── spawn │ ├── fnc_saveTask.sqf │ ├── fnc_wait_spawn.sqf │ ├── fnc_clean.sqf │ └── fnc_loadTask.sqf ├── fnc_getFailDescription.sqf ├── fnc_available_missions.sqf ├── fnc_getSuccessDescription.sqf ├── fnc_get.sqf ├── fnc_toDict.sqf ├── fnc_cancel.sqf ├── fnc_remove.sqf ├── fnc_initialize.sqf ├── fnc_fail.sqf ├── fnc_set.sqf ├── fnc_deinitialize.sqf ├── fnc_createDefendCity.sqf ├── fnc_success.sqf ├── fnc_name.sqf ├── fnc_activate.sqf ├── fnc_fromDict.sqf ├── fnc_add.sqf ├── fnc_active_missions.sqf ├── fnc_create.sqf └── fnc_createDefendHQ.sqf ├── fnc_codeToString.sqf ├── spawn ├── fnc_all.sqf ├── fnc_dictionary.sqf ├── fnc_delete.sqf ├── fnc_get.sqf ├── fnc_set.sqf ├── fnc_initialize.sqf ├── fnc_add.sqf ├── cfgFunctions.hpp ├── fnc_toggle.sqf └── fnc_states.sqf ├── dialogs ├── startMenu │ ├── cfgFunctions.hpp │ ├── fnc_UI_menu.sqf │ └── dialogs.hpp ├── loadMenu │ ├── fnc_UI_close.sqf │ ├── cfgFunctions.hpp │ ├── fnc_UI_update.sqf │ ├── fnc_UI_load.sqf │ ├── fnc_UI_menu.sqf │ ├── dialogs.hpp │ └── fnc_UI_delete.sqf ├── newGame │ ├── fnc_UI_close.sqf │ ├── cfgFunctions.hpp │ ├── fnc_UI_menu.sqf │ └── fnc_UI_cycleDifficulty.sqf ├── manageNATO │ ├── fnc_UI_menu.sqf │ └── cfgFunctions.hpp ├── saveMenu │ ├── fnc_UI_menu.sqf │ ├── cfgFunctions.hpp │ ├── fnc_UI_select.sqf │ └── dialogs.hpp ├── buyVehicle │ ├── fnc_UI_menu.sqf │ ├── cfgFunctions.hpp │ ├── fnc_UI_buy.sqf │ ├── dialogs.hpp │ └── fnc_UI_updateList.sqf ├── manageTraits │ ├── fnc_UI_menu.sqf │ ├── cfgFunctions.hpp │ ├── fnc_UI_select.sqf │ └── dialogs.hpp ├── recruitUnit │ ├── fnc_UI_menu.sqf │ ├── cfgFunctions.hpp │ ├── dialogs.hpp │ ├── fnc_UI_updateList.sqf │ └── fnc_UI_recruit.sqf ├── manageLocations │ ├── fnc_UI_menu.sqf │ ├── fnc_UI_updateList.sqf │ ├── cfgFunctions.hpp │ ├── fnc_UI_add.sqf │ └── fnc_UI_abandon.sqf ├── manageMissions │ ├── fnc_UI_menu.sqf │ ├── cfgFunctions.hpp │ ├── fnc_UI_activate.sqf │ ├── fnc_UI_updateList.sqf │ ├── dialogs.hpp │ └── fnc_UI_updatePanel.sqf ├── recruitSquad │ ├── fnc_UI_menu.sqf │ ├── cfgFunctions.hpp │ ├── fnc_UI_recruit.sqf │ ├── fnc_UI_updateList.sqf │ └── dialogs.hpp ├── manageGarrisons │ ├── fnc_UI_menu.sqf │ ├── cfgFunctions.hpp │ ├── fnc_UI_onMapClick.sqf │ ├── fnc_UI_dismiss.sqf │ ├── fnc_UI_recruit.sqf │ ├── fnc_UI_selectOnMap.sqf │ ├── dialogs.hpp │ └── fnc_UI_updateList.sqf └── manageHQ │ ├── cfgFunctions.hpp │ ├── fnc_UI_move.sqf │ ├── fnc_UI_upgrade.sqf │ ├── fnc_UI_menu.sqf │ └── fnc_UI_takeMoney.sqf ├── fnc_isDog.sqf ├── onPlayerKilled.sqf ├── aaf_arsenal ├── fnc_dictionary.sqf ├── fnc_all.sqf ├── fnc_name.sqf ├── fnc_cost.sqf ├── fnc_value.sqf ├── fnc_get.sqf ├── fnc_toDict.sqf ├── fnc_deinitialize.sqf ├── fnc_canAdd.sqf ├── fnc_set.sqf ├── fnc_fromDict.sqf ├── fnc_addVehicle.sqf ├── fnc_category.sqf ├── fnc_deleteVehicle.sqf ├── fnc_count.sqf ├── fnc_valid.sqf └── fnc_max.sqf ├── pic.jpg ├── AI ├── rearmCall.sqf ├── unlimitedAmmo.sqf ├── attackDrill.sqf ├── fnc_dismountOnDanger.sqf ├── fnc_activateSmokeCoverAI.sqf └── VANTinfo.sqf ├── cfgRemoteExec.hpp ├── dictionary ├── fnc_del.sqf ├── fnc_delGlobal.sqf ├── fnc_create.sqf ├── fnc_keys.sqf ├── fnc_setGlobal.sqf ├── fnc_set.sqf ├── fnc_copy.sqf ├── fnc_copyGlobal.sqf ├── fnc_exists.sqf ├── fnc_get.sqf ├── macros.hpp ├── fnc__splitString.sqf ├── fnc__get.sqf └── fnc__splitStringDelimited.sqf ├── fia_recruitment ├── fnc_getFIAUnitType.sqf ├── fnc_spawnFIASquad.sqf ├── fnc_spawnFIAUnit.sqf ├── fnc_getFIASquadName.sqf ├── fnc_getFIASquadCost.sqf ├── fnc_UI_dismissSelected.sqf ├── fnc_getFIAUnitClass.sqf ├── fnc_dismissFIAgarrison.sqf ├── fnc_getFIABestSquadVehicle.sqf └── fnc_recruitFIAgarrison.sqf ├── tactics ├── README.md ├── fnc_heli_attack.sqf ├── fnc_ground_attack.sqf └── fnc_ground_combined.sqf ├── fnc_canFight.sqf ├── fnc_availableSeats.sqf ├── actions ├── refuel.sqf ├── heal.sqf ├── rescue.sqf └── interrogate.sqf ├── fnc_initPlayerPosition.sqf ├── fnc_skipTime.sqf ├── fnc_getEntity.sqf ├── ai_control ├── fnc_controlsAI.sqf ├── fnc_safeDropAIcontrol.sqf ├── fnc_completeDropAIcontrol.sqf ├── fnc_dropAIcontrol.sqf ├── fnc_setAIControl.sqf ├── fnc_UI_controlUnit.sqf └── fnc_EH_handleDamage_AIcontrol.sqf ├── database ├── fnc_getGames.sqf ├── fnc_getData.sqf ├── fnc_setData.sqf ├── fnc_apply_migration.sqf ├── fnc_getAdmin.sqf ├── fnc_hq_toDict.sqf ├── fnc_migrate.sqf ├── cfgFunctions.hpp ├── fnc_hq_fromDict.sqf └── fnc_loadGame.sqf ├── players ├── fnc_deinitialize.sqf ├── fnc_initialize.sqf ├── fnc_loadLocal.sqf ├── fnc_set.sqf ├── cfgFunctions.hpp ├── fnc_fromDict.sqf ├── fnc_change.sqf └── fnc_get.sqf ├── medical ├── fnc_canHeal.sqf ├── fnc_isUnconscious.sqf ├── fnc_getAssignedMedic.sqf ├── fnc_isHealed.sqf ├── templates │ ├── fnc_FIAuniformMeds.sqf │ ├── fnc_crateMeds.sqf │ └── fnc_FIAmedicBackpack.sqf ├── fnc_clearAssignedMedic.sqf ├── fnc_initUnit.sqf ├── fnc_healUnit.sqf ├── cfgFunctions.hpp └── fnc_setUnconscious.sqf ├── fia_arsenal └── cfgFunctions.hpp ├── fnc_renameFIAcamp.sqf ├── fnc_hasRadio.sqf ├── fnc_lockVehicle.sqf ├── arsenal ├── fnc_emptyCrate.sqf ├── fnc_equipDefault.sqf ├── fnc_getTotalCargo.sqf ├── fnc_emptyUnit.sqf ├── fnc_removeNightEquipment.sqf ├── fnc_transferToBox.sqf ├── fnc_getWeaponItemsCargo.sqf ├── fnc_unlockedCargoList.sqf └── fnc_collectDroppedEquipment.sqf ├── fnc_setDefaultSkill.sqf ├── scheduler ├── fnc_sendStatus.sqf ├── cfgFunctions.hpp ├── fnc_execute.sqf ├── fnc_measureFPS.sqf ├── fnc_receiveStatus.sqf └── fnc_initialize.sqf ├── fnc_setSide.sqf ├── fnc_HQdeletePad.sqf ├── fnc_getSide.sqf ├── reinitY.sqf ├── fnc_location_canBeDestroyed.sqf ├── fnc_enemiesNearby.sqf ├── fnc_resetPetrosPosition.sqf ├── fnc_location_isPowered.sqf ├── fnc_oneStepMission.sqf ├── fnc_antennaKilledEH.sqf ├── fnc_rearmPetros.sqf ├── fnc_getCitiesToCivPatrol.sqf ├── fnc_isAdmin.sqf ├── fnc_shuffle.sqf ├── fnc_getFactionSide.sqf ├── fnc_getCost.sqf ├── initialization ├── server_side_variables.sqf └── headlessClient.sqf ├── fnc_selectNewHQ.sqf ├── movement └── cfgFunctions.hpp ├── fnc_spawnComposition.sqf ├── init.sqf ├── fnc_cleanGarbage.sqf ├── fnc_changeAAFmoney.sqf ├── fnc_getAllUnits.sqf ├── fnc_dropArtilleryShells.sqf ├── fnc_revealToPlayer.sqf ├── fnc_changeStreetLights.sqf ├── fnc_initUnitCSAT.sqf ├── fnc_rebuildLocation.sqf ├── fnc_updateDestroyedBuildings.sqf ├── fnc_initUnit.sqf ├── fnc_location_isFrontline.sqf ├── fnc_dropArtilleryShellsNATO.sqf ├── fnc_getFaction.sqf ├── fnc_roadAndDir.sqf ├── fnc_activateCleanup.sqf ├── fnc_hasRadioCoverage.sqf ├── fnc_getFIAvehiclePrice.sqf ├── fnc_abandonFIAlocation.sqf ├── fnc_groupCfgToComposition.sqf ├── templates ├── FIA_EAST_CUP.sqf ├── FIA_EAST.sqf └── FIA_EAST_RHS.sqf ├── fnc_resourcesToggle.sqf ├── fnc_HQbuild.sqf ├── fnc_getBasesForConvoy.sqf ├── fnc_spawnAAF_truck.sqf ├── fnc_getLocationName.sqf ├── fnc_HQmove.sqf ├── macros.hpp ├── fnc_HQplace.sqf ├── fnc_changeSecondsForAAFattack.sqf ├── fnc_setConvoyImmune.sqf ├── fnc_HQdeploy.sqf ├── fnc_changePersistentVehicles.sqf ├── fnc_initUnitNATO.sqf ├── fnc_unlockVehicle.sqf ├── fnc_EH_KeyDown.sqf ├── fnc_spawnCSATuav.sqf ├── fnc_HQdeployPad.sqf ├── fnc_getBasesForCA.sqf ├── fnc_createGroup.sqf ├── fnc_getAirportsForCA.sqf ├── hpp_macros.hpp ├── fnc_addMinefield.sqf └── fnc_respawnPlayer.sqf /.gitignore: -------------------------------------------------------------------------------- 1 | mission.sqm 2 | 3 | -------------------------------------------------------------------------------- /Antistasi/tests/test_runner.sqf: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Antistasi/debug/fnc_init.sqf: -------------------------------------------------------------------------------- 1 | AS_debug_flag = false; 2 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/Core/fnc/Nouveau document texte.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Antistasi/location/fnc_size.sqf: -------------------------------------------------------------------------------- 1 | [_this,"size"] call AS_location_fnc_get 2 | -------------------------------------------------------------------------------- /Antistasi/location/fnc_type.sqf: -------------------------------------------------------------------------------- 1 | [_this,"type"] call AS_location_fnc_get 2 | -------------------------------------------------------------------------------- /Antistasi/mission/fnc_status.sqf: -------------------------------------------------------------------------------- 1 | [_this, "status"] call AS_mission_fnc_get 2 | -------------------------------------------------------------------------------- /Antistasi/mission/fnc_type.sqf: -------------------------------------------------------------------------------- 1 | [_this, "type"] call AS_mission_fnc_get 2 | -------------------------------------------------------------------------------- /Antistasi/fnc_codeToString.sqf: -------------------------------------------------------------------------------- 1 | ((str _this) select [1, (count str _this) - 2]) 2 | -------------------------------------------------------------------------------- /Antistasi/location/fnc_garrison.sqf: -------------------------------------------------------------------------------- 1 | [_this,"garrison"] call AS_location_fnc_get 2 | -------------------------------------------------------------------------------- /Antistasi/location/fnc_position.sqf: -------------------------------------------------------------------------------- 1 | [_this,"position"] call AS_location_fnc_get 2 | -------------------------------------------------------------------------------- /Antistasi/mission/fnc_location.sqf: -------------------------------------------------------------------------------- 1 | [_this, "location"] call AS_mission_fnc_get 2 | -------------------------------------------------------------------------------- /Antistasi/spawn/fnc_all.sqf: -------------------------------------------------------------------------------- 1 | (call AS_spawn_fnc_dictionary) call DICT_fnc_keys 2 | -------------------------------------------------------------------------------- /Antistasi/spawn/fnc_dictionary.sqf: -------------------------------------------------------------------------------- 1 | ([AS_container, "spawn"] call DICT_fnc_get) 2 | -------------------------------------------------------------------------------- /Antistasi/dialogs/startMenu/cfgFunctions.hpp: -------------------------------------------------------------------------------- 1 | FNC_UI_PREFIX(dialogs,startMenu,menu); 2 | -------------------------------------------------------------------------------- /Antistasi/fnc_isDog.sqf: -------------------------------------------------------------------------------- 1 | params ["_unit"]; 2 | _unit getVariable ["isDog", false]; 3 | -------------------------------------------------------------------------------- /Antistasi/location/fnc_all.sqf: -------------------------------------------------------------------------------- 1 | (call AS_location_fnc_dictionary) call DICT_fnc_keys 2 | -------------------------------------------------------------------------------- /Antistasi/location/fnc_dictionary.sqf: -------------------------------------------------------------------------------- 1 | [AS_container, "location"] call DICT_fnc_get 2 | -------------------------------------------------------------------------------- /Antistasi/mission/fnc_all.sqf: -------------------------------------------------------------------------------- 1 | (call AS_mission_fnc_dictionary) call DICT_fnc_keys 2 | -------------------------------------------------------------------------------- /Antistasi/mission/fnc_dictionary.sqf: -------------------------------------------------------------------------------- 1 | [AS_container, "mission"] call DICT_fnc_get 2 | -------------------------------------------------------------------------------- /Antistasi/onPlayerKilled.sqf: -------------------------------------------------------------------------------- 1 | params ["_old"]; 2 | [_old] spawn AS_fnc_respawnPlayer; 3 | -------------------------------------------------------------------------------- /Antistasi/aaf_arsenal/fnc_dictionary.sqf: -------------------------------------------------------------------------------- 1 | [AS_container, "aaf_arsenal"] call DICT_fnc_get 2 | -------------------------------------------------------------------------------- /Antistasi/pic.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LordGolias/antistasi/HEAD/Antistasi/pic.jpg -------------------------------------------------------------------------------- /Antistasi/spawn/fnc_delete.sqf: -------------------------------------------------------------------------------- 1 | [call AS_spawn_fnc_dictionary,_this] call DICT_fnc_del 2 | -------------------------------------------------------------------------------- /Antistasi/AI/rearmCall.sqf: -------------------------------------------------------------------------------- 1 | {[_x] spawn AS_AI_fnc_autoRearm; sleep 3 + (random 5)} forEach _this; -------------------------------------------------------------------------------- /Antistasi/cfgRemoteExec.hpp: -------------------------------------------------------------------------------- 1 | 2 | class Functions { 3 | mode = 2; 4 | jip = 0; 5 | }; 6 | -------------------------------------------------------------------------------- /Antistasi/dictionary/fnc_del.sqf: -------------------------------------------------------------------------------- 1 | #include "macros.hpp" 2 | [_this, false] call EFUNC(_del); 3 | -------------------------------------------------------------------------------- /Antistasi/dialogs/loadMenu/fnc_UI_close.sqf: -------------------------------------------------------------------------------- 1 | closeDialog 0; 2 | [] spawn AS_fnc_UI_startMenu_menu; 3 | -------------------------------------------------------------------------------- /Antistasi/dialogs/newGame/fnc_UI_close.sqf: -------------------------------------------------------------------------------- 1 | closeDialog 0; 2 | [] spawn AS_fnc_UI_startMenu_menu; 3 | -------------------------------------------------------------------------------- /Antistasi/dictionary/fnc_delGlobal.sqf: -------------------------------------------------------------------------------- 1 | #include "macros.hpp" 2 | [_this, true] call EFUNC(_del); 3 | -------------------------------------------------------------------------------- /Antistasi/fia_recruitment/fnc_getFIAUnitType.sqf: -------------------------------------------------------------------------------- 1 | params ["_unit"]; 2 | _unit getVariable "AS_type" 3 | -------------------------------------------------------------------------------- /Antistasi/location/fnc_busy.sqf: -------------------------------------------------------------------------------- 1 | (dateToNumber date) < ([_this,"busy"] call AS_location_fnc_get) 2 | -------------------------------------------------------------------------------- /Antistasi/location/fnc_nearest.sqf: -------------------------------------------------------------------------------- 1 | [call AS_location_fnc_all, _this] call BIS_Fnc_nearestPosition 2 | -------------------------------------------------------------------------------- /Antistasi/mission/spawn/fnc_saveTask.sqf: -------------------------------------------------------------------------------- 1 | [_this select 0, "task", _this] call AS_spawn_fnc_set; 2 | -------------------------------------------------------------------------------- /Antistasi/dialogs/manageNATO/fnc_UI_menu.sqf: -------------------------------------------------------------------------------- 1 | disableSerialization; 2 | createDialog "AS_manageNATO"; 3 | -------------------------------------------------------------------------------- /Antistasi/dictionary/fnc_create.sqf: -------------------------------------------------------------------------------- 1 | // Creates a new dictionary. 2 | createSimpleObject ["Static", [0, 0, 0]] 3 | -------------------------------------------------------------------------------- /Antistasi/location/fnc_cities.sqf: -------------------------------------------------------------------------------- 1 | (call AS_location_fnc_all) select {_x call AS_location_fnc_type == "city"} 2 | -------------------------------------------------------------------------------- /Antistasi/tactics/README.md: -------------------------------------------------------------------------------- 1 | # Tactics 2 | 3 | Contains scripts with tactics to move squads on the battlefield. 4 | -------------------------------------------------------------------------------- /Antistasi/mission/fnc_getFailDescription.sqf: -------------------------------------------------------------------------------- 1 | (_this call AS_mission_fnc__getFailData) call AS_mission_fnc__description 2 | -------------------------------------------------------------------------------- /Antistasi/aaf_arsenal/fnc_all.sqf: -------------------------------------------------------------------------------- 1 | // all AAF arsenal categories 2 | (call AS_AAFarsenal_fnc_dictionary) call DICT_fnc_keys 3 | -------------------------------------------------------------------------------- /Antistasi/aaf_arsenal/fnc_name.sqf: -------------------------------------------------------------------------------- 1 | // a presentable name of the category. 2 | [_this, "name"] call AS_AAFarsenal_fnc_get 3 | -------------------------------------------------------------------------------- /Antistasi/mission/fnc_available_missions.sqf: -------------------------------------------------------------------------------- 1 | (call AS_mission_fnc_all) select {_x call AS_mission_fnc_status == "available"} 2 | -------------------------------------------------------------------------------- /Antistasi/mission/fnc_getSuccessDescription.sqf: -------------------------------------------------------------------------------- 1 | (_this call AS_mission_fnc__getSuccessData) call AS_mission_fnc__description 2 | -------------------------------------------------------------------------------- /Antistasi/dictionary/fnc_keys.sqf: -------------------------------------------------------------------------------- 1 | (allVariables _this) select {private _x_value = _this getVariable _x; not isNil "_x_value"} 2 | -------------------------------------------------------------------------------- /Antistasi/fnc_canFight.sqf: -------------------------------------------------------------------------------- 1 | alive _this and {not (captive _this or {fleeing _this} or {_this call AS_medical_fnc_isUnconscious})} 2 | -------------------------------------------------------------------------------- /Antistasi/dialogs/manageNATO/cfgFunctions.hpp: -------------------------------------------------------------------------------- 1 | FNC_UI_PREFIX(dialogs,manageNATO,menu); 2 | FNC_UI_PREFIX(dialogs,manageNATO,activate); 3 | -------------------------------------------------------------------------------- /Antistasi/fnc_availableSeats.sqf: -------------------------------------------------------------------------------- 1 | params ["_vehicle"]; 2 | (([typeOf _vehicle, true] call BIS_fnc_crewCount) - (count crew _vehicle)) 3 | -------------------------------------------------------------------------------- /Antistasi/spawn/fnc_get.sqf: -------------------------------------------------------------------------------- 1 | params ["_spawn", "_property"]; 2 | [call AS_spawn_fnc_dictionary, _spawn, _property] call DICT_fnc_get 3 | -------------------------------------------------------------------------------- /Antistasi/location/fnc_spawned.sqf: -------------------------------------------------------------------------------- 1 | if !(_this call AS_location_fnc_exists) exitWith {false}; 2 | [_this,"spawned"] call AS_location_fnc_get 3 | -------------------------------------------------------------------------------- /Antistasi/mission/fnc_get.sqf: -------------------------------------------------------------------------------- 1 | params ["_mission", "_property"]; 2 | [call AS_mission_fnc_dictionary, _mission, _property] call DICT_fnc_get 3 | -------------------------------------------------------------------------------- /Antistasi/aaf_arsenal/fnc_cost.sqf: -------------------------------------------------------------------------------- 1 | // the value of buying (AAF) a vehicle of a given category. 2 | [_this, "cost"] call AS_AAFarsenal_fnc_get 3 | -------------------------------------------------------------------------------- /Antistasi/aaf_arsenal/fnc_value.sqf: -------------------------------------------------------------------------------- 1 | // the value of selling (FIA) a vehicle of a given category. 2 | [_this, "value"] call AS_AAFarsenal_fnc_get 3 | -------------------------------------------------------------------------------- /Antistasi/dialogs/saveMenu/fnc_UI_menu.sqf: -------------------------------------------------------------------------------- 1 | disableSerialization; 2 | createDialog "AS_saveMenu"; 3 | 4 | [] call AS_fnc_UI_loadMenu_update; 5 | -------------------------------------------------------------------------------- /Antistasi/location/fnc_get.sqf: -------------------------------------------------------------------------------- 1 | params ["_location", "_property"]; 2 | [call AS_location_fnc_dictionary, _location, _property] call DICT_fnc_get 3 | -------------------------------------------------------------------------------- /Antistasi/aaf_arsenal/fnc_get.sqf: -------------------------------------------------------------------------------- 1 | params ["_category", "_property"]; 2 | [call AS_AAFarsenal_fnc_dictionary, _category, _property] call DICT_fnc_get 3 | -------------------------------------------------------------------------------- /Antistasi/actions/refuel.sqf: -------------------------------------------------------------------------------- 1 | params ["_pos"]; 2 | 3 | { 4 | if (_x distance _pos < 30) then { 5 | _x setFuel 0.8; 6 | }; 7 | } forEach vehicles; 8 | -------------------------------------------------------------------------------- /Antistasi/dialogs/buyVehicle/fnc_UI_menu.sqf: -------------------------------------------------------------------------------- 1 | disableSerialization; 2 | createDialog "AS_buyVehicle"; 3 | 4 | call AS_fnc_UI_buyVehicle_updateList; 5 | -------------------------------------------------------------------------------- /Antistasi/dialogs/manageTraits/fnc_UI_menu.sqf: -------------------------------------------------------------------------------- 1 | disableSerialization; 2 | 3 | createDialog "AS_manageTraits"; 4 | 5 | call AS_fnc_UI_manageTraits_update; 6 | -------------------------------------------------------------------------------- /Antistasi/dialogs/recruitUnit/fnc_UI_menu.sqf: -------------------------------------------------------------------------------- 1 | disableSerialization; 2 | createDialog "AS_RecruitUnit"; 3 | 4 | [] call AS_fnc_UI_recruitUnit_updateList; 5 | -------------------------------------------------------------------------------- /Antistasi/fnc_initPlayerPosition.sqf: -------------------------------------------------------------------------------- 1 | params ["_player"]; 2 | _player setPos ((getMarkerPos "FIA_HQ") findEmptyPosition [2, 10, typeOf (vehicle _player)]); 3 | -------------------------------------------------------------------------------- /Antistasi/fnc_skipTime.sqf: -------------------------------------------------------------------------------- 1 | cutText ["You decided to rest some time","BLACK",5]; 2 | sleep 10; 3 | skiptime 8; 4 | cutText ["Time to go", "BLACK IN", 10]; 5 | -------------------------------------------------------------------------------- /Antistasi/location/fnc_forced_spawned.sqf: -------------------------------------------------------------------------------- 1 | if !(_this call AS_location_fnc_exists) exitWith {false}; 2 | [_this,"forced_spawned"] call AS_location_fnc_get 3 | -------------------------------------------------------------------------------- /Antistasi/Scripts/Infos/How to use UPSMON script.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LordGolias/antistasi/HEAD/Antistasi/Scripts/Infos/How to use UPSMON script.pdf -------------------------------------------------------------------------------- /Antistasi/dialogs/manageLocations/fnc_UI_menu.sqf: -------------------------------------------------------------------------------- 1 | disableSerialization; 2 | createDialog "AS_manageLocations"; 3 | call AS_fnc_UI_manageLocations_updateList; 4 | -------------------------------------------------------------------------------- /Antistasi/dialogs/manageMissions/fnc_UI_menu.sqf: -------------------------------------------------------------------------------- 1 | disableSerialization; 2 | createDialog "AS_ManageMissions"; 3 | 4 | call AS_fnc_UI_manageMissions_updateList; 5 | -------------------------------------------------------------------------------- /Antistasi/dialogs/recruitSquad/fnc_UI_menu.sqf: -------------------------------------------------------------------------------- 1 | disableSerialization; 2 | createDialog "AS_recruitSquad"; 3 | 4 | [] call AS_fnc_UI_recruitSquad_updateList; 5 | -------------------------------------------------------------------------------- /Antistasi/fnc_getEntity.sqf: -------------------------------------------------------------------------------- 1 | #include "macros.hpp" 2 | params ["_side", "_type"]; 3 | 4 | [AS_entities, _side call AS_fnc_getFaction, _type] call DICT_fnc_get 5 | -------------------------------------------------------------------------------- /Antistasi/mission/fnc_toDict.sqf: -------------------------------------------------------------------------------- 1 | #include "../macros.hpp" 2 | AS_SERVER_ONLY("AS_mission_fnc_toDict"); 3 | (call AS_mission_fnc_dictionary) call DICT_fnc_copy 4 | -------------------------------------------------------------------------------- /Antistasi/spawn/fnc_set.sqf: -------------------------------------------------------------------------------- 1 | params ["_spawn", "_property", "_value"]; 2 | [call AS_spawn_fnc_dictionary, _spawn, _property, _value] call DICT_fnc_setGlobal 3 | -------------------------------------------------------------------------------- /Antistasi/ai_control/fnc_controlsAI.sqf: -------------------------------------------------------------------------------- 1 | // whether a player controls an ai 2 | params ["_player"]; 3 | _player getVariable ["AS_controller", _player] != _player 4 | -------------------------------------------------------------------------------- /Antistasi/ai_control/fnc_safeDropAIcontrol.sqf: -------------------------------------------------------------------------------- 1 | if (_this call AS_fnc_controlsAI) exitWith { 2 | _this call AS_fnc_dropAIcontrol; 3 | true 4 | }; 5 | false 6 | -------------------------------------------------------------------------------- /Antistasi/database/fnc_getGames.sqf: -------------------------------------------------------------------------------- 1 | #include "../macros.hpp" 2 | AS_SERVER_ONLY("AS_database_fnc_getGames"); 3 | profileNameSpace getVariable ["AS_savedGames", []] 4 | -------------------------------------------------------------------------------- /Antistasi/mission/fnc_cancel.sqf: -------------------------------------------------------------------------------- 1 | #include "../macros.hpp" 2 | AS_SERVER_ONLY("AS_mission_fnc_cancel"); 3 | [_this, "status", "completed"] call AS_mission_fnc_set; 4 | -------------------------------------------------------------------------------- /Antistasi/mission/fnc_remove.sqf: -------------------------------------------------------------------------------- 1 | #include "../macros.hpp" 2 | AS_SERVER_ONLY("AS_mission_fnc_remove"); 3 | [call AS_mission_fnc_dictionary,_this] call DICT_fnc_del 4 | -------------------------------------------------------------------------------- /Antistasi/players/fnc_deinitialize.sqf: -------------------------------------------------------------------------------- 1 | #include "../macros.hpp" 2 | AS_SERVER_ONLY("AS_players_fnc_deinitialize"); 3 | [AS_container, "players"] call DICT_fnc_del; 4 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/Core/fnc/UPSMON_GetCOS.sqf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LordGolias/antistasi/HEAD/Antistasi/Scripts/UPSMON/COMMON/Core/fnc/UPSMON_GetCOS.sqf -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/Core/fnc/UPSMON_GetSIN.sqf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LordGolias/antistasi/HEAD/Antistasi/Scripts/UPSMON/COMMON/Core/fnc/UPSMON_GetSIN.sqf -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/unit/fnc/UPSMON_doStop.sqf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LordGolias/antistasi/HEAD/Antistasi/Scripts/UPSMON/COMMON/unit/fnc/UPSMON_doStop.sqf -------------------------------------------------------------------------------- /Antistasi/aaf_arsenal/fnc_toDict.sqf: -------------------------------------------------------------------------------- 1 | #include "../macros.hpp" 2 | AS_SERVER_ONLY("AS_AAFarsenal_fnc_toDict"); 3 | (call AS_AAFarsenal_fnc_dictionary) call DICT_fnc_copy 4 | -------------------------------------------------------------------------------- /Antistasi/dialogs/saveMenu/cfgFunctions.hpp: -------------------------------------------------------------------------------- 1 | FNC_UI_PREFIX(dialogs,saveMenu,menu); 2 | FNC_UI_PREFIX(dialogs,saveMenu,save); 3 | FNC_UI_PREFIX(dialogs,saveMenu,select); 4 | -------------------------------------------------------------------------------- /Antistasi/dialogs/saveMenu/fnc_UI_select.sqf: -------------------------------------------------------------------------------- 1 | disableSerialization; 2 | private _id = lbCurSel 0; 3 | private _saveName = lbData [0, _id]; 4 | ctrlsetText [2, _saveName]; 5 | -------------------------------------------------------------------------------- /Antistasi/location/fnc_deinitialize.sqf: -------------------------------------------------------------------------------- 1 | #include "../macros.hpp" 2 | AS_SERVER_ONLY("AS_location_fnc_deinitialize"); 3 | [AS_container, "location"] call DICT_fnc_del; 4 | -------------------------------------------------------------------------------- /Antistasi/location/fnc_exists.sqf: -------------------------------------------------------------------------------- 1 | // Whether the location exists or not. 2 | params ["_location"]; 3 | [call AS_location_fnc_dictionary, _location] call DICT_fnc_exists; 4 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/Core/fnc/UPSMON_GetPos2D.sqf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LordGolias/antistasi/HEAD/Antistasi/Scripts/UPSMON/COMMON/Core/fnc/UPSMON_GetPos2D.sqf -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/unit/fnc/UPSMON_doGetOut.sqf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LordGolias/antistasi/HEAD/Antistasi/Scripts/UPSMON/COMMON/unit/fnc/UPSMON_doGetOut.sqf -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/unit/fnc/UPSMON_dowatch.sqf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LordGolias/antistasi/HEAD/Antistasi/Scripts/UPSMON/COMMON/unit/fnc/UPSMON_dowatch.sqf -------------------------------------------------------------------------------- /Antistasi/aaf_arsenal/fnc_deinitialize.sqf: -------------------------------------------------------------------------------- 1 | #include "../macros.hpp" 2 | AS_SERVER_ONLY("AS_AAFarsenal_fnc_deinitialize"); 3 | [AS_container, "aaf_arsenal"] call DICT_fnc_del; 4 | -------------------------------------------------------------------------------- /Antistasi/medical/fnc_canHeal.sqf: -------------------------------------------------------------------------------- 1 | params ["_medic"]; 2 | if not hasACEmedical exitWith { 3 | "FirstAidKit" in (items _medic) 4 | }; 5 | true // for ACE, ACE handles it 6 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/unit/fnc/UPSMON_DoSurrender.sqf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LordGolias/antistasi/HEAD/Antistasi/Scripts/UPSMON/COMMON/unit/fnc/UPSMON_DoSurrender.sqf -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/unit/fnc/UPSMON_cancelstop.sqf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LordGolias/antistasi/HEAD/Antistasi/Scripts/UPSMON/COMMON/unit/fnc/UPSMON_cancelstop.sqf -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/unit/fnc/UPSMON_deadbodies.sqf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LordGolias/antistasi/HEAD/Antistasi/Scripts/UPSMON/COMMON/unit/fnc/UPSMON_deadbodies.sqf -------------------------------------------------------------------------------- /Antistasi/aaf_arsenal/fnc_canAdd.sqf: -------------------------------------------------------------------------------- 1 | // Returns whether the category has space for more vehicles. 2 | (_this call AS_AAFarsenal_fnc_count) < (_this call AS_AAFarsenal_fnc_max) 3 | -------------------------------------------------------------------------------- /Antistasi/fia_arsenal/cfgFunctions.hpp: -------------------------------------------------------------------------------- 1 | class AS_FIAarsenal { 2 | class common { 3 | FNC(fia_arsenal,toDict); 4 | FNC(fia_arsenal,fromDict); 5 | }; 6 | }; 7 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/unit/fnc/UPSMON_movetoDriver.sqf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LordGolias/antistasi/HEAD/Antistasi/Scripts/UPSMON/COMMON/unit/fnc/UPSMON_movetoDriver.sqf -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/unit/fnc/UPSMON_movetogunner.sqf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LordGolias/antistasi/HEAD/Antistasi/Scripts/UPSMON/COMMON/unit/fnc/UPSMON_movetogunner.sqf -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/vehicles/fnc/UPSMON_UnitsGetIn.sqf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LordGolias/antistasi/HEAD/Antistasi/Scripts/UPSMON/COMMON/vehicles/fnc/UPSMON_UnitsGetIn.sqf -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/MODULES/ARTILLERY/fnc/UPSMON_Flaretime.sqf: -------------------------------------------------------------------------------- 1 | UPSMON_FlareInTheAir = true; 2 | sleep 50; 3 | UPSMON_FlareInTheAir = false; 4 | Publicvariable "UPSMON_FlareInTheAir"; -------------------------------------------------------------------------------- /Antistasi/dialogs/recruitUnit/cfgFunctions.hpp: -------------------------------------------------------------------------------- 1 | FNC_UI_PREFIX(dialogs,recruitUnit,menu); 2 | FNC_UI_PREFIX(dialogs,recruitUnit,updateList); 3 | FNC_UI_PREFIX(dialogs,recruitUnit,recruit); 4 | -------------------------------------------------------------------------------- /Antistasi/dictionary/fnc_setGlobal.sqf: -------------------------------------------------------------------------------- 1 | // Sets the value of the key of the dictionary. Use multiple keys for nested operation. 2 | #include "macros.hpp" 3 | [_this, true] call EFUNC(_set); 4 | -------------------------------------------------------------------------------- /Antistasi/fnc_renameFIAcamp.sqf: -------------------------------------------------------------------------------- 1 | #include "macros.hpp" 2 | AS_SERVER_ONLY("fnc_renameFIAcamp.sqf"); 3 | private ["_camp","_name"]; 4 | 5 | [_camp, "name", _name] call AS_location_fnc_set; 6 | -------------------------------------------------------------------------------- /Antistasi/mission/fnc_initialize.sqf: -------------------------------------------------------------------------------- 1 | #include "../macros.hpp" 2 | AS_SERVER_ONLY("AS_mission_fnc_initialize"); 3 | [AS_container, "mission", call DICT_fnc_create] call DICT_fnc_setGlobal; 4 | -------------------------------------------------------------------------------- /Antistasi/players/fnc_initialize.sqf: -------------------------------------------------------------------------------- 1 | #include "../macros.hpp" 2 | AS_SERVER_ONLY("AS_players_fnc_initialize"); 3 | [AS_container, "players", call DICT_fnc_create] call DICT_fnc_setGlobal; 4 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/vehicles/fnc/UPSMON_selectvehicles.sqf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LordGolias/antistasi/HEAD/Antistasi/Scripts/UPSMON/COMMON/vehicles/fnc/UPSMON_selectvehicles.sqf -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/MODULES/FORTIFY/Fnc/UPSMON_movetoBuilding.sqf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LordGolias/antistasi/HEAD/Antistasi/Scripts/UPSMON/MODULES/FORTIFY/Fnc/UPSMON_movetoBuilding.sqf -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/MODULES/ORDERS/UPSMON_SUPPLY/Init.sqf: -------------------------------------------------------------------------------- 1 | 2 | UPSMON_GetSupply = compile preProcessFileLineNumbers "Scripts\UPSMON\MODULES\ORDERS\UPSMON_SUPPLY\fnc\UPSMON_GetSupply.sqf"; 3 | -------------------------------------------------------------------------------- /Antistasi/database/fnc_getData.sqf: -------------------------------------------------------------------------------- 1 | #include "../macros.hpp" 2 | AS_SERVER_ONLY("AS_database_fnc_getData"); 3 | params ["_saveName"]; 4 | profileNameSpace getVariable ["AS_v1_" + _saveName, ""] 5 | -------------------------------------------------------------------------------- /Antistasi/dialogs/recruitSquad/cfgFunctions.hpp: -------------------------------------------------------------------------------- 1 | FNC_UI_PREFIX(dialogs,recruitSquad,menu); 2 | FNC_UI_PREFIX(dialogs,recruitSquad,updateList); 3 | FNC_UI_PREFIX(dialogs,recruitSquad,recruit); 4 | -------------------------------------------------------------------------------- /Antistasi/dictionary/fnc_set.sqf: -------------------------------------------------------------------------------- 1 | // Sets the value of the key of the dictionary (local). Use multiple keys for nested operation. 2 | #include "macros.hpp" 3 | [_this, false] call EFUNC(_set); 4 | -------------------------------------------------------------------------------- /Antistasi/location/fnc_initialize.sqf: -------------------------------------------------------------------------------- 1 | #include "../macros.hpp" 2 | AS_SERVER_ONLY("AS_location_fnc_initialize"); 3 | [AS_container, "location", call DICT_fnc_create] call DICT_fnc_setGlobal; 4 | -------------------------------------------------------------------------------- /Antistasi/AI/unlimitedAmmo.sqf: -------------------------------------------------------------------------------- 1 | private ["_veh"]; 2 | 3 | _veh = _this select 0; 4 | 5 | while {alive _veh} do 6 | { 7 | sleep 600; 8 | _veh setVehicleAmmoDef 1; 9 | _veh setFuel 1; 10 | }; -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/vehicles/fnc/UPSMON_GetNearestStatics.sqf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LordGolias/antistasi/HEAD/Antistasi/Scripts/UPSMON/COMMON/vehicles/fnc/UPSMON_GetNearestStatics.sqf -------------------------------------------------------------------------------- /Antistasi/fnc_hasRadio.sqf: -------------------------------------------------------------------------------- 1 | params ["_unit"]; 2 | "ItemRadio" in assignedItems _unit or { 3 | hasTFAR and {count ((_unit call TFAR_fnc_radiosList) + (_unit call TFAR_fnc_backpackLR)) > 0} 4 | } 5 | -------------------------------------------------------------------------------- /Antistasi/fnc_lockVehicle.sqf: -------------------------------------------------------------------------------- 1 | // (un-)lock a vehicle 2 | params ["_veh", "_lock"]; 3 | 4 | if (_lock) then { 5 | _veh lock 2; 6 | }; 7 | if !(_lock) then { 8 | _veh lock 0; 9 | }; 10 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/vehicles/fnc/UPSMON_GetNearestVehicles.sqf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LordGolias/antistasi/HEAD/Antistasi/Scripts/UPSMON/COMMON/vehicles/fnc/UPSMON_GetNearestVehicles.sqf -------------------------------------------------------------------------------- /Antistasi/arsenal/fnc_emptyCrate.sqf: -------------------------------------------------------------------------------- 1 | params ["_crate"]; 2 | 3 | clearMagazineCargoGlobal _crate; 4 | clearWeaponCargoGlobal _crate; 5 | clearItemCargoGlobal _crate; 6 | clearBackpackCargoGlobal _crate; 7 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/vehicles/fnc/UPSMON_GetIn_NearestVehicles.sqf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LordGolias/antistasi/HEAD/Antistasi/Scripts/UPSMON/COMMON/vehicles/fnc/UPSMON_GetIn_NearestVehicles.sqf -------------------------------------------------------------------------------- /Antistasi/database/fnc_setData.sqf: -------------------------------------------------------------------------------- 1 | #include "../macros.hpp" 2 | AS_SERVER_ONLY("AS_database_fnc_setData"); 3 | params ["_saveName", "_data"]; 4 | profileNameSpace setVariable ["AS_v1_" + _saveName, _data]; 5 | -------------------------------------------------------------------------------- /Antistasi/fnc_setDefaultSkill.sqf: -------------------------------------------------------------------------------- 1 | #include "macros.hpp" 2 | params ["_unit", ["_sideSkill", AS_maxSkill]]; 3 | _unit setSkill (AS_P("minAISkill") + (AS_P("maxAISkill") - AS_P("minAISkill"))*_sideSkill/AS_maxSkill); 4 | -------------------------------------------------------------------------------- /Antistasi/ai_control/fnc_completeDropAIcontrol.sqf: -------------------------------------------------------------------------------- 1 | if (player call AS_fnc_safeDropAIcontrol) then { 2 | {[_x] joinsilent group player} forEach units group player; 3 | group player selectLeader player; 4 | }; 5 | -------------------------------------------------------------------------------- /Antistasi/arsenal/fnc_equipDefault.sqf: -------------------------------------------------------------------------------- 1 | params ["_unit"]; 2 | _unit addweapon "ItemMap"; 3 | _unit addweapon "ItemCompass"; 4 | _unit addweapon "ItemRadio"; 5 | _unit addweapon "ItemGPS"; 6 | _unit addweapon "ItemWatch"; 7 | -------------------------------------------------------------------------------- /Antistasi/fia_recruitment/fnc_spawnFIASquad.sqf: -------------------------------------------------------------------------------- 1 | params ["_squadType", "_position", "_group"]; 2 | { 3 | [_x, _position, _group] call AS_fnc_spawnFIAUnit; 4 | } forEach (["FIA", _squadType] call AS_fnc_getEntity); 5 | -------------------------------------------------------------------------------- /Antistasi/arsenal/fnc_getTotalCargo.sqf: -------------------------------------------------------------------------------- 1 | params ["_cargo"]; 2 | 3 | private _total = 0; 4 | for "_i" from 0 to (count (_cargo select 0) - 1) do { 5 | _total = _total + ((_cargo select 1) select _i); 6 | }; 7 | _total 8 | -------------------------------------------------------------------------------- /Antistasi/location/fnc_addAllRoadblocks.sqf: -------------------------------------------------------------------------------- 1 | #include "../macros.hpp" 2 | AS_SERVER_ONLY("AS_location_fnc_addAllRoadblocks"); 3 | { 4 | _x call AS_location_fnc_addRoadblocks; 5 | } forEach ("AAF" call AS_location_fnc_S); 6 | -------------------------------------------------------------------------------- /Antistasi/dialogs/manageGarrisons/fnc_UI_menu.sqf: -------------------------------------------------------------------------------- 1 | disableSerialization; 2 | 3 | createDialog "AS_manageGarrisons"; 4 | 5 | ((findDisplay 1602) displayCtrl 2) ctrlSetText "FIA_HQ"; 6 | call AS_fnc_UI_manageGarrisons_updateList; 7 | -------------------------------------------------------------------------------- /Antistasi/medical/fnc_isUnconscious.sqf: -------------------------------------------------------------------------------- 1 | params ["_unit"]; 2 | if (not hasACEMedical) then { 3 | _unit getVariable ["AS_medical_isUnconscious", false] 4 | } else { 5 | _unit getVariable ["ACE_isUnconscious", false] 6 | }; 7 | -------------------------------------------------------------------------------- /Antistasi/tactics/fnc_heli_attack.sqf: -------------------------------------------------------------------------------- 1 | params ["_origin", "_destination", "_crew_group"]; 2 | 3 | private _wp1 = _crew_group addWaypoint [_destination, 1]; 4 | _wp1 setWaypointType "SAD"; 5 | _wp1 setWaypointBehaviour "COMBAT"; 6 | -------------------------------------------------------------------------------- /Antistasi/dialogs/manageTraits/cfgFunctions.hpp: -------------------------------------------------------------------------------- 1 | FNC_UI_PREFIX(dialogs,manageTraits,menu); 2 | FNC_UI_PREFIX(dialogs,manageTraits,update); 3 | FNC_UI_PREFIX(dialogs,manageTraits,select); 4 | FNC_UI_PREFIX(dialogs,manageTraits,train); 5 | -------------------------------------------------------------------------------- /Antistasi/mission/fnc_fail.sqf: -------------------------------------------------------------------------------- 1 | #include "../macros.hpp" 2 | AS_SERVER_ONLY("AS_mission_fnc_fail"); 3 | (_this call AS_mission_fnc__getFailData) call AS_mission_fnc_execute; 4 | [_this, "status", "completed"] call AS_mission_fnc_set; 5 | -------------------------------------------------------------------------------- /Antistasi/mission/fnc_set.sqf: -------------------------------------------------------------------------------- 1 | #include "../macros.hpp" 2 | AS_SERVER_ONLY("AS_mission_fnc_set"); 3 | params ["_mission", "_property", "_value"]; 4 | [call AS_mission_fnc_dictionary, _mission, _property, _value] call DICT_fnc_setGlobal 5 | -------------------------------------------------------------------------------- /Antistasi/dialogs/buyVehicle/cfgFunctions.hpp: -------------------------------------------------------------------------------- 1 | FNC_UI_PREFIX(dialogs,buyVehicle,menu); 2 | FNC_UI_PREFIX(dialogs,buyVehicle,buy); 3 | FNC_UI_PREFIX(dialogs,buyVehicle,updateList); 4 | FNC_UI_PREFIX(dialogs,buyVehicle,updateVehicleData); 5 | -------------------------------------------------------------------------------- /Antistasi/mission/fnc_deinitialize.sqf: -------------------------------------------------------------------------------- 1 | #include "../macros.hpp" 2 | AS_SERVER_ONLY("AS_mission_fnc_deinitialize"); 3 | if ([AS_container, "mission"] call DICT_fnc_exists) then { 4 | [AS_container, "mission"] call DICT_fnc_del; 5 | }; 6 | -------------------------------------------------------------------------------- /Antistasi/scheduler/fnc_sendStatus.sqf: -------------------------------------------------------------------------------- 1 | // client side: send status information to the server 2 | private _data = [AS_FPSsamples, hasInterface, isDedicated]; 3 | 4 | [clientOwner, _data] remoteExec ["AS_scheduler_fnc_receiveStatus", 2]; 5 | -------------------------------------------------------------------------------- /Antistasi/dialogs/startMenu/fnc_UI_menu.sqf: -------------------------------------------------------------------------------- 1 | disableSerialization; 2 | createDialog "AS_startMenu"; 3 | 4 | // allow the player to enter in the Arma menu without closing this menu 5 | (findDisplay 1601) displayRemoveAllEventHandlers "KeyDown"; 6 | -------------------------------------------------------------------------------- /Antistasi/aaf_arsenal/fnc_set.sqf: -------------------------------------------------------------------------------- 1 | #include "../macros.hpp" 2 | AS_SERVER_ONLY("AS_AAFarsenal_fnc_set"); 3 | params ["_category", "_property", "_value"]; 4 | [call AS_AAFarsenal_fnc_dictionary, _category, _property, _value] call DICT_fnc_setGlobal; 5 | -------------------------------------------------------------------------------- /Antistasi/fia_recruitment/fnc_spawnFIAUnit.sqf: -------------------------------------------------------------------------------- 1 | params ["_type", "_position", "_group"]; 2 | private _unit = _group createUnit [_type call AS_fnc_getFIAUnitClass, _position, [], 0, "NONE"]; 3 | _unit setVariable ["AS_type", _type, true]; 4 | _unit 5 | -------------------------------------------------------------------------------- /Antistasi/mission/spawn/fnc_wait_spawn.sqf: -------------------------------------------------------------------------------- 1 | params ["_mission"]; 2 | 3 | private _task = ([_mission, "CREATED"] call AS_mission_spawn_fnc_loadTask) call BIS_fnc_setTask; 4 | 5 | [_mission, "resources", [_task, [], [], []]] call AS_spawn_fnc_set; 6 | -------------------------------------------------------------------------------- /Antistasi/spawn/fnc_initialize.sqf: -------------------------------------------------------------------------------- 1 | /* 2 | Description: 3 | Initializes the spawn system 4 | */ 5 | #include "../macros.hpp" 6 | AS_SERVER_ONLY("AS_spawn_fnc_initialize"); 7 | [AS_container, "spawn", call DICT_fnc_create] call DICT_fnc_setGlobal; 8 | -------------------------------------------------------------------------------- /Antistasi/dialogs/loadMenu/cfgFunctions.hpp: -------------------------------------------------------------------------------- 1 | FNC_UI_PREFIX(dialogs,loadMenu,menu); 2 | FNC_UI_PREFIX(dialogs,loadMenu,update); 3 | FNC_UI_PREFIX(dialogs,loadMenu,load); 4 | FNC_UI_PREFIX(dialogs,loadMenu,delete); 5 | FNC_UI_PREFIX(dialogs,loadMenu,close); 6 | -------------------------------------------------------------------------------- /Antistasi/dialogs/manageMissions/cfgFunctions.hpp: -------------------------------------------------------------------------------- 1 | FNC_UI_PREFIX(dialogs,manageMissions,menu); 2 | FNC_UI_PREFIX(dialogs,manageMissions,updateList); 3 | FNC_UI_PREFIX(dialogs,manageMissions,updatePanel); 4 | FNC_UI_PREFIX(dialogs,manageMissions,activate); 5 | -------------------------------------------------------------------------------- /Antistasi/medical/fnc_getAssignedMedic.sqf: -------------------------------------------------------------------------------- 1 | params ["_target"]; 2 | if (not hasACEMedical) then { 3 | _target getVariable ["AS_medical_assignedMedic", objNull] 4 | } else { 5 | _target getVariable ["ace_medical_ai_assignedMedic", objNull] 6 | }; 7 | -------------------------------------------------------------------------------- /Antistasi/dictionary/fnc_copy.sqf: -------------------------------------------------------------------------------- 1 | // Sets the value of the key of the dictionary. Use multiple keys for nested operation. 2 | #include "macros.hpp" 3 | params ["_dictionary", ["_ignore_keys", []]]; 4 | [_dictionary, _ignore_keys, false] call EFUNC(_copy); 5 | -------------------------------------------------------------------------------- /Antistasi/aaf_arsenal/fnc_fromDict.sqf: -------------------------------------------------------------------------------- 1 | #include "../macros.hpp" 2 | AS_SERVER_ONLY("AS_AAFarsenal_fnc_fromDict"); 3 | params ["_dict"]; 4 | call AS_AAFarsenal_fnc_deinitialize; 5 | [AS_container, "aaf_arsenal", _dict call DICT_fnc_copy] call DICT_fnc_setGlobal; 6 | -------------------------------------------------------------------------------- /Antistasi/dialogs/manageHQ/cfgFunctions.hpp: -------------------------------------------------------------------------------- 1 | FNC_UI_PREFIX(dialogs,manageHQ,menu); 2 | FNC_UI_PREFIX(dialogs,manageHQ,move); 3 | FNC_UI_PREFIX(dialogs,manageHQ,rebuild); 4 | FNC_UI_PREFIX(dialogs,manageHQ,takeMoney); 5 | FNC_UI_PREFIX(dialogs,manageHQ,upgrade); 6 | -------------------------------------------------------------------------------- /Antistasi/dictionary/fnc_copyGlobal.sqf: -------------------------------------------------------------------------------- 1 | // Sets the value of the key of the dictionary. Use multiple keys for nested operation. 2 | #include "macros.hpp" 3 | params ["_dictionary", ["_ignore_keys", []]]; 4 | [_dictionary, _ignore_keys, true] call EFUNC(_copy); 5 | -------------------------------------------------------------------------------- /Antistasi/mission/fnc_createDefendCity.sqf: -------------------------------------------------------------------------------- 1 | #include "../macros.hpp" 2 | AS_SERVER_ONLY("fnc_createDefendCity"); 3 | params ["_location"]; 4 | 5 | private _mission = ["defend_city", _location] call AS_mission_fnc_add; 6 | _mission call AS_mission_fnc_activate; 7 | -------------------------------------------------------------------------------- /Antistasi/fia_recruitment/fnc_getFIASquadName.sqf: -------------------------------------------------------------------------------- 1 | params ["_type"]; 2 | 3 | private _index = (["FIA", "squads"] call AS_fnc_getEntity) find _type; 4 | if (_index == -1) exitWith {"Unnamed squad"}; 5 | 6 | (["FIA", "squad_names"] call AS_fnc_getEntity) select _index 7 | -------------------------------------------------------------------------------- /Antistasi/medical/fnc_isHealed.sqf: -------------------------------------------------------------------------------- 1 | // Used by non-ACE to test whether the unit is healed or not 2 | params ["_unit"]; 3 | { 4 | if ((_unit getHit _x) > 0.8) exitWith {false}; 5 | true 6 | } forEach ["neck","head","pelvis","spine1","spine2","spine3","body",""] 7 | -------------------------------------------------------------------------------- /Antistasi/mission/fnc_success.sqf: -------------------------------------------------------------------------------- 1 | #include "../macros.hpp" 2 | AS_SERVER_ONLY("AS_mission_fnc_success"); 3 | (_this call AS_mission_fnc__getSuccessData) call AS_mission_fnc_execute; 4 | [_this, "status", "completed"] call AS_mission_fnc_set; 5 | ["mis"] call fnc_BE_XP; 6 | -------------------------------------------------------------------------------- /Antistasi/dialogs/manageMissions/fnc_UI_activate.sqf: -------------------------------------------------------------------------------- 1 | disableSerialization; 2 | private _mission = lbData [0, lbCurSel 0]; 3 | 4 | if (_mission != "") then { 5 | [_mission] remoteExec ["AS_mission_fnc_activate", 2]; 6 | } else { 7 | hint "No mission selected"; 8 | }; 9 | -------------------------------------------------------------------------------- /Antistasi/location/fnc_S.sqf: -------------------------------------------------------------------------------- 1 | // returns all locations of a given side 2 | if (_this isEqualType []) exitWith { 3 | (call AS_location_fnc_all) select {(_x call AS_location_fnc_side) in _this} 4 | }; 5 | (call AS_location_fnc_all) select {_x call AS_location_fnc_side == _this} 6 | -------------------------------------------------------------------------------- /Antistasi/location/fnc_T.sqf: -------------------------------------------------------------------------------- 1 | // returns all locations of a given type 2 | if (_this isEqualType []) exitWith { 3 | (call AS_location_fnc_all) select {(_x call AS_location_fnc_type) in _this} 4 | }; 5 | (call AS_location_fnc_all) select {_x call AS_location_fnc_type == _this} 6 | -------------------------------------------------------------------------------- /Antistasi/fnc_setSide.sqf: -------------------------------------------------------------------------------- 1 | params ["_unit", "_side"]; 2 | 3 | if not (_side in ["FIA", "AAF", "NATO", "CSAT", "CIV"]) then { 4 | diag_log format ["[AS] Error: %1 was initialized with invalid side '%2'", _unit, _side]; 5 | }; 6 | 7 | _unit setVariable ["AS_side", _side, true]; 8 | -------------------------------------------------------------------------------- /Antistasi/dialogs/buyVehicle/fnc_UI_buy.sqf: -------------------------------------------------------------------------------- 1 | // action button to buy the vehicle 2 | disableSerialization; 3 | private _class = lbData [0, lbCurSel 0]; 4 | 5 | if (_class != "") then { 6 | [_class] call AS_fnc_buyFIAvehicle; 7 | } else { 8 | hint "No vehicle selected"; 9 | }; 10 | -------------------------------------------------------------------------------- /Antistasi/dialogs/loadMenu/fnc_UI_update.sqf: -------------------------------------------------------------------------------- 1 | disableSerialization; 2 | private _cbo = ((findDisplay 1601) displayCtrl (0)); 3 | lbCLear _cbo; 4 | 5 | { 6 | _cbo lbAdd(_x); 7 | _cbo lbSetData[(lbSize _cbo)-1, _x]; 8 | } forEach AS_database_savedGames; 9 | _cbo lbSetCurSel 0; 10 | -------------------------------------------------------------------------------- /Antistasi/fnc_HQdeletePad.sqf: -------------------------------------------------------------------------------- 1 | #include "macros.hpp" 2 | AS_SERVER_ONLY("fnc_hq_deletePad.sqf"); 3 | 4 | if not(isNil "vehiclePad") then { 5 | deleteVehicle vehiclePad; 6 | vehiclePad = nil; 7 | publicVariable "vehiclePad"; 8 | }; 9 | AS_Sset("AS_vehicleOrientation", 0); 10 | -------------------------------------------------------------------------------- /Antistasi/fnc_getSide.sqf: -------------------------------------------------------------------------------- 1 | params ["_unit"]; 2 | 3 | private _side = _unit getVariable "AS_side"; 4 | 5 | if (isNil "_side") then { 6 | _side = "UNKNOWN"; 7 | diag_log format ["[AS] Error: %1 (%2) was initialized without side", _unit, typeOf _unit]; 8 | }; 9 | 10 | _side 11 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/terrain/Init.sqf: -------------------------------------------------------------------------------- 1 | 2 | UPSMON_TerraCognita = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\terrain\fnc\UPSMON_TerraCognita.sqf"; 3 | UPSMON_sample_terrain = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\terrain\fnc\UPSMON_sample_terrain.sqf"; 4 | -------------------------------------------------------------------------------- /Antistasi/dialogs/recruitSquad/fnc_UI_recruit.sqf: -------------------------------------------------------------------------------- 1 | disableSerialization; 2 | private _id = lbCurSel 0; 3 | private _squadName = lbData [0, _id]; 4 | 5 | if (_squadName != "") then { 6 | [_squadName] spawn AS_fnc_recruitFIAsquad; 7 | } else { 8 | hint "no squad selected"; 9 | }; 10 | -------------------------------------------------------------------------------- /Antistasi/mission/fnc_name.sqf: -------------------------------------------------------------------------------- 1 | params ["_mission"]; 2 | private _location = _mission call AS_mission_fnc_location; 3 | 4 | private _name = _mission call AS_mission_fnc_title; 5 | if (_location != "") then { 6 | _name = _name + " at " + ([_location] call AS_fnc_location_name); 7 | }; 8 | _name 9 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/MP/init.sqf: -------------------------------------------------------------------------------- 1 | 2 | UPSMON_fnc_setVehicleInit = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\MP\fnc\UPSMON_fnc_setVehicleInit.sqf"; 3 | UPSMON_fnc_setVehicleVarName = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\MP\fnc\UPSMON_fnc_setVehicleVarName.sqf"; -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/MODULES/ORDERS/UPSMON_RELAX/Init.sqf: -------------------------------------------------------------------------------- 1 | UPSMON_DORELAX = compile preProcessFileLineNumbers "Scripts\UPSMON\MODULES\ORDERS\UPSMON_RELAX\fnc\UPSMON_DORELAX.sqf"; 2 | UPSMON_Civaction = compile preProcessFileLineNumbers "Scripts\UPSMON\MODULES\ORDERS\UPSMON_RELAX\fnc\UPSMON_Civaction.sqf"; -------------------------------------------------------------------------------- /Antistasi/dialogs/newGame/cfgFunctions.hpp: -------------------------------------------------------------------------------- 1 | FNC_UI_PREFIX(dialogs,newGame,menu); 2 | FNC_UI_PREFIX(dialogs,newGame,close); 3 | FNC_UI_PREFIX(dialogs,newGame,update); 4 | FNC_UI_PREFIX(dialogs,newGame,cycleDifficulty); 5 | FNC_UI_PREFIX(dialogs,newGame,selectHQ); 6 | FNC_UI_PREFIX(dialogs,newGame,start); 7 | -------------------------------------------------------------------------------- /Antistasi/location/fnc_getCityRoads.sqf: -------------------------------------------------------------------------------- 1 | params ["_position", "_size"]; 2 | 3 | private _roads = []; 4 | { 5 | private _roadcon = roadsConnectedto _x; 6 | if (count _roadcon == 2) then { 7 | _roads pushBack _x; 8 | }; 9 | } forEach (_position nearRoads _size); 10 | _roads 11 | -------------------------------------------------------------------------------- /Antistasi/location/fnc_getNameSize.sqf: -------------------------------------------------------------------------------- 1 | params ["_name", "_min"]; 2 | private _sizeX = getNumber (configFile >> "CfgWorlds" >> worldName >> "Names" >> _name >> "radiusA"); 3 | private _sizeY = getNumber (configFile >> "CfgWorlds" >> worldName >> "Names" >> _name >> "radiusB"); 4 | (_sizeX max _sizeY) max _min 5 | -------------------------------------------------------------------------------- /Antistasi/arsenal/fnc_emptyUnit.sqf: -------------------------------------------------------------------------------- 1 | params ["_unit"]; 2 | 3 | // see http://stackoverflow.com/a/43189968/7808917 4 | removeAllWeapons _unit; 5 | removeAllItems _unit; 6 | removeAllAssignedItems _unit; 7 | removeVest _unit; 8 | removeBackpack _unit; 9 | removeHeadgear _unit; 10 | removeGoggles _unit; 11 | -------------------------------------------------------------------------------- /Antistasi/mission/fnc_activate.sqf: -------------------------------------------------------------------------------- 1 | #include "../macros.hpp" 2 | AS_SERVER_ONLY("AS_mission_fnc_activate"); 3 | params ["_mission"]; 4 | [_mission, "status", "active"] call AS_mission_fnc_set; 5 | [_mission, "mission"] call AS_spawn_fnc_add; 6 | [[_mission], "AS_spawn_fnc_execute"] call AS_scheduler_fnc_execute; 7 | -------------------------------------------------------------------------------- /Antistasi/reinitY.sqf: -------------------------------------------------------------------------------- 1 | if (isNil "gameMenu") exitWith { 2 | gameMenu = (findDisplay 46) displayAddEventHandler ["KeyDown",AS_fnc_EH_KeyDown]; 3 | }; 4 | 5 | (findDisplay 46) displayRemoveEventHandler ["KeyDown", gameMenu]; 6 | gameMenu = (findDisplay 46) displayAddEventHandler ["KeyDown",AS_fnc_EH_KeyDown]; 7 | -------------------------------------------------------------------------------- /Antistasi/aaf_arsenal/fnc_addVehicle.sqf: -------------------------------------------------------------------------------- 1 | // Adds a vehicle to the arsenal. 2 | // Returns whether it was added or not 3 | #include "../macros.hpp" 4 | AS_SERVER_ONLY("AS_AAFarsenal_fnc_addVehicle"); 5 | private _count = _this call AS_AAFarsenal_fnc_count; 6 | [_this, "count", _count + 1] call AS_AAFarsenal_fnc_set; 7 | -------------------------------------------------------------------------------- /Antistasi/fia_recruitment/fnc_getFIASquadCost.sqf: -------------------------------------------------------------------------------- 1 | // Returns [cost,HR] of the squad type. 2 | params ["_type"]; 3 | private _cost = 0; 4 | private _hr = 0; 5 | { 6 | _cost = _cost + (_x call AS_fnc_getCost); 7 | _hr = _hr + 1; 8 | } forEach (["FIA", _type] call AS_fnc_getEntity); 9 | [_hr, _cost] 10 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/MODULES/ORDERS/UPSMON_PATROL/Init.sqf: -------------------------------------------------------------------------------- 1 | 2 | UPSMON_DOPATROL = compile preProcessFileLineNumbers "Scripts\UPSMON\MODULES\ORDERS\UPSMON_PATROL\fnc\UPSMON_DOPATROL.sqf"; 3 | UPSMON_SrchPtrlPos = compile preProcessFileLineNumbers "Scripts\UPSMON\MODULES\ORDERS\UPSMON_PATROL\fnc\UPSMON_SrchPtrlPos.sqf"; 4 | -------------------------------------------------------------------------------- /Antistasi/aaf_arsenal/fnc_category.sqf: -------------------------------------------------------------------------------- 1 | // given a vehicle type (`typeOf _veh`), returns its category (or "" if it belongs to none) 2 | params ["_type"]; 3 | private _category = ""; 4 | { 5 | if (_type in (_x call AS_AAFarsenal_fnc_valid)) exitWith {_category = _x;}; 6 | } forEach call AS_AAFarsenal_fnc_all; 7 | _category 8 | -------------------------------------------------------------------------------- /Antistasi/spawn/fnc_add.sqf: -------------------------------------------------------------------------------- 1 | params ["_name", "_type"]; 2 | diag_log format ["[AS] %1: new spawn '%2'", clientOwner, _name]; 3 | [call AS_spawn_fnc_dictionary, _name, call DICT_fnc_create] call DICT_fnc_setGlobal; 4 | [_name, "state_index", 0] call AS_spawn_fnc_set; 5 | [_name, "spawn_type", _type] call AS_spawn_fnc_set; 6 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/MODULES/ORDERS/UPSMON_DEFEND/Init.sqf: -------------------------------------------------------------------------------- 1 | 2 | UPSMON_DODEFEND = compile preProcessFileLineNumbers "Scripts\UPSMON\MODULES\ORDERS\UPSMON_DEFEND\fnc\UPSMON_DODEFEND.sqf"; 3 | UPSMON_SrchGuardPos = compile preProcessFileLineNumbers "Scripts\UPSMON\MODULES\ORDERS\UPSMON_DEFEND\fnc\UPSMON_SrchGuardPos.sqf"; 4 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/MODULES/ORDERS/UPSMON_RETREAT/Init.sqf: -------------------------------------------------------------------------------- 1 | 2 | UPSMON_DORETREAT = compile preProcessFileLineNumbers "Scripts\UPSMON\MODULES\ORDERS\UPSMON_RETREAT\fnc\UPSMON_DORETREAT.sqf"; 3 | UPSMON_SrchRetreatPos = compile preProcessFileLineNumbers "Scripts\UPSMON\MODULES\ORDERS\UPSMON_RETREAT\fnc\UPSMON_SrchRetreatPos.sqf"; -------------------------------------------------------------------------------- /Antistasi/fia_recruitment/fnc_UI_dismissSelected.sqf: -------------------------------------------------------------------------------- 1 | if (count groupselectedUnits player > 0) exitWith { 2 | [groupselectedUnits player] call AS_fnc_dismissFIAunits; 3 | }; 4 | if (count hcSelected player > 0) exitWith { 5 | [hcSelected player] call AS_fnc_dismissFIAsquads; 6 | }; 7 | hint "No units or squads selected"; 8 | -------------------------------------------------------------------------------- /Antistasi/medical/templates/fnc_FIAuniformMeds.sqf: -------------------------------------------------------------------------------- 1 | if hasACEmedical exitWith { 2 | if (ace_medical_level == 1) then { 3 | [["ACE_fieldDressing", 8], ["ACE_morphine", 4], ["ACE_epinephrine", 4], ["ACE_bloodIV_250", 2]] 4 | }; 5 | // todo: add ACE lvl 2 6 | [["FirstAidKit", 3]] 7 | }; 8 | [["FirstAidKit", 3]] 9 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/MODULES/Init.sqf: -------------------------------------------------------------------------------- 1 | 2 | UPSMON_CLONES = compile preProcessFileLineNumbers "Scripts\UPSMON\MODULES\UPSMON_CLONES.sqf"; 3 | 4 | UPSMON_RESPAWN = compile preProcessFileLineNumbers "Scripts\UPSMON\MODULES\UPSMON_RESPAWN.sqf"; 5 | UPSMON_SPAWN = compile preProcessFileLineNumbers "Scripts\UPSMON\MODULES\UPSMON_SPAWN.sqf"; -------------------------------------------------------------------------------- /Antistasi/dialogs/recruitUnit/dialogs.hpp: -------------------------------------------------------------------------------- 1 | class AS_RecruitUnit 2 | { 3 | idd=1602; 4 | movingenable=false; 5 | 6 | class controls 7 | { 8 | AS_DIALOG(5,"Recruit unit", "closeDialog 0;"); 9 | 10 | LIST_L(0,1,0,4,""); 11 | 12 | BTN_R(5,4,"Recruit selected", "", "[] call AS_fnc_UI_recruitUnit_recruit;"); 13 | }; 14 | }; 15 | -------------------------------------------------------------------------------- /Antistasi/mission/spawn/fnc_clean.sqf: -------------------------------------------------------------------------------- 1 | params ["_mission"]; 2 | ([_mission, "resources"] call AS_spawn_fnc_get) params ["_task", "_groups", "_vehicles", "_markers"]; 3 | 4 | {AS_commander hcRemoveGroup _x} forEach _groups; 5 | [_groups, _vehicles, _markers] call AS_fnc_cleanResources; 6 | sleep 30; 7 | [_task] call BIS_fnc_deleteTask; 8 | -------------------------------------------------------------------------------- /Antistasi/dialogs/manageTraits/fnc_UI_select.sqf: -------------------------------------------------------------------------------- 1 | disableSerialization; 2 | params ["_list_id"]; 3 | private _trait = lbData [_list_id, lbCurSel _list_id]; 4 | 5 | if (_trait != "") then { 6 | private _textCbo = ((findDisplay 1601) displayCtrl 1); 7 | _textCbo ctrlSetText ([AS_traits, _trait, "description"] call DICT_fnc_get); 8 | }; 9 | -------------------------------------------------------------------------------- /Antistasi/dictionary/fnc_exists.sqf: -------------------------------------------------------------------------------- 1 | // Checks whether a key exists in the dictionary. Use multiple keys for nested operation 2 | #include "macros.hpp" 3 | 4 | if (count _this < 2) exitWith { 5 | diag_log format ["DICT:get(%1):ERROR: requires 2 arguments", _this]; 6 | }; 7 | private _value = _this call EFUNC(_get); 8 | not isNil "_value" 9 | -------------------------------------------------------------------------------- /Antistasi/fnc_location_canBeDestroyed.sqf: -------------------------------------------------------------------------------- 1 | #include "macros.hpp" 2 | params ["_location", "_civilians"]; 3 | 4 | while {_location call AS_location_fnc_spawned} do { 5 | if ({(alive _x) and (not(isNull _x))} count _civilians == 0) exitWith { 6 | [_location] remoteExec ["AS_fnc_destroy_location", 2]; 7 | }; 8 | sleep 5; 9 | }; 10 | -------------------------------------------------------------------------------- /Antistasi/location/fnc_remove.sqf: -------------------------------------------------------------------------------- 1 | #include "../macros.hpp" 2 | AS_SERVER_ONLY("AS_location_fnc_remove"); 3 | params ["_location"]; 4 | [call AS_location_fnc_dictionary, _location] call DICT_fnc_del; 5 | 6 | // the hidden marker 7 | deleteMarker _location; 8 | 9 | // the shown marker 10 | deleteMarker (format ["Dum%1", _location]); 11 | -------------------------------------------------------------------------------- /Antistasi/mission/fnc_fromDict.sqf: -------------------------------------------------------------------------------- 1 | #include "../macros.hpp" 2 | AS_SERVER_ONLY("AS_mission_fnc_fromDict"); 3 | params ["_dict"]; 4 | call AS_mission_fnc_deinitialize; 5 | [AS_container, "mission", _dict call DICT_fnc_copy] call DICT_fnc_setGlobal; 6 | 7 | {_x call AS_mission_fnc_activate} forEach ([] call AS_mission_fnc_active_missions); 8 | -------------------------------------------------------------------------------- /Antistasi/database/fnc_apply_migration.sqf: -------------------------------------------------------------------------------- 1 | params ["_dict", "_version"]; 2 | 3 | { 4 | private _step = [AS_database_migrations, _version, _x] call DICT_fnc_get; 5 | if (typeName _step == "ARRAY") then { 6 | ([_dict] + _step) call DICT_fnc_set; 7 | } 8 | } forEach ([AS_database_migrations, _version, "steps"] call DICT_fnc_get); 9 | -------------------------------------------------------------------------------- /Antistasi/debug/cfgFunctions.hpp: -------------------------------------------------------------------------------- 1 | class AS_debug { 2 | class server { 3 | INIT_FNC(debug,init); 4 | }; 5 | 6 | class common { 7 | FNC(debug,toggle); 8 | FNC(debug,initDead); 9 | FNC(debug,initLocation); 10 | FNC(debug,initUnit); 11 | FNC(debug,initVehicle); 12 | }; 13 | }; 14 | -------------------------------------------------------------------------------- /Antistasi/dialogs/recruitSquad/fnc_UI_updateList.sqf: -------------------------------------------------------------------------------- 1 | disableSerialization; 2 | private _cbo = ((findDisplay 1602) displayCtrl (0)); 3 | lbCLear _cbo; 4 | 5 | { 6 | _cbo lbAdd (_x call AS_fnc_getFIASquadName); 7 | _cbo lbSetData[(lbSize _cbo)-1, _x]; 8 | } forEach (["FIA", "squads"] call AS_fnc_getEntity); 9 | _cbo lbSetCurSel 0; 10 | -------------------------------------------------------------------------------- /Antistasi/fnc_enemiesNearby.sqf: -------------------------------------------------------------------------------- 1 | params ["_position", "_distance"]; 2 | 3 | private _enemiesNearby = false; 4 | { 5 | if (((_x call AS_fnc_getSide) in ["AAF", "CSAT"]) and 6 | {_x distance _position < _distance} and 7 | {not(captive _x)}) exitWith {_enemiesNearby = true}; 8 | } forEach allUnits; 9 | 10 | _enemiesNearby 11 | -------------------------------------------------------------------------------- /Antistasi/ai_control/fnc_dropAIcontrol.sqf: -------------------------------------------------------------------------------- 1 | private _owner = player getVariable ["AS_controller", player]; 2 | if (_owner == player) exitWith { 3 | diag_log format ["[AS] Error: AS_fnc_dropAIcontrol: cannot drop control without controlling a unit", player]; 4 | }; 5 | 6 | player setVariable ["AS_controller", nil, true]; 7 | selectPlayer _owner; 8 | -------------------------------------------------------------------------------- /Antistasi/dialogs/manageHQ/fnc_UI_move.sqf: -------------------------------------------------------------------------------- 1 | if ((count weaponCargo caja > 0) or 2 | (count magazineCargo caja > 0) or 3 | (count itemCargo caja > 0) or 4 | (count backpackCargo caja > 0)) exitWith { 5 | hint "The Ammobox must be empty to move the HQ"; 6 | }; 7 | 8 | [] remoteExec ["AS_fnc_HQmove", 2]; 9 | closeDialog 0; 10 | -------------------------------------------------------------------------------- /Antistasi/dialogs/manageLocations/fnc_UI_updateList.sqf: -------------------------------------------------------------------------------- 1 | disableSerialization; 2 | 3 | // Fill types list 4 | private _cbo = ((findDisplay 1602) displayCtrl 0); 5 | lbCLear _cbo; 6 | { 7 | _cbo lbAdd(format ["%1", _x]); 8 | _cbo lbSetData[(lbSize _cbo)-1, _x]; 9 | } forEach ["roadblock","watchpost","camp"]; 10 | _cbo lbSetCurSel 0; 11 | -------------------------------------------------------------------------------- /Antistasi/dialogs/recruitUnit/fnc_UI_updateList.sqf: -------------------------------------------------------------------------------- 1 | disableSerialization; 2 | private _cbo = ((findDisplay 1602) displayCtrl (0)); 3 | lbCLear _cbo; 4 | 5 | { 6 | _cbo lbAdd(format ["%1 (%2€)", _x, _x call AS_fnc_getCost]); 7 | _cbo lbSetData[(lbSize _cbo)-1, _x]; 8 | } forEach AS_allFIARecruitableSoldiers; 9 | _cbo lbSetCurSel 0; 10 | -------------------------------------------------------------------------------- /Antistasi/dialogs/manageLocations/cfgFunctions.hpp: -------------------------------------------------------------------------------- 1 | FNC_UI_PREFIX(dialogs,manageLocations,menu); 2 | FNC_UI_PREFIX(dialogs,manageLocations,updateList); 3 | FNC_UI_PREFIX(dialogs,manageLocations,selectOnMap); 4 | FNC_UI_PREFIX(dialogs,manageLocations,add); 5 | FNC_UI_PREFIX(dialogs,manageLocations,abandon); 6 | FNC_UI_PREFIX(dialogs,manageLocations,rename); 7 | -------------------------------------------------------------------------------- /Antistasi/dialogs/recruitSquad/dialogs.hpp: -------------------------------------------------------------------------------- 1 | class AS_recruitSquad 2 | { 3 | idd=1602; 4 | movingenable=false; 5 | 6 | class controls 7 | { 8 | AS_DIALOG(5,"Recruit squads", "closeDialog 0;"); 9 | 10 | LIST_L(0,1,0,4,""); 11 | 12 | BTN_R(5,4,"Recruit selected", "Recruit the squad", "[] call AS_fnc_UI_recruitSquad_recruit;"); 13 | }; 14 | }; 15 | -------------------------------------------------------------------------------- /Antistasi/fnc_resetPetrosPosition.sqf: -------------------------------------------------------------------------------- 1 | #include "macros.hpp" 2 | AS_SERVER_ONLY("fnc_resetPetrosPosition.sqf"); 3 | private _dir = fuego getdir cajaVeh; 4 | private _defPos = [getPos fuego, 3, _dir + 45] call BIS_Fnc_relPos; 5 | 6 | petros setPos _defPos; 7 | petros setDir (petros getDir fuego); 8 | 9 | diag_log "[AS] Server: Petros repositioned"; 10 | -------------------------------------------------------------------------------- /Antistasi/medical/templates/fnc_crateMeds.sqf: -------------------------------------------------------------------------------- 1 | if hasACEmedical exitWith { 2 | if (ace_medical_level == 1) then { 3 | [["ACE_fieldDressing", 30], ["ACE_morphine", 25], ["ACE_epinephrine", 20], ["ACE_bloodIV", 10]] 4 | }; 5 | // todo: add ACE lvl 2 6 | [["FirstAidKit", 10], ["Medikit", 1]] 7 | }; 8 | [["FirstAidKit", 10], ["Medikit", 1]] 9 | -------------------------------------------------------------------------------- /Antistasi/dialogs/manageGarrisons/cfgFunctions.hpp: -------------------------------------------------------------------------------- 1 | FNC_UI_PREFIX(dialogs,manageGarrisons,menu); 2 | FNC_UI_PREFIX(dialogs,manageGarrisons,updateList); 3 | FNC_UI_PREFIX(dialogs,manageGarrisons,selectOnMap); 4 | FNC_UI_PREFIX(dialogs,manageGarrisons,onMapClick); 5 | FNC_UI_PREFIX(dialogs,manageGarrisons,recruit); 6 | FNC_UI_PREFIX(dialogs,manageGarrisons,dismiss); 7 | -------------------------------------------------------------------------------- /Antistasi/fnc_location_isPowered.sqf: -------------------------------------------------------------------------------- 1 | #include "macros.hpp" 2 | params ["_location"]; 3 | 4 | private _power = ["powerplant" call AS_location_fnc_T, _location call AS_location_fnc_position] call BIS_fnc_nearestPosition; 5 | 6 | if (_power in AS_P("destroyedLocations")) exitWith {false}; 7 | 8 | (_location call AS_location_fnc_side) == (_power call AS_location_fnc_side) 9 | -------------------------------------------------------------------------------- /Antistasi/fnc_oneStepMission.sqf: -------------------------------------------------------------------------------- 1 | params ["_fnc_missionFailedCondition", "_fnc_missionFailed", 2 | "_fnc_missionSuccessfulCondition", "_fnc_missionSuccessful"]; 3 | 4 | waitUntil {sleep 5; False or _fnc_missionFailedCondition or _fnc_missionSuccessfulCondition}; 5 | 6 | if (call _fnc_missionFailedCondition) then _fnc_missionFailed else _fnc_missionSuccessful; 7 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/MODULES/ORDERS/UPSMON_Transport/fnc/UPSMON_KeepAltitude.sqf: -------------------------------------------------------------------------------- 1 | private ["_transport","_diff","_time"]; 2 | 3 | _transport = _this select 0; 4 | 5 | _time = time + 60; 6 | _orgpos = (getposASL _transport) select 2; 7 | 8 | While {alive _transport && _time > time} do 9 | { 10 | _transport flyInHeight UPSMON_paraflyinheight; 11 | sleep 0.1; 12 | }; -------------------------------------------------------------------------------- /Antistasi/medical/fnc_clearAssignedMedic.sqf: -------------------------------------------------------------------------------- 1 | params ["_unit", "_medic"]; 2 | if not hasACEmedical then { 3 | _unit setVariable ["AS_medical_assignedMedic", nil]; 4 | _medic setVariable ["AS_medical_assignedPatient", nil]; 5 | } else { 6 | _unit setVariable ["ace_medical_ai_assignedMedic", objNull]; 7 | _medic setVariable ["ace_medical_ai_healQueue", []]; 8 | }; 9 | -------------------------------------------------------------------------------- /Antistasi/scheduler/cfgFunctions.hpp: -------------------------------------------------------------------------------- 1 | class AS_scheduler { 2 | class server { 3 | FNC(scheduler,getWorker); 4 | FNC(scheduler,execute); 5 | FNC(scheduler,receiveStatus); 6 | }; 7 | class common { 8 | FNC(scheduler,initialize); 9 | FNC(scheduler,sendStatus); 10 | FNC(scheduler,measureFPS); 11 | }; 12 | }; 13 | -------------------------------------------------------------------------------- /Antistasi/fnc_antennaKilledEH.sqf: -------------------------------------------------------------------------------- 1 | #include "macros.hpp" 2 | params ["_antenna"]; 3 | AS_Pset("antenasPos_alive", AS_P("antenasPos_alive") - [getPos _antenna]); 4 | AS_Pset("antenasPos_dead", AS_P("antenasPos_dead") + [getPos _antenna]); 5 | [["TaskSucceeded", ["", "Radio Tower Destroyed"]],"BIS_fnc_showNotification"] call BIS_fnc_MP; 6 | _antenna removeAllEventHandlers "Killed"; 7 | -------------------------------------------------------------------------------- /Antistasi/fnc_rearmPetros.sqf: -------------------------------------------------------------------------------- 1 | #include "macros.hpp" 2 | AS_SERVER_ONLY("AS_fnc_rearmPetros.sqf"); 3 | private _mag = currentMagazine petros; 4 | petros removeMagazines _mag; 5 | petros removeWeaponGlobal (primaryWeapon petros); 6 | [petros, selectRandom (AAFWeapons arrayIntersect (AS_weapons select 0)), 5, 0] call BIS_fnc_addWeapon; 7 | petros selectweapon primaryWeapon petros; 8 | -------------------------------------------------------------------------------- /Antistasi/aaf_arsenal/fnc_deleteVehicle.sqf: -------------------------------------------------------------------------------- 1 | // Removes the vehicle type from the arsenal. 2 | #include "../macros.hpp" 3 | AS_SERVER_ONLY("AS_AAFarsenal_fnc_deleteVehicle"); 4 | params ["_type"]; 5 | private _category = [_type] call AS_AAFarsenal_fnc_category; 6 | private _count = _category call AS_AAFarsenal_fnc_count; 7 | [_category, "count", _count - 1] call AS_AAFarsenal_fnc_set; 8 | -------------------------------------------------------------------------------- /Antistasi/fnc_getCitiesToCivPatrol.sqf: -------------------------------------------------------------------------------- 1 | private _position = _this call AS_location_fnc_position; 2 | 3 | private _cities = []; 4 | 5 | { 6 | private _positionOther = _x call AS_location_fnc_position; 7 | if (_positionOther distance _position < 3000 and _x != _this) then { 8 | _cities pushBack _x; 9 | }; 10 | } forEach (call AS_location_fnc_cities); 11 | 12 | _cities 13 | -------------------------------------------------------------------------------- /Antistasi/fnc_isAdmin.sqf: -------------------------------------------------------------------------------- 1 | params ["_player"]; 2 | 3 | if (isServer) then { 4 | // admin == 2: is logged in admin 5 | (not isMultiplayer) or {admin owner _player == 2} or {owner _player == 2} 6 | } else { 7 | // admin function is server-only, detect permissions via serverCommandAvailable (just like CBA's IS_ADMIN macro) 8 | serverCommandAvailable "#kick" 9 | } 10 | -------------------------------------------------------------------------------- /Antistasi/fnc_shuffle.sqf: -------------------------------------------------------------------------------- 1 | // suffle array using in-place Fisher-Yates 2 | private ["_j", "_t"]; 3 | for "_i" from count _this - 1 to 1 step -1 do { 4 | //Select random index 5 | _j = floor random (_i + 1); 6 | 7 | //Swap 8 | if (_i != _j) then { 9 | _t = _this select _i; 10 | _this set [_i, _this select _j]; 11 | _this set [_j, _t]; 12 | }; 13 | }; 14 | 15 | _this 16 | -------------------------------------------------------------------------------- /Antistasi/fnc_getFactionSide.sqf: -------------------------------------------------------------------------------- 1 | #include "macros.hpp" 2 | params ["_faction"]; 3 | 4 | if (_faction in ["AAF", "CSAT"]) exitWith { 5 | [west, east] select (AS_P("player_side") == "west") 6 | }; 7 | if (_faction in ["FIA", "NATO"]) exitWith { 8 | [east, west] select (AS_P("player_side") == "west") 9 | }; 10 | diag_log format ["[AS] Error: faction '%1' invalid", _faction]; 11 | -------------------------------------------------------------------------------- /Antistasi/dialogs/loadMenu/fnc_UI_load.sqf: -------------------------------------------------------------------------------- 1 | disableSerialization; 2 | 3 | private _id = lbCurSel 0; 4 | 5 | // Exit if no save selected 6 | if (_id == -1) exitWith { 7 | hint "No save selected."; 8 | }; 9 | 10 | private _saveName = lbData [0, _id]; 11 | hint format ["Loading save '%1'...", _saveName]; 12 | [_saveName] remoteExec ["AS_database_fnc_loadGame", 2]; 13 | closeDialog 0; 14 | -------------------------------------------------------------------------------- /Antistasi/dialogs/manageMissions/fnc_UI_updateList.sqf: -------------------------------------------------------------------------------- 1 | disableSerialization; 2 | private _cbo = ((findDisplay 1602) displayCtrl 0); 3 | lbCLear _cbo; 4 | 5 | { 6 | _cbo lbAdd (_x call AS_mission_fnc_name); 7 | _cbo lbSetData[(lbSize _cbo)-1, _x]; 8 | } forEach (call AS_mission_fnc_available_missions); 9 | 10 | _cbo lbSetCurSel 0; 11 | call AS_fnc_UI_manageMissions_updatePanel; 12 | -------------------------------------------------------------------------------- /Antistasi/dialogs/manageHQ/fnc_UI_upgrade.sqf: -------------------------------------------------------------------------------- 1 | #include "../../macros.hpp" 2 | 3 | if (BE_currentStage == 3) exitWith { 4 | hint "No further training available."; 5 | }; 6 | private _price = call fnc_BE_calcPrice; 7 | if (AS_P("resourcesFIA") > _price) then { 8 | [] remoteExec ["fnc_BE_upgrade", 2]; 9 | hint "FIA upgraded"; 10 | } else { 11 | hint "Not enough money."; 12 | }; 13 | -------------------------------------------------------------------------------- /Antistasi/fnc_getCost.sqf: -------------------------------------------------------------------------------- 1 | // _this is a string 2 | if (typeName _this != "STRING") exitWith { 3 | diag_log format ["[AS] Error: getCost: '%1' is not a string.", _this]; 4 | 0 5 | }; 6 | private _cost = AS_data_allCosts getVariable _this; 7 | 8 | if isNil "_cost" then { 9 | diag_log format ["[AS] Error: cost of '%1' not defined.", _this]; 10 | _cost = 0; 11 | }; 12 | _cost 13 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/MODULES/AMBUSH/Init.sqf: -------------------------------------------------------------------------------- 1 | 2 | UPSMON_FindAmbushPos = compile preProcessFileLineNumbers "Scripts\UPSMON\MODULES\AMBUSH\fnc\UPSMON_FindAmbushPos.sqf"; 3 | UPSMON_getAmbushpos = compile preProcessFileLineNumbers "Scripts\UPSMON\MODULES\AMBUSH\fnc\UPSMON_getAmbushpos.sqf"; 4 | UPSMON_SetAmbush = compile preProcessFileLineNumbers "Scripts\UPSMON\MODULES\AMBUSH\fnc\UPSMON_SetAmbush.sqf"; 5 | -------------------------------------------------------------------------------- /Antistasi/dialogs/buyVehicle/dialogs.hpp: -------------------------------------------------------------------------------- 1 | class AS_buyVehicle { 2 | idd=1602; 3 | movingenable=false; 4 | 5 | class controls 6 | { 7 | AS_DIALOG(5,"Buy vehicles", "closeDialog 0;"); 8 | 9 | LIST_L(0,1,0,4,"call AS_fnc_UI_buyVehicle_updateVehicleData;"); 10 | READ(1,1,1,4,"Vehicle information"); 11 | 12 | BTN_R(5,-1,"Buy selected", "", "[] call AS_fnc_UI_buyVehicle_buy;"); 13 | }; 14 | }; 15 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/vehicles/fnc/UPSMON_Allowgetin.sqf: -------------------------------------------------------------------------------- 1 | /**************************************************************** 2 | File: UPSMON_Allowgetin.sqf 3 | Author: MONSADA 4 | 5 | Description: 6 | Allow unit to move in vehicle 7 | Parameter(s): 8 | <--- unit 9 | Returns: 10 | Nothing 11 | ****************************************************************/ 12 | [_this] allowGetIn true; 13 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/MODULES/UPSMON_ModifyUcthis.sqf: -------------------------------------------------------------------------------- 1 | 2 | private ["_npc"]; 3 | 4 | _npc = _this select 0; 5 | _grp = group _npc; 6 | 7 | If (!IsNull _npc && alive _npc && _grp in UPSMON_NPCs) then 8 | { 9 | _grp setvariable ["UPSMON_Removegroup",true]; 10 | 11 | waituntil {!alive _npc || !(_grp in UPSMON_NPCs)}; 12 | 13 | If (alive _npc) then 14 | { 15 | _this spawn UPSMON; 16 | }; 17 | }; -------------------------------------------------------------------------------- /Antistasi/initialization/server_side_variables.sqf: -------------------------------------------------------------------------------- 1 | [] call fnc_BE_initialize; 2 | 3 | "spawnNATO" setMarkerType (["NATO", "flag_marker"] call AS_fnc_getEntity); 4 | "spawnNATO" setMarkerText ((["NATO", "name"] call AS_fnc_getEntity) + " Carrier"); 5 | "spawnCSAT" setMarkerType (["CSAT", "flag_marker"] call AS_fnc_getEntity); 6 | "spawnCSAT" setMarkerText ((["CSAT", "name"] call AS_fnc_getEntity) + " Carrier"); 7 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/Cover/init.sqf: -------------------------------------------------------------------------------- 1 | 2 | UPSMON_fnc_move_to_cover = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Cover\fnc\UPSMON_fnc_move_to_cover.sqf"; 3 | 4 | UPSMON_fnc_find_cover = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Cover\fnc\UPSMON_fnc_find_cover.sqf"; 5 | UPSMON_fnc_filter = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Cover\fnc\UPSMON_fnc_filter.sqf"; 6 | -------------------------------------------------------------------------------- /Antistasi/fnc_selectNewHQ.sqf: -------------------------------------------------------------------------------- 1 | #include "macros.hpp" 2 | AS_CLIENT_ONLY("fnc_selectNewHQ"); 3 | 4 | AS_commander allowDamage false; 5 | "Petros is Dead" hintC "Petros has been killed. You lost part of your assets and need to select a new HQ position far from the enemies."; 6 | 7 | private _position = [false] call AS_fnc_UI_newGame_selectHQ; 8 | 9 | [_position, false] remoteExec ["AS_fnc_HQplace", 2]; 10 | -------------------------------------------------------------------------------- /Antistasi/movement/cfgFunctions.hpp: -------------------------------------------------------------------------------- 1 | class AS_movement { 2 | 3 | class server { 4 | FNC(movement,sendAAFroadPatrol); 5 | FNC(movement,sendAAFpatrol); 6 | FNC(movement,sendEnemyQRF); 7 | FNC(movement,sendAAFattack); 8 | }; 9 | 10 | class common { 11 | INIT_FNC(movement\spawns,AAFpatrol); 12 | INIT_FNC(movement\spawns,AAFroadPatrol); 13 | }; 14 | }; 15 | -------------------------------------------------------------------------------- /Antistasi/players/fnc_loadLocal.sqf: -------------------------------------------------------------------------------- 1 | #include "../macros.hpp" 2 | AS_CLIENT_ONLY("fnc_loadLocal"); 3 | private _player = player getVariable ["AS_controller", player]; 4 | 5 | _player setUnitRank ([player, "rank"] call AS_players_fnc_get); 6 | { 7 | _player setUnitTrait [[AS_traits, _x, "trait"] call DICT_fnc_get, true]; 8 | } forEach ([player, "traits"] call AS_players_fnc_get); 9 | hint "Profile loaded."; 10 | -------------------------------------------------------------------------------- /Antistasi/players/fnc_set.sqf: -------------------------------------------------------------------------------- 1 | #include "../macros.hpp" 2 | AS_SERVER_ONLY("players_fnc_change"); 3 | params ["_player", "_attribute", "_value"]; 4 | private _id = getPlayerUID _player; 5 | if not ([AS_container, "players", _id] call DICT_fnc_exists) then { 6 | [AS_container, "players", _id, call DICT_fnc_create] call DICT_fnc_setGlobal; 7 | }; 8 | [AS_container, "players", _id, _attribute, _value] call DICT_fnc_setGlobal; 9 | -------------------------------------------------------------------------------- /Antistasi/scheduler/fnc_execute.sqf: -------------------------------------------------------------------------------- 1 | // selects a worker and remotely executes a given function on it. 2 | #include "../macros.hpp" 3 | AS_SERVER_ONLY("fnc_execute"); 4 | params ["_arguments", "_functionName"]; 5 | 6 | diag_log format ["[AS] Server: scheduler_fnc_execute(%1):", _functionName]; 7 | private _worker_id = call AS_scheduler_fnc_getWorker; 8 | 9 | _arguments remoteExec [_functionName, _worker_id, false]; 10 | -------------------------------------------------------------------------------- /Antistasi/scheduler/fnc_measureFPS.sqf: -------------------------------------------------------------------------------- 1 | // sampling rate of FPS 2 | #define SECONDS_PER_SAMPLE 2 3 | 4 | private _FPSindex = 0; // the next index of AS_FPSsamples to be updated 5 | while {true} do { 6 | sleep SECONDS_PER_SAMPLE; 7 | AS_FPSsamples set [_FPSindex, diag_fps]; 8 | _FPSindex = _FPSindex + 1; 9 | if (_FPSindex == count AS_FPSsamples) then { 10 | _FPSindex = 0; 11 | }; 12 | }; 13 | -------------------------------------------------------------------------------- /Antistasi/actions/heal.sqf: -------------------------------------------------------------------------------- 1 | _pos = _this select 0; 2 | 3 | { 4 | if ((side _x == ("FIA" call AS_fnc_getFactionSide)) and (_x distance _pos < 20)) then { 5 | if (hasACE) then { 6 | [_x, _x] call ace_medical_fnc_treatmentAdvanced_fullHeal; 7 | } else { 8 | _x setDamage 0; 9 | }; 10 | }; 11 | } forEach allUnits; 12 | 13 | hint "Your stomach stopped growling.\n\n Get back in the fight, soldier!"; 14 | -------------------------------------------------------------------------------- /Antistasi/dialogs/manageGarrisons/fnc_UI_onMapClick.sqf: -------------------------------------------------------------------------------- 1 | private _location = _this call AS_location_fnc_nearest; 2 | private _side = _location call AS_location_fnc_side; 3 | private _position = _location call AS_location_fnc_position; 4 | if (_side != "FIA") exitWith {hint "This zone does not belong to FIA";}; 5 | if (_position distance _this > 200) exitWith {hint "You must click near a marked zone";}; 6 | map_location = _location; 7 | -------------------------------------------------------------------------------- /Antistasi/dialogs/manageMissions/dialogs.hpp: -------------------------------------------------------------------------------- 1 | class AS_ManageMissions 2 | { 3 | idd=1602; 4 | movingenable=false; 5 | 6 | class controls 7 | { 8 | AS_DIALOG(8,"Manage missions", "closeDialog 0;"); 9 | 10 | LIST_L(0,1,0,7,"call AS_fnc_UI_manageMissions_updatePanel;"); 11 | READ(1,1,1,7, "Mission information"); 12 | 13 | BTN_R(8,-1,"Start selected", "", "call AS_fnc_UI_manageMissions_activate;"); 14 | }; 15 | }; 16 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/Get_pos/UPSMON_pos_fnc_getpos.sqf: -------------------------------------------------------------------------------- 1 | // In: [position,distance,direction] 2 | // Out: position 3 | private ["_pos","_dst","_dir","_orgX","_orgY","_posX","_posY"]; 4 | _pos = _this select 0; 5 | _dst = _this select 1; 6 | _dir = _this select 2; 7 | 8 | _orgX = _pos select 0; 9 | _orgY = _pos select 1; 10 | _posX = _orgX + (_dst * sin _dir); 11 | _posY = _orgY + (_dst * cos _dir); 12 | 13 | [_posX,_posY,0] -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/Get_pos/UPSMON_pos_fnc_issameposition.sqf: -------------------------------------------------------------------------------- 1 | // In: [array1,array2] 2 | // Out: boolean 3 | 4 | private ["_p1","_p2","_return"]; 5 | _p1 = _this select 0; 6 | _p2 = _this select 1; 7 | _return = true; 8 | 9 | // Only compare X and Y coordinates, ignore Z. 10 | for "_i" from 0 to 1 do { 11 | if ((_p1 select _i) != (_p2 select _i)) exitwith { 12 | _return = false; 13 | }; 14 | }; 15 | 16 | _return -------------------------------------------------------------------------------- /Antistasi/location/fnc_TS.sqf: -------------------------------------------------------------------------------- 1 | // returns all locations of a given type and side 2 | params ["_type", "_side"]; 3 | 4 | if (_type isEqualType []) exitWith { 5 | (call AS_location_fnc_all) select {_x call AS_location_fnc_side == _side and 6 | (_x call AS_location_fnc_type) in _type} 7 | }; 8 | 9 | (call AS_location_fnc_all) select {_x call AS_location_fnc_side == _side and 10 | _x call AS_location_fnc_type == _type} 11 | -------------------------------------------------------------------------------- /Antistasi/medical/fnc_initUnit.sqf: -------------------------------------------------------------------------------- 1 | params ["_unit"]; 2 | if !hasACEmedical then { 3 | _unit addEventHandler ["HandleDamage", AS_fnc_EH_handleDamage]; 4 | if isPlayer _unit then { 5 | [_unit] spawn AS_medical_fnc_effectsLoop; 6 | }; 7 | } else { 8 | _unit addEventHandler ["HandleDamage", AS_fnc_EH_handleDamageACE]; 9 | }; 10 | // loop for AI functionality 11 | [_unit] spawn AS_medical_fnc_medicLoop; 12 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/Get_pos/UPSMON_pos_fnc_rotateposition.sqf: -------------------------------------------------------------------------------- 1 | // In: [position,direction] 2 | // Out: position 3 | private ["_pos","_dir","_orgX","_orgY","_newX","_newY"]; 4 | _pos = _this select 0; 5 | _dir = _this select 1; 6 | 7 | _orgX = _pos select 0; 8 | _orgY = _pos select 1; 9 | 10 | _newX = (_orgX * (cos _dir)) - (_orgY * (sin _dir)); 11 | _newY = (_orgX * (sin _dir)) + (_orgY * (cos _dir)); 12 | 13 | [_newX,_newY] -------------------------------------------------------------------------------- /Antistasi/dictionary/fnc_get.sqf: -------------------------------------------------------------------------------- 1 | // Gets the value from key of the dictionary. Use multiple keys for nested operation 2 | #include "macros.hpp" 3 | 4 | if (count _this < 2) exitWith { 5 | diag_log format ["DICT:get(%1):ERROR: requires 2 arguments", _this]; 6 | }; 7 | private _value = _this call EFUNC(_get); 8 | if isNil "_value" exitWith { 9 | diag_log format ["DICT:get(%1):ERROR: invalid key", _this]; 10 | }; 11 | _value 12 | -------------------------------------------------------------------------------- /Antistasi/location/fnc_spawn.sqf: -------------------------------------------------------------------------------- 1 | // Spawns a location 2 | // use `_location` to normal spawn, 3 | // use `[_location, true]` to forced spawn 4 | #include "../macros.hpp" 5 | AS_SERVER_ONLY("AS_location_fnc_spawn"); 6 | params ["_location", ["_forced", false]]; 7 | if _forced then { 8 | [_location,"forced_spawned",true] call AS_location_fnc_set; 9 | } else { 10 | [_location,"spawned",true] call AS_location_fnc_set; 11 | }; 12 | -------------------------------------------------------------------------------- /Antistasi/database/fnc_getAdmin.sqf: -------------------------------------------------------------------------------- 1 | #include "../macros.hpp" 2 | AS_SERVER_ONLY("AS_database_fnc_getAdmin"); 3 | 4 | // in singleplayer/hosted MPs, the host (ownerID 2) is automatically the admin 5 | if not isDedicated exitWith {2}; 6 | 7 | // in dedicated MPs, admin is the logged admin 8 | private _admin = -1; 9 | { 10 | if (_x call AS_fnc_isAdmin) exitWith {_admin = owner _x}; 11 | } forEach allPlayers; 12 | _admin 13 | -------------------------------------------------------------------------------- /Antistasi/fnc_spawnComposition.sqf: -------------------------------------------------------------------------------- 1 | params ["_location"]; 2 | private _objects = []; 3 | if ([AS_compositions, "locations", _location] call DICT_fnc_exists) then { 4 | private _center = [AS_compositions, "locations", _location, "center"] call DICT_fnc_get; 5 | private _objects = [AS_compositions, "locations", _location, "objects"] call DICT_fnc_get; 6 | _objects = [_center, 0, _objects] call BIS_fnc_ObjectsMapper; 7 | }; 8 | _objects 9 | -------------------------------------------------------------------------------- /Antistasi/init.sqf: -------------------------------------------------------------------------------- 1 | enableSaving [false, false]; 2 | 3 | if hasInterface then { 4 | // this has to be scheduled because the server is waiting for clients. 5 | [] execVM "initialization\client.sqf"; 6 | } else { 7 | if not isDedicated then { 8 | [] execVM "initialization\headlessClient.sqf"; 9 | }; 10 | }; 11 | if isServer then { 12 | [] execVM "initialization\server.sqf"; 13 | }; 14 | 15 | #include "Scripts\SHK_Fastrope.sqf" 16 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/MODULES/ORDERS/UPSMON_ASSAULT/Init.sqf: -------------------------------------------------------------------------------- 1 | 2 | UPSMON_DOASSAULT = compile preProcessFileLineNumbers "Scripts\UPSMON\MODULES\ORDERS\UPSMON_ASSAULT\fnc\UPSMON_DOASSAULT.sqf"; 3 | UPSMON_PLANASSLT = compile preProcessFileLineNumbers "Scripts\UPSMON\MODULES\ORDERS\UPSMON_ASSAULT\fnc\UPSMON_PLANASSLT.sqf"; 4 | 5 | UPSMON_Assltbld = compile preProcessFileLineNumbers "Scripts\UPSMON\MODULES\ORDERS\UPSMON_ASSAULT\fnc\UPSMON_Assltbld.sqf"; -------------------------------------------------------------------------------- /Antistasi/dialogs/loadMenu/fnc_UI_menu.sqf: -------------------------------------------------------------------------------- 1 | disableSerialization; 2 | createDialog "AS_loadMenu"; 3 | 4 | [] call AS_fnc_UI_loadMenu_update; 5 | 6 | // catch the escape so that the player returns to the previous menu 7 | (findDisplay 1601) displayAddEventHandler ["KeyDown", { 8 | if ((_this select 1) == 1) exitWith { // escape pressed 9 | [] spawn AS_fnc_UI_loadMenu_close; 10 | true 11 | }; 12 | false 13 | }]; 14 | -------------------------------------------------------------------------------- /Antistasi/dialogs/newGame/fnc_UI_menu.sqf: -------------------------------------------------------------------------------- 1 | disableSerialization; 2 | createDialog "AS_newGameMenu"; 3 | 4 | ["west"] call AS_fnc_UI_newGame_update; 5 | 6 | // catch the escape so the player returns to the previous menu 7 | (findDisplay 1601) displayAddEventHandler ["KeyDown", { 8 | if ((_this select 1) == 1) exitWith { // escape pressed 9 | [] spawn AS_fnc_UI_newGame_close; 10 | true 11 | }; 12 | false 13 | }]; 14 | -------------------------------------------------------------------------------- /Antistasi/fnc_cleanGarbage.sqf: -------------------------------------------------------------------------------- 1 | [[petros,"hint","Deleting Garbage..."],"AS_fnc_localCommunication"] call BIS_fnc_MP; 2 | 3 | private _toDelete = nearestObjects [markerPos "AS_base_4", ["WeaponHolderSimulated", "GroundWeaponHolder", "WeaponHolder"], 16000]; 4 | { 5 | deleteVehicle _x; 6 | } forEach _toDelete; 7 | {deleteVehicle _x} forEach allDead; 8 | 9 | [[petros,"hint","Garbage deleted"],"AS_fnc_localCommunication"] call BIS_fnc_MP; 10 | -------------------------------------------------------------------------------- /Antistasi/location/fnc_addRoadblock.sqf: -------------------------------------------------------------------------------- 1 | #include "../macros.hpp" 2 | AS_SERVER_ONLY("AS_location_fnc_addRoadblock"); 3 | params ["_location", "_position"]; 4 | private _name = format ["roadblock_%1_%2", round (_position select 0), round (_position select 1)]; 5 | private _roadblock = createMarker [_name, _position]; 6 | [_roadblock, "roadblock"] call AS_location_fnc_add; 7 | [_roadblock, "location", _location] call AS_location_fnc_set; 8 | _roadblock 9 | -------------------------------------------------------------------------------- /Antistasi/AI/attackDrill.sqf: -------------------------------------------------------------------------------- 1 | params ["_location", "_group"]; 2 | 3 | private _posicion = _location call AS_location_fnc_position; 4 | private _size = _location call AS_location_fnc_size; 5 | 6 | waitUntil {sleep 5; (leader _group distance _posicion < _size) or ({alive _x} count units _group == 0)}; 7 | 8 | if (leader _group distance _posicion < _size) then { 9 | [leader _group, _location, "COMBAT","SPAWNED","NOFOLLOW"] spawn UPSMON; 10 | }; 11 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/Core/fnc/UPSMON_StrLen.sqf: -------------------------------------------------------------------------------- 1 | /**************************************************************** 2 | File: UPSMON_StrLen.sqf 3 | Author: KRONZKY 4 | 5 | Description: 6 | 7 | Parameter(s): 8 | 9 | Returns: 10 | 11 | ****************************************************************/ 12 | private["_in","_arr","_len"]; 13 | 14 | _in=_this select 0; 15 | _arr=[_in] call UPSMON_StrToArray; 16 | _len=count (_arr); 17 | _len -------------------------------------------------------------------------------- /Antistasi/medical/templates/fnc_FIAmedicBackpack.sqf: -------------------------------------------------------------------------------- 1 | if hasACEmedical exitWith { 2 | if (ace_medical_level == 1) then { 3 | // order matters: items will be add sequentially until bag is full. 4 | [["ACE_fieldDressing", 30], ["ACE_morphine", 25], ["ACE_epinephrine", 20], ["ACE_bloodIV", 5]] 5 | }; 6 | // todo: add ACE lvl 2 7 | [["FirstAidKit", 10], ["Medikit", 1]] 8 | }; 9 | [["FirstAidKit", 10], ["Medikit", 1]] 10 | -------------------------------------------------------------------------------- /Antistasi/AI/fnc_dismountOnDanger.sqf: -------------------------------------------------------------------------------- 1 | private ["_grupo","_modo"]; 2 | 3 | _grupo = _this select 0; 4 | 5 | while {{alive _x} count units _grupo > 0} do 6 | { 7 | sleep 3; 8 | _modo = behaviour leader _grupo; 9 | 10 | if (_modo != "SAFE") then 11 | { 12 | {[_x] orderGetIn false; [_x] allowGetIn false} forEach units _grupo; 13 | } 14 | else 15 | { 16 | {[_x] orderGetIn true; [_x] allowGetIn true} forEach units _grupo; 17 | }; 18 | }; -------------------------------------------------------------------------------- /Antistasi/fnc_changeAAFmoney.sqf: -------------------------------------------------------------------------------- 1 | #include "macros.hpp" 2 | AS_SERVER_ONLY("AS_fnc_changeAAFmoney.sqf"); 3 | if (!isPlayer AS_commander) exitWith {}; 4 | 5 | waitUntil {sleep 5; isNil "AS_resourcesIsChanging"}; 6 | AS_resourcesIsChanging = true; 7 | 8 | params [["_variation", 0]]; 9 | 10 | private _resourcesAAF = (AS_P("resourcesAAF") + _variation) max 0; 11 | 12 | AS_Pset("resourcesAAF", _resourcesAAF); 13 | 14 | AS_resourcesIsChanging = nil; 15 | -------------------------------------------------------------------------------- /Antistasi/location/fnc_despawn.sqf: -------------------------------------------------------------------------------- 1 | // despawns a location 2 | // use `_location` to normal despawn, 3 | // use `[_location, true]` to forced despawn 4 | #include "../macros.hpp" 5 | AS_SERVER_ONLY("AS_location_fnc_despawn"); 6 | params ["_location", ["_forced", false]]; 7 | 8 | if _forced then { 9 | [_location,"forced_spawned",false] call AS_location_fnc_set; 10 | } else { 11 | [_location,"spawned",false] call AS_location_fnc_set; 12 | }; 13 | -------------------------------------------------------------------------------- /Antistasi/ai_control/fnc_setAIControl.sqf: -------------------------------------------------------------------------------- 1 | if (_this call AS_fnc_controlsAI) exitWith { 2 | diag_log format ["[AS] Error: AS_fnc_setAIControl: trying to control a controlled unit", _this]; 3 | }; 4 | if (player call AS_fnc_controlsAI) exitWith { 5 | diag_log format ["[AS] Error: AS_fnc_setAIControl: trying to control unit while controlling a unit", player]; 6 | }; 7 | 8 | _this setVariable ["AS_controller", player, true]; 9 | selectPlayer _this; 10 | -------------------------------------------------------------------------------- /Antistasi/dialogs/manageGarrisons/fnc_UI_dismiss.sqf: -------------------------------------------------------------------------------- 1 | disableSerialization; 2 | private _name = lbData [3, lbCurSel 3]; 3 | private _location = ctrlText ((findDisplay 1602) displayCtrl 2); 4 | 5 | if (_name != "" and (_location call AS_location_fnc_side == "FIA")) then { 6 | [_name, _location] call AS_fnc_dismissFIAgarrison; 7 | call AS_fnc_UI_manageGarrisons_updateList; 8 | } else { 9 | hint "no unit selected or invalid location"; 10 | }; 11 | -------------------------------------------------------------------------------- /Antistasi/dialogs/manageGarrisons/fnc_UI_recruit.sqf: -------------------------------------------------------------------------------- 1 | disableSerialization; 2 | private _name = lbData [1, lbCurSel 1]; 3 | private _location = ctrlText ((findDisplay 1602) displayCtrl 2); 4 | 5 | if (_name != "" and (_location call AS_location_fnc_side == "FIA")) then { 6 | [_name, _location] call AS_fnc_recruitFIAgarrison; 7 | call AS_fnc_UI_manageGarrisons_updateList; 8 | } else { 9 | hint "no unit selected or invalid location"; 10 | }; 11 | -------------------------------------------------------------------------------- /Antistasi/mission/fnc_add.sqf: -------------------------------------------------------------------------------- 1 | #include "../macros.hpp" 2 | AS_SERVER_ONLY("AS_mission_fnc_add"); 3 | params ["_type", "_location"]; 4 | private _name = format ["%1_%2", _type, _location]; 5 | [call AS_mission_fnc_dictionary, _name, call DICT_fnc_create] call DICT_fnc_setGlobal; 6 | [_name, "status", "possible"] call AS_mission_fnc_set; 7 | [_name, "type", _type] call AS_mission_fnc_set; 8 | [_name, "location", _location] call AS_mission_fnc_set; 9 | _name 10 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/Core/fnc/UPSMON_distancePosSqr.sqf: -------------------------------------------------------------------------------- 1 | /**************************************************************** 2 | File: UPSMON_distancePosSqr.sqf 3 | Author: KRONZKY 4 | 5 | Description: 6 | 7 | Parameter(s): 8 | 9 | Returns: 10 | 11 | ****************************************************************/ 12 | round(((((_this select 0) select 0)-((_this select 1) select 0))^2 + (((_this select 0) select 1)-((_this select 1) select 1))^2)^0.5) -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/target/fnc/UPSMON_Eniesnear.sqf: -------------------------------------------------------------------------------- 1 | private ["_npc","_enies","_nbr","_unitsnear"]; 2 | 3 | _npc = _this select 0; 4 | _enies = _this select 1; 5 | 6 | _enies = _enies - _npc; 7 | _unitsnear = nearestobjects [getposATL _npc,["CAManBase","TANK","CAR"],100]; 8 | _nbr = 0; 9 | 10 | { 11 | If (alive _x) then 12 | { 13 | If (_x in _enies) then 14 | { 15 | _nbr = _nbr +1; 16 | }; 17 | } 18 | } foreach _unitsnear; 19 | 20 | _nbr -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/MODULES/ORDERS/UPSMON_REINFORCEMENT/Init.sqf: -------------------------------------------------------------------------------- 1 | 2 | UPSMON_GetReinfPos = compile preProcessFileLineNumbers "Scripts\UPSMON\MODULES\ORDERS\UPSMON_REINFORCEMENT\fnc\UPSMON_GetReinfPos.sqf"; 3 | UPSMON_CallRenf = compile preProcessFileLineNumbers "Scripts\UPSMON\MODULES\ORDERS\UPSMON_REINFORCEMENT\fnc\UPSMON_CallRenf.sqf"; 4 | UPSMON_ReinfChk = compile preProcessFileLineNumbers "Scripts\UPSMON\MODULES\ORDERS\UPSMON_REINFORCEMENT\fnc\UPSMON_ReinfChk.sqf"; -------------------------------------------------------------------------------- /Antistasi/arsenal/fnc_removeNightEquipment.sqf: -------------------------------------------------------------------------------- 1 | params ["_unit"]; 2 | 3 | // remove NV goggles 4 | private _nvg = hmd _unit; 5 | if (_nvg != "") then { 6 | _unit unlinkItem _nvg; 7 | }; 8 | // remove laser pointer and flashlight 9 | private _items = primaryWeaponItems _unit; 10 | { 11 | _unit unassignItem _x; 12 | _unit removePrimaryWeaponItem _x; 13 | } forEach ((AS_allLasers + AS_allFlashlights) arrayIntersect CSATItems arrayIntersect _items); 14 | -------------------------------------------------------------------------------- /Antistasi/dialogs/loadMenu/dialogs.hpp: -------------------------------------------------------------------------------- 1 | class AS_loadMenu 2 | { 3 | idd=1601; 4 | movingenable=false; 5 | 6 | class controls 7 | { 8 | AS_DIALOG(5,"Load game", "[] spawn AS_fnc_UI_loadMenu_close;"); 9 | 10 | LIST_L(0,1,0,4,""); 11 | BTN_L(5,-1,"Delete selected", "Delete the selected saved game", "[] spawn AS_fnc_UI_loadMenu_delete;"); 12 | 13 | BTN_R(5,-1,"Load game", "Load the selected saved game", "[] spawn AS_fnc_UI_loadMenu_load;"); 14 | }; 15 | }; 16 | -------------------------------------------------------------------------------- /Antistasi/dialogs/manageLocations/fnc_UI_add.sqf: -------------------------------------------------------------------------------- 1 | params ["_type", "_position"]; 2 | private _roads = _position nearRoads 50; 3 | if (_type == "roadblock" and count _roads == 0) exitWith { 4 | hint "Roadblocks have to be positioned close to roads"; 5 | }; 6 | if (count ("establish_fia_location" call AS_mission_fnc_active_missions) != 0) exitWith { 7 | hint "We are already building a location"; 8 | }; 9 | 10 | [_type, _position] call AS_fnc_addFIAlocation; 11 | -------------------------------------------------------------------------------- /Antistasi/fnc_getAllUnits.sqf: -------------------------------------------------------------------------------- 1 | // given a cfgGroup, returns all units on that cfg faction 2 | params ["_cfgGroups"]; 3 | private _result = []; 4 | { 5 | for "_i" from 0 to count _x - 1 do { 6 | private _unitConf = _x select _i; 7 | if (isClass _unitConf) then { 8 | _result pushBack (getText (_unitConf >> "vehicle")); 9 | }; 10 | }; 11 | } forEach ("true" configClasses _cfgGroups); 12 | _result arrayIntersect _result - [""] 13 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/Core/fnc/UPSMON_StrInStr.sqf: -------------------------------------------------------------------------------- 1 | /**************************************************************** 2 | File: UPSMON_StrInStr.sqf 3 | Author: KRONZKY 4 | 5 | Description: 6 | 7 | Parameter(s): 8 | 9 | Returns: 10 | 11 | ****************************************************************/ 12 | private["_out"]; 13 | 14 | _in=_this select 0; 15 | _out=if (([_this select 0,_this select 1] call UPSMON_StrIndex)==-1) then {false} else {true}; 16 | _out -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/Core/fnc/UPSMON_deleteDead.sqf: -------------------------------------------------------------------------------- 1 | /**************************************************************** 2 | File: UPSMON_deleteDead.sqf 3 | Author: KRONZKY 4 | 5 | Description: 6 | 7 | Parameter(s): 8 | 9 | Returns: 10 | 11 | ****************************************************************/ 12 | private["_u","_s"]; 13 | 14 | _u=_this select 0; 15 | _s= _this select 1; 16 | _u removeAllEventHandlers "killed"; 17 | sleep _s; 18 | deletevehicle _u -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/MODULES/ORDERS/UPSMON_PATROLSRCH/Init.sqf: -------------------------------------------------------------------------------- 1 | 2 | UPSMON_DOPATROLSRCH = compile preProcessFileLineNumbers "Scripts\UPSMON\MODULES\ORDERS\UPSMON_PATROLSRCH\fnc\UPSMON_DOPATROLSRCH.sqf"; 3 | UPSMON_SrchPtrlFlankPos = compile preProcessFileLineNumbers "Scripts\UPSMON\MODULES\ORDERS\UPSMON_PATROLSRCH\fnc\UPSMON_SrchPtrlFlankPos.sqf"; 4 | UPSMON_GETINPATROLSRCH = compile preProcessFileLineNumbers "Scripts\UPSMON\MODULES\ORDERS\UPSMON_PATROLSRCH\fnc\UPSMON_GETINPATROLSRCH.sqf"; 5 | -------------------------------------------------------------------------------- /Antistasi/fnc_dropArtilleryShells.sqf: -------------------------------------------------------------------------------- 1 | params ["_location"]; 2 | 3 | private _pos = _location call AS_location_fnc_position; 4 | private _cuenta = 0; 5 | while {(_cuenta < 50) and {!([300, _pos, "OPFORSpawn", "boolean"] call AS_fnc_unitsAtDistance)}} do { 6 | _cuenta = _cuenta + 1; 7 | sleep (5 + random 5); 8 | private _shell1 = "Sh_82mm_AMOS" createVehicle [_pos select 0 + (150 - (random 300)),_pos select 1 + (150 - (random 300)),200]; 9 | _shell1 setVelocity [0,0,-50]; 10 | }; 11 | -------------------------------------------------------------------------------- /Antistasi/ai_control/fnc_UI_controlUnit.sqf: -------------------------------------------------------------------------------- 1 | closeDialog 0; 2 | if ((count groupselectedUnits player != 1) and (count hcSelected player != 1)) exitWith { 3 | hint "You must select either a squad from the HC or a unit from your squad"; 4 | }; 5 | if (count groupselectedUnits player == 1) then { 6 | [groupselectedUnits player select 0] spawn AS_fnc_controlUnit; 7 | }; 8 | if (count hcSelected player == 1) then { 9 | [hcSelected player select 0] spawn AS_fnc_controlHCSquad; 10 | }; 11 | -------------------------------------------------------------------------------- /Antistasi/location/fnc_toDict.sqf: -------------------------------------------------------------------------------- 1 | // keys that are not to be saved. 2 | #include "../macros.hpp" 3 | AS_SERVER_ONLY("AS_location_fnc_toDict"); 4 | private _ignore_keys = []; 5 | { 6 | _ignore_keys append [[_x, "spawn"], [_x, "spawned", "forced_spawned"]]; 7 | if ((_x call AS_location_fnc_type) == "city") then { 8 | _ignore_keys pushBack [_x, "roads"]; 9 | }; 10 | } forEach call AS_location_fnc_all; 11 | [call AS_location_fnc_dictionary, _ignore_keys] call DICT_fnc_copy 12 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/Core/fnc/UPSMON_createsign.sqf: -------------------------------------------------------------------------------- 1 | /**************************************************************** 2 | File: UPSMON_createmarker.sqf 3 | Author: Azroul13 4 | 5 | Description: 6 | 7 | Parameter(s): 8 | 9 | Returns: 10 | 11 | ****************************************************************/ 12 | private["_pos","_sign","_type"]; 13 | 14 | _pos = _this select 0; 15 | _type = _this select 1; 16 | 17 | _sign = _type createvehicle [0,0,0]; 18 | _sign setpos _pos; 19 | -------------------------------------------------------------------------------- /Antistasi/fnc_revealToPlayer.sqf: -------------------------------------------------------------------------------- 1 | #include "macros.hpp" 2 | while {AS_S("revealFromRadio")} do { 3 | if ((player == leader group player) and ([player] call AS_fnc_hasRadio)) then { 4 | { 5 | private _lider = leader _x; 6 | if ((side _lider != ("FIA" call AS_fnc_getFactionSide)) and 7 | (vehicle _lider != _lider) and 8 | (player knowsAbout _lider < 1.5)) then { 9 | player reveal [_lider,4]; 10 | sleep 1; 11 | }; 12 | } forEach allGroups; 13 | }; 14 | sleep 10; 15 | }; 16 | -------------------------------------------------------------------------------- /Antistasi/aaf_arsenal/fnc_count.sqf: -------------------------------------------------------------------------------- 1 | // the current vehicles of a given category or list of categories. 2 | // If no argument is provided, returns all vehicles of all categories 3 | private _categories = _this; 4 | if (typeName _categories == "STRING") then { 5 | _categories = [_this]; 6 | }; 7 | if (isNil "_categories") then { 8 | _categories = call AS_AAFarsenal_fnc_all; 9 | }; 10 | private _all = 0; 11 | {_all = _all + ([_x, "count"] call AS_AAFarsenal_fnc_get)} forEach _categories; 12 | _all 13 | -------------------------------------------------------------------------------- /Antistasi/fnc_changeStreetLights.sqf: -------------------------------------------------------------------------------- 1 | #include "macros.hpp" 2 | AS_SERVER_ONLY("fnc_changeStreetLights.sqf"); 3 | params ["_location", "_onoff"]; 4 | 5 | private _position = _location call AS_location_fnc_position; 6 | private _size = _location call AS_location_fnc_size; 7 | 8 | private _damage = 0; 9 | if (not _onoff) then {_damage = 0.95;}; 10 | 11 | { 12 | private _lamps = _position nearObjects [_x, _size]; 13 | {sleep 0.5; _x setDamage _damage} forEach _lamps; 14 | } forEach AS_lampTypes; 15 | -------------------------------------------------------------------------------- /Antistasi/players/cfgFunctions.hpp: -------------------------------------------------------------------------------- 1 | #include "../hpp_macros.hpp" 2 | 3 | class AS_players { 4 | class server { 5 | FNC(players,initialize); 6 | FNC(players,deinitialize); 7 | FNC(players,toDict); 8 | FNC(players,fromDict); 9 | 10 | FNC(players,change); 11 | FNC(players,set); 12 | }; 13 | 14 | class common { 15 | FNC(players,get); 16 | }; 17 | 18 | class withInterface { 19 | FNC(players,loadLocal); 20 | }; 21 | }; 22 | -------------------------------------------------------------------------------- /Antistasi/aaf_arsenal/fnc_valid.sqf: -------------------------------------------------------------------------------- 1 | // the valid vehicles of a given category or list of categories. 2 | // If no argument is provided, returns all valid vehicles of all categories 3 | private _categories = _this; 4 | if (typeName _categories == "STRING") then { 5 | _categories = [_this]; 6 | }; 7 | if (isNil "_categories") then { 8 | _categories = call AS_AAFarsenal_fnc_all; 9 | }; 10 | private _all = []; 11 | {_all append ([_x, "valid"] call AS_AAFarsenal_fnc_get)} forEach _categories; 12 | _all 13 | -------------------------------------------------------------------------------- /Antistasi/dialogs/saveMenu/dialogs.hpp: -------------------------------------------------------------------------------- 1 | class AS_saveMenu 2 | { 3 | idd=1601; 4 | movingenable=false; 5 | 6 | class controls 7 | { 8 | AS_DIALOG(5,"Save game", "closeDialog 0;"); 9 | 10 | LIST_L(0,1,0,4,"[] call AS_fnc_UI_saveMenu_select;"); 11 | BTN_L(5,-1,"Delete selected", "Delete the selected saved game", "[] spawn AS_fnc_UI_loadMenu_delete;"); 12 | 13 | WRITE(1,1,2,""); 14 | BTN_R(2,-1,"Save game", "Save the game with the name given above", "[] spawn AS_fnc_UI_saveMenu_save;"); 15 | }; 16 | }; 17 | -------------------------------------------------------------------------------- /Antistasi/dictionary/macros.hpp: -------------------------------------------------------------------------------- 1 | #define EFUNC(name) DICT_fnc_##name 2 | #define ISOBJECT(_value) (typeName _value == "OBJECT") 3 | #define ISARRAY(_value) (typeName _value == "ARRAY") 4 | 5 | #define OB_SEPARATOR ((toString [13,10]) + "%%%>") 6 | #define OB_START ("%%%{" + (toString [13,10])) 7 | #define OB_END ((toString [13,10]) + "%%%}") 8 | #define AR_START ("%%%[" + (toString [13,10])) 9 | #define AR_END ((toString [13,10]) + "%%%]") 10 | 11 | #define TYPE_TO_STRING(_typeName) (_typeName select [0,2]) 12 | -------------------------------------------------------------------------------- /Antistasi/location/fnc_side.sqf: -------------------------------------------------------------------------------- 1 | params ["_location"]; 2 | if !(_location call AS_location_fnc_exists) exitWith {""}; 3 | private _type = _location call AS_location_fnc_type; 4 | if (_type != "city") exitWith { 5 | [_location, "side"] call AS_location_fnc_get 6 | }; 7 | private _FIAsupport = [_this,"FIAsupport"] call AS_location_fnc_get; 8 | private _AAFsupport = [_this,"AAFsupport"] call AS_location_fnc_get; 9 | if (_AAFsupport >= _FIAsupport) then { 10 | "AAF" 11 | } else { 12 | "FIA" 13 | }; 14 | -------------------------------------------------------------------------------- /Antistasi/spawn/cfgFunctions.hpp: -------------------------------------------------------------------------------- 1 | class AS_spawn { 2 | 3 | class server { 4 | FNC(spawn,initialize); 5 | FNC(spawn,drop); 6 | FNC(spawn,toggle); 7 | FNC(spawn,update); 8 | }; 9 | 10 | class common { 11 | FNC(spawn,states); 12 | FNC(spawn,dictionary); 13 | FNC(spawn,all); 14 | FNC(spawn,get); 15 | FNC(spawn,set); 16 | FNC(spawn,add); 17 | FNC(spawn,delete); 18 | FNC(spawn,execute); 19 | }; 20 | }; 21 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/Core/fnc/UPSMON_DeleteWP.sqf: -------------------------------------------------------------------------------- 1 | /**************************************************************** 2 | File: UPSMON_DeleteWP.sqf 3 | Author: Azroul13 4 | 5 | Description: 6 | delete waypoint for group 7 | Parameter(s): 8 | <--- group 9 | Returns: 10 | Nothing 11 | ****************************************************************/ 12 | private []; 13 | 14 | while {(count (waypoints _this)) > 0} do 15 | { 16 | deleteWaypoint ((waypoints _this) select 0); 17 | sleep 0.25; 18 | }; 19 | -------------------------------------------------------------------------------- /Antistasi/fnc_initUnitCSAT.sqf: -------------------------------------------------------------------------------- 1 | params ["_unit"]; 2 | 3 | _unit setVariable ["OPFORSpawn",true,true]; 4 | 5 | [_unit, "CSAT"] call AS_fnc_setSide; 6 | 7 | [_unit] call AS_debug_fnc_initUnit; 8 | 9 | [_unit] call AS_medical_fnc_initUnit; 10 | 11 | [_unit] call AS_fnc_setDefaultSkill; 12 | 13 | if (SunOrMoon > 1) then { 14 | _unit call AS_fnc_removeNightEquipment; 15 | }; 16 | 17 | _unit addEventHandler ["killed",AS_fnc_EH_AAFKilled]; 18 | 19 | _unit enableIRLasers true; 20 | _unit enableGunLights "AUTO"; 21 | -------------------------------------------------------------------------------- /Antistasi/fnc_rebuildLocation.sqf: -------------------------------------------------------------------------------- 1 | #include "macros.hpp" 2 | AS_SERVER_ONLY("fnc_rebuildLocation"); 3 | 4 | params ["_location"]; 5 | private _type = _location call AS_location_fnc_position; 6 | [0,10,_location call AS_location_fnc_position] call AS_fnc_changeCitySupport; 7 | [5,0] call AS_fnc_changeForeignSupport; 8 | AS_Pset("destroyedLocations", AS_P("destroyedLocations") - [_location]); 9 | if (_type == "powerplant") then {[_location] call AS_fnc_recomputePowerGrid}; 10 | [0,-5000] call AS_fnc_changeFIAmoney; 11 | -------------------------------------------------------------------------------- /Antistasi/fnc_updateDestroyedBuildings.sqf: -------------------------------------------------------------------------------- 1 | params ["_buildings"]; 2 | 3 | // locks to avoid race conditions 4 | waitUntil {isNil "AS_destroyingBuildings"}; 5 | AS_destroyingBuildings = true; 6 | 7 | private _destroyedBuildings = AS_P("destroyedBuildings"); 8 | { 9 | if ((!alive _x) and (not(_x in _destroyedBuildings))) then { 10 | _destroyedBuildings pushBack (position _x); 11 | }; 12 | } forEach _buildings; 13 | AS_Pset("destroyedBuildings", _destroyedBuildings); 14 | 15 | AS_destroyingBuildings = nil; 16 | -------------------------------------------------------------------------------- /Antistasi/location/fnc_removeRoadblocks.sqf: -------------------------------------------------------------------------------- 1 | #include "../macros.hpp" 2 | AS_SERVER_ONLY("AS_location_fnc_removeRoadblocks"); 3 | params [ "_location"]; 4 | 5 | private _roadblocks = ("roadblock" call AS_location_fnc_T) select {[_x,"location"] call AS_location_fnc_get == _location}; 6 | { 7 | [_x] spawn { 8 | params ["_roadblock"]; 9 | waitUntil {sleep 5; !(_roadblock call AS_location_fnc_spawned)}; 10 | _roadblock call AS_location_fnc_remove; 11 | }; 12 | } forEach _roadblocks; 13 | -------------------------------------------------------------------------------- /Antistasi/mission/fnc_active_missions.sqf: -------------------------------------------------------------------------------- 1 | // return all active missions of a given list of types 2 | private _missionTypes = _this; 3 | if (typeName _missionTypes == "STRING") then { 4 | _missionTypes = [_missionTypes]; 5 | }; 6 | if (count _missionTypes == 0) exitWith { 7 | (call AS_mission_fnc_all) select {_x call AS_mission_fnc_status == "active"} 8 | }; 9 | (call AS_mission_fnc_all) select { 10 | _x call AS_mission_fnc_status == "active" and 11 | _x call AS_mission_fnc_type in _missionTypes} 12 | -------------------------------------------------------------------------------- /Antistasi/mission/fnc_create.sqf: -------------------------------------------------------------------------------- 1 | #include "../macros.hpp" 2 | AS_SERVER_ONLY("AS_mission_fnc_create"); 3 | params ["_type", "_NATOsupport", ["_params", []]]; 4 | private _mission = [_type, ""] call AS_mission_fnc_add; 5 | [-_NATOsupport, 0] call AS_fnc_changeForeignSupport; 6 | [_mission, "NATOsupport", AS_P("NATOsupport")] call AS_mission_fnc_set; 7 | { 8 | _x params ["_name", "_value"]; 9 | [_mission, _name, _value] call AS_mission_fnc_set; 10 | } forEach _params; 11 | _mission call AS_mission_fnc_activate; 12 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/unit/fnc/UPSMON_DoSmokeScreen.sqf: -------------------------------------------------------------------------------- 1 | /**************************************************************** 2 | File: UPSMON_throw_grenade.sqf 3 | Author: MONSADA 4 | 5 | Description: 6 | Throw a grenade 7 | Parameter(s): 8 | 9 | Returns: 10 | 11 | ****************************************************************/ 12 | private["_npc","_time"]; 13 | 14 | _npc = _this select 0; 15 | 16 | _npc fire "SmokeLauncher"; 17 | _time = time + 20; 18 | (group _npc) setvariable ["UPSMON_SmokeTime",_time]; 19 | -------------------------------------------------------------------------------- /Antistasi/dialogs/newGame/fnc_UI_cycleDifficulty.sqf: -------------------------------------------------------------------------------- 1 | disableSerialization; 2 | 3 | private _control = (findDisplay 1601) displayCtrl 4; 4 | 5 | private _bla = ctrlText _control; 6 | 7 | private _valid_difficulties = ["normal", "easy"]; 8 | 9 | private _index = _valid_difficulties find _bla; 10 | // if not found, index == -1, which fine 11 | 12 | if (_index == count _valid_difficulties - 1) then { 13 | _index = -1; 14 | }; 15 | _index = _index + 1; 16 | 17 | _control ctrlSetText (_valid_difficulties select _index); 18 | -------------------------------------------------------------------------------- /Antistasi/dialogs/startMenu/dialogs.hpp: -------------------------------------------------------------------------------- 1 | class AS_startMenu { 2 | idd=1601; 3 | movingenable=false; 4 | 5 | class controls 6 | { 7 | AS_DIALOG(1,"Start Menu", "hint 'You cannot close this dialog. Press escape twice to open Arma game menu;'"); 8 | 9 | BTN_L(1,-1,"New game", "You will choose a faction and an initial location", "closeDialog 0; [] spawn AS_fnc_UI_newGame_menu"); 10 | BTN_R(1,-1,"Load game", "You will choose a saved game to start from", "closeDialog 0; [] spawn AS_fnc_UI_loadMenu_menu;"); 11 | }; 12 | }; 13 | -------------------------------------------------------------------------------- /Antistasi/fia_recruitment/fnc_getFIAUnitClass.sqf: -------------------------------------------------------------------------------- 1 | // unit type -> unit class 2 | params ["_type"]; 3 | 4 | if (_type == "Medic") exitWith { 5 | ["FIA", "medic"] call AS_fnc_getEntity 6 | }; 7 | if (_type == "Engineer") exitWith { 8 | ["FIA", "engineer"] call AS_fnc_getEntity 9 | }; 10 | if (_type == "Crew") exitWith { 11 | ["FIA", "crew"] call AS_fnc_getEntity 12 | }; 13 | if (_type == "Survivor") exitWith { 14 | ["FIA", "survivor"] call AS_fnc_getEntity 15 | }; 16 | ["FIA", "soldier"] call AS_fnc_getEntity 17 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/Core/fnc/UPSMON_StrToArray.sqf: -------------------------------------------------------------------------------- 1 | /**************************************************************** 2 | File: UPSMON_StrToArray.sqf 3 | Author: KRONZKY 4 | 5 | Description: 6 | 7 | Parameter(s): 8 | 9 | Returns: 10 | 11 | ****************************************************************/ 12 | private["_in","_i","_arr","_out"]; 13 | 14 | _in=_this select 0; 15 | _arr = toArray(_in); 16 | _out=[]; 17 | for "_i" from 0 to (count _arr)-1 do { 18 | _out=_out+[toString([_arr select _i])]; 19 | }; 20 | _out -------------------------------------------------------------------------------- /Antistasi/dialogs/manageGarrisons/fnc_UI_selectOnMap.sqf: -------------------------------------------------------------------------------- 1 | disableSerialization; 2 | closeDialog 0; 3 | openMap true; 4 | map_location = ""; 5 | onMapSingleClick "_pos call AS_fnc_UI_manageGarrisons_onMapClick;"; 6 | waitUntil {sleep 0.5; (map_location != "") or !visibleMap}; 7 | openMap false; 8 | 9 | call AS_fnc_UI_manageGarrisons_menu; 10 | if (map_location != "") then { 11 | ((findDisplay 1602) displayCtrl 2) ctrlSetText (map_location); 12 | call AS_fnc_UI_manageGarrisons_updateList; 13 | }; 14 | map_location = nil; 15 | -------------------------------------------------------------------------------- /Antistasi/fnc_initUnit.sqf: -------------------------------------------------------------------------------- 1 | params ["_unit", "_faction", "_spawned"]; 2 | 3 | if (_faction == "AAF") exitWith { 4 | [_unit, _spawned] call AS_fnc_initUnitAAF; 5 | }; 6 | if (_faction == "CSAT") exitWith { 7 | [_unit] call AS_fnc_initUnitCSAT; 8 | }; 9 | if (_faction == "NATO") exitWith { 10 | [_unit] call AS_fnc_initUnitNATO; 11 | }; 12 | if (_faction == "FIA") exitWith { 13 | [_unit, _spawned] call AS_fnc_initUnitFIA; 14 | }; 15 | if (_faction == "CIV") exitWith { 16 | [_unit] call AS_fnc_initUnitCIV; 17 | }; 18 | -------------------------------------------------------------------------------- /Antistasi/fnc_location_isFrontline.sqf: -------------------------------------------------------------------------------- 1 | #include "macros.hpp" 2 | params ["_location"]; 3 | 4 | private _position = _location call AS_location_fnc_position; 5 | 6 | private _locations = [["airfield", "base", "watchpost", "fia_hq"], "FIA"] call AS_location_fnc_TS; 7 | 8 | private _isfrontier = false; 9 | { 10 | private _otherPosition = _x call AS_location_fnc_position; 11 | if (_position distance _otherPosition < AS_P("spawnDistance")) exitWith { 12 | _isFrontier = true; 13 | }; 14 | } forEach _locations; 15 | 16 | _isfrontier 17 | -------------------------------------------------------------------------------- /Antistasi/dialogs/manageHQ/fnc_UI_menu.sqf: -------------------------------------------------------------------------------- 1 | disableSerialization; 2 | private ["_display","_childControl","_texto"]; 3 | createDialog "AS_manageHQ"; 4 | 5 | _display = findDisplay 1602; 6 | 7 | if (str (_display) != "no display") then { 8 | _childControl = _display displayCtrl 109; 9 | if (BE_currentStage == 3) then { 10 | _texto = "No further training available."; 11 | } else { 12 | _texto = format ["Training Cost: %1 €", call fnc_BE_calcPrice]; 13 | }; 14 | _childControl ctrlSetTooltip _texto; 15 | }; 16 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/Get_pos/UPSMON_pos_fnc_findclosestposition.sqf: -------------------------------------------------------------------------------- 1 | // Return the closest position from array to the positionA. 2 | // In: [positionA,[array of positions]] 3 | // Out: positionB 4 | private ["_pA","_ps","_p1","_p2"]; 5 | _pA = _this select 0; 6 | _ps = _this select 1; 7 | 8 | _p1 = _ps select 0; 9 | 10 | if (count _ps > 1) then { 11 | for "_i" from 1 to (count _ps - 1) do { 12 | _p2 = _ps select _i; 13 | if ((_p2 distance _pA) < (_p1 distance _pA)) then { 14 | _p1 = _p2; 15 | }; 16 | }; 17 | }; 18 | 19 | _p1 -------------------------------------------------------------------------------- /Antistasi/fnc_dropArtilleryShellsNATO.sqf: -------------------------------------------------------------------------------- 1 | params ["_location"]; 2 | 3 | private _pos = _location call AS_location_fnc_position; 4 | private _cuenta = 0; 5 | while {({(_x distance _pos < 300) and (side _x == ("NATO" call AS_fnc_getFactionSide))} count allUnits == 0) and (_cuenta < 50)} do { 6 | _cuenta = _cuenta + 1; 7 | sleep (5 + random 5); 8 | 9 | // drop a shell 10 | private _shell1 = "Sh_82mm_AMOS" createVehicle [_pos select 0 + (150 - (random 300)),_pos select 1 + (150 - (random 300)),200]; 11 | _shell1 setVelocity [0,0,-50]; 12 | }; 13 | -------------------------------------------------------------------------------- /Antistasi/mission/spawn/fnc_loadTask.sqf: -------------------------------------------------------------------------------- 1 | params ["_mission", "_status", ["_description", ""], ["_position", []]]; 2 | private _params = [_mission, "task"] call AS_spawn_fnc_get; 3 | 4 | private _settings = _params select 1; 5 | if (_description != "") then { 6 | _settings set [1, _description]; 7 | }; 8 | if (count _position == 0) then { 9 | _position = _params select 2; 10 | }; 11 | 12 | [_params select 0,[("FIA" call AS_fnc_getFactionSide),civilian], 13 | _settings, 14 | _position, 15 | _status, 5,true,true, 16 | _params select 3] 17 | -------------------------------------------------------------------------------- /Antistasi/location/fnc_increaseBusy.sqf: -------------------------------------------------------------------------------- 1 | // Increases the time the location is busy. 2 | // Location needs to be a base or airport 3 | #include "../macros.hpp" 4 | AS_SERVER_ONLY("AS_location_fnc_increaseBusy"); 5 | params ["_location", "_minutes"]; 6 | private _busy = [_location,"busy"] call AS_location_fnc_get; 7 | if (_busy < dateToNumber date) then {_busy = dateToNumber date}; 8 | 9 | private _busy = numberToDate [2035,_busy]; 10 | _busy set [4, (_busy select 4) + _minutes]; 11 | 12 | [_location,"busy",dateToNumber _busy] call AS_location_fnc_set; 13 | -------------------------------------------------------------------------------- /Antistasi/fnc_getFaction.sqf: -------------------------------------------------------------------------------- 1 | #include "macros.hpp" 2 | 3 | params ["_faction"]; 4 | 5 | if (_faction == "AAF") exitWith { 6 | AS_P("faction_state") 7 | }; 8 | if (_faction == "FIA") exitWith { 9 | AS_P("faction_anti_state") 10 | }; 11 | if (_faction == "CSAT") exitWith { 12 | AS_P("faction_pro_state") 13 | }; 14 | if (_faction == "NATO") exitWith { 15 | AS_P("faction_pro_anti_state") 16 | }; 17 | if (_faction == "CIV") exitWith { 18 | AS_P("faction_civilian") 19 | }; 20 | diag_log format ["[AS] Error: faction '%1' invalid", _faction]; 21 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/unit/fnc/UPSMON_surrended.sqf: -------------------------------------------------------------------------------- 1 | /**************************************************************** 2 | File: UPSMON_surrended.sqf 3 | Author: MONSADA 4 | 5 | Description: 6 | Function to surrender AI soldier 7 | Parameter(s): 8 | 9 | Returns: 10 | 11 | ****************************************************************/ 12 | private ["_grp"]; 13 | 14 | _grp = _this select 0; 15 | 16 | UPSMON_NPCs = UPSMON_NPCs - [_grp]; 17 | 18 | { 19 | If (alive _x) then 20 | { 21 | [_x] spawn UPSMON_DoSurrender; 22 | }; 23 | } foreach units _grp; -------------------------------------------------------------------------------- /Antistasi/actions/rescue.sqf: -------------------------------------------------------------------------------- 1 | params ["_unit", "_player"]; 2 | 3 | [[_unit, "remove"],"AS_fnc_addAction"] call BIS_fnc_MP; 4 | 5 | _player globalChat "You are free. Come with us!"; 6 | if captive _player then { 7 | [_player, false] remoteExec ["setCaptive", _player]; 8 | }; 9 | sleep 1; 10 | 11 | _unit sideChat "Thank you. I owe you my life!"; 12 | _unit enableAI "MOVE"; 13 | _unit enableAI "AUTOTARGET"; 14 | _unit enableAI "TARGET"; 15 | _unit enableAI "ANIM"; 16 | _unit setCaptive false; 17 | [_unit] join group _player; 18 | [_unit] call AS_fnc_initUnitFIA; 19 | -------------------------------------------------------------------------------- /Antistasi/fnc_roadAndDir.sqf: -------------------------------------------------------------------------------- 1 | private _position = _this; 2 | private _road = objNull; 3 | private _dist = 50; 4 | { 5 | if ((position _x) distance _position < _dist) then { 6 | _road = _x; 7 | _dist = (position _x) distance _position; 8 | }; 9 | } forEach (_position nearRoads 50); 10 | if (isNull _road) exitWith {[objNull, []]}; 11 | if (count (roadsConnectedto _road) == 0) exitWith {[objNull, []]}; 12 | private _roadcon = (roadsConnectedto _road) select 0; 13 | private _dirveh = [_roadcon, _road] call BIS_fnc_DirTo; 14 | [_road, _dirveh] 15 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/markerAlpha.sqf: -------------------------------------------------------------------------------- 1 | /* ============================================= 2 | !R 3 | Hide area markers. 4 | 5 | create Game Logic Object 6 | put in initialization field: 7 | 8 | nul = call compile preprocessFile "scripts\UPSMON\!R\markerAlpha.sqf"; 9 | 10 | all markers area must be named area0, area1...area13 11 | 12 | ================================================= */ 13 | 14 | { _x setmarkeralpha 0; } foreach ["area0", "area1", "area2","area3","area4","area5","area6","area7","area8","area9","area10","area11","area12","area13"]; -------------------------------------------------------------------------------- /Antistasi/fia_recruitment/fnc_dismissFIAgarrison.sqf: -------------------------------------------------------------------------------- 1 | #include "../macros.hpp" 2 | params ["_type", "_location"]; 3 | 4 | if ([_location call AS_location_fnc_position, 500] call AS_fnc_enemiesNearby) exitWith { 5 | Hint "There are enemies within 500m of the zone. You can not dismiss units."; 6 | }; 7 | 8 | [1, _type call AS_fnc_getCost] remoteExec ["AS_fnc_changeFIAmoney",2]; 9 | 10 | private _garrison = [_location, "garrison"] call AS_location_fnc_get; 11 | _garrison deleteAt (_garrison find _type); 12 | [_location, "garrison", _garrison] call AS_location_fnc_set; 13 | -------------------------------------------------------------------------------- /Antistasi/fnc_activateCleanup.sqf: -------------------------------------------------------------------------------- 1 | #include "macros.hpp" 2 | private ["_killed", "_group"]; 3 | _killed = _this select 0; 4 | 5 | [_killed] call AS_debug_fnc_initDead; 6 | 7 | sleep AS_P("cleantime"); 8 | _group = group _killed; 9 | deleteVehicle _killed; 10 | 11 | if (!isNull _group) then { 12 | if ({alive _x} count units _group == 0) then { 13 | _group remoteExec ["deleteGroup", groupOwner _group]; 14 | }; 15 | } 16 | else { 17 | if (_killed in AS_P("vehicles")) then { 18 | [_killed, false] remoteExec ["AS_fnc_changePersistentVehicles", 2]; 19 | }; 20 | }; 21 | -------------------------------------------------------------------------------- /Antistasi/scheduler/fnc_receiveStatus.sqf: -------------------------------------------------------------------------------- 1 | #include "../macros.hpp" 2 | AS_SERVER_ONLY("fnc_receiveStatus"); 3 | params ["_owner", "_data"]; 4 | 5 | private _currentWorkers = (AS_workers getVariable "_all"); 6 | if not (_owner in _currentWorkers) then { 7 | diag_log format ["[AS] Server: scheduler_fnc_receiveStatus received new worker: %1", _owner]; 8 | AS_workers setVariable ["_all",_currentWorkers + [_owner]]; 9 | }; 10 | private _id = str _owner; 11 | AS_workers setVariable ["_data" + _id, _data]; 12 | AS_workers setVariable ["_last_update" + _id, time]; 13 | -------------------------------------------------------------------------------- /Antistasi/fnc_hasRadioCoverage.sqf: -------------------------------------------------------------------------------- 1 | #include "macros.hpp" 2 | // _this: a position or _location 3 | private _position = _this; 4 | if (typeName _this == typeName "") then { 5 | _position = _this call AS_location_fnc_position; 6 | }; 7 | 8 | private _ok = false; 9 | { 10 | if ((_position distance _x < 3500)) then { 11 | private _location = _x call AS_location_fnc_nearest; 12 | if (_location call AS_location_fnc_side == "AAF") then { 13 | _ok = true; 14 | }; 15 | }; 16 | if _ok exitWith {}; // shortcircuit loop 17 | } forEach AS_P("antenasPos_alive"); 18 | _ok 19 | -------------------------------------------------------------------------------- /Antistasi/dialogs/manageLocations/fnc_UI_abandon.sqf: -------------------------------------------------------------------------------- 1 | private _position = _this; 2 | private _location = AS_map_position call AS_location_fnc_nearest; 3 | private _type = _location call AS_location_fnc_type; 4 | 5 | if (_position distance (_location call AS_location_fnc_position) > 100 or 6 | _location call AS_location_fnc_side != "FIA") exitWith { 7 | hint "No FIA location selected"; 8 | }; 9 | if !(_type in ["roadblock","watchpost","camp"]) exitWith { 10 | hint "This location cannot be abandoned"; 11 | }; 12 | _location remoteExec ["AS_fnc_abandonFIAlocation", 2]; 13 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/Core/fnc/UPSMON_getArg.sqf: -------------------------------------------------------------------------------- 1 | /**************************************************************** 2 | File: UPSMON_getArg.sqf 3 | Author: KRONZKY 4 | 5 | Description: 6 | 7 | Parameter(s): 8 | 9 | Returns: 10 | 11 | ****************************************************************/ 12 | private["_cmd","_arg","_list","_a","_v"]; 13 | 14 | _cmd=_this select 0; 15 | _arg=_this select 1; 16 | _list=_this select 2; 17 | _a=-1; 18 | {_a=_a+1; _v=format["%1",_list select _a]; 19 | if (_v==_cmd) then {_arg=(_list select _a+1)}} foreach _list; 20 | 21 | _arg -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/MODULES/ORDERS/UPSMON_FLANK/Init.sqf: -------------------------------------------------------------------------------- 1 | 2 | UPSMON_DOFLANK = compile preProcessFileLineNumbers "Scripts\UPSMON\MODULES\ORDERS\UPSMON_FLANK\fnc\UPSMON_DOFLANK.sqf"; 3 | UPSMON_PLANFLANK = compile preProcessFileLineNumbers "Scripts\UPSMON\MODULES\ORDERS\UPSMON_FLANK\fnc\UPSMON_PLANFLANK.sqf"; 4 | UPSMON_SrchFlankPos = compile preProcessFileLineNumbers "Scripts\UPSMON\MODULES\ORDERS\UPSMON_FLANK\fnc\UPSMON_SrchFlankPos.sqf"; 5 | UPSMON_SrchFlankPosforboat = compile preProcessFileLineNumbers "Scripts\UPSMON\MODULES\ORDERS\UPSMON_FLANK\fnc\UPSMON_SrchFlankPosforboat.sqf"; 6 | -------------------------------------------------------------------------------- /Antistasi/debug/fnc_initDead.sqf: -------------------------------------------------------------------------------- 1 | params ["_thing"]; 2 | if not AS_debug_flag exitWith {}; 3 | 4 | private _mrk = createMarker [format ["AS_debug_flag_%1", count AS_debug_flag_all], position _thing]; 5 | AS_debug_flag_all pushBack _mrk; 6 | _mrk setMarkerShape "ICON"; 7 | _mrk setMarkerType "KIA"; 8 | _mrk setMarkerColor "ColorRed"; 9 | 10 | [_thing, _mrk] spawn { 11 | params ["_thing", "_mrk"]; 12 | private _sleep = 2 + 2*(random 100)/100; 13 | while {AS_debug_flag and _thing != objNull} do { 14 | sleep _sleep; 15 | }; 16 | deleteMarker _mrk; 17 | }; 18 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/Group/fnc/UPSMON_getNearestSoldier.sqf: -------------------------------------------------------------------------------- 1 | /**************************************************************** 2 | File: UPSMON_getNearestSoldier.sqf 3 | Author: Monsada 4 | 5 | Description: 6 | 7 | Parameter(s): 8 | 9 | Returns: 10 | 11 | ****************************************************************/ 12 | 13 | private["_units","_position","_near"]; 14 | 15 | _position = _this select 0; 16 | _units = _this select 1; 17 | 18 | _near = [_units, [], {_position distance _x}, "ASCEND"] call BIS_fnc_sortBy;; 19 | _near = _near select 0; 20 | 21 | 22 | _near -------------------------------------------------------------------------------- /Antistasi/dialogs/manageTraits/dialogs.hpp: -------------------------------------------------------------------------------- 1 | class AS_manageTraits 2 | { 3 | idd=1601; 4 | movingenable=false; 5 | 6 | class controls 7 | { 8 | AS_DIALOG(5,"Add expertise", "closeDialog 0;"); 9 | 10 | READ(0,1,-1,1,"Possible expertises"); 11 | LIST_L(0,2,0,3,"[0] spawn AS_fnc_UI_manageTraits_select;"); 12 | READ(1,1,-1,1,"Your expertises"); 13 | LIST_L(1,2,10,3,"[10] spawn AS_fnc_UI_manageTraits_select;"); 14 | READ(0,5,1,1,"Trait description"); 15 | 16 | BTN_R(5,4,"Train yourself", "Add the selected trait to yourself", "[] spawn AS_fnc_UI_manageTraits_train;"); 17 | }; 18 | }; 19 | -------------------------------------------------------------------------------- /Antistasi/fnc_getFIAvehiclePrice.sqf: -------------------------------------------------------------------------------- 1 | // price of the vehicle for FIA to buy or sell 2 | params ["_tipoVeh", ["_isSelling", false]]; 3 | 4 | // `initialization/checkFactionAttributes` guarantees that this exists 5 | private _cost = _tipoVeh call AS_fnc_getCost; 6 | 7 | private _FIAseaports = count ([["seaport"], "FIA"] call AS_location_fnc_TS); 8 | 9 | if (_isSelling) exitWith { 10 | // selling is half of the price +10% for each controlled port. 11 | round _cost/2*(1 + 0.1*_FIAseaports) 12 | }; 13 | // price is -10% for each controlled port. 14 | round _cost*(1 - 0.1 *_FIAseaports) 15 | -------------------------------------------------------------------------------- /Antistasi/database/fnc_hq_toDict.sqf: -------------------------------------------------------------------------------- 1 | #include "../macros.hpp" 2 | AS_SERVER_ONLY("AS_database_fnc_hq_toDict"); 3 | private _dict = call DICT_fnc_create; 4 | 5 | private _array = []; 6 | { 7 | _array pushback [getPos _x, getDir _x]; 8 | } forEach AS_permanent_HQplacements; 9 | [_dict, "permanents", _array] call DICT_fnc_setGlobal; 10 | 11 | _array = []; 12 | { 13 | _array pushback [getPos _x, getDir _x, typeOf _x]; 14 | } forEach AS_HQ_placements; 15 | [_dict, "placed", _array] call DICT_fnc_setGlobal; 16 | [_dict, "inflame", inflamed fuego] call DICT_fnc_setGlobal; 17 | 18 | _dict 19 | -------------------------------------------------------------------------------- /Antistasi/fia_recruitment/fnc_getFIABestSquadVehicle.sqf: -------------------------------------------------------------------------------- 1 | params ["_seats_required", ["_cost_order", "ASCEND"]]; 2 | 3 | // select available vehicles that can seat this group 4 | private _vehicleTypes = (["FIA", "land_vehicles"] call AS_fnc_getEntity); 5 | _vehicleTypes = _vehicleTypes select {[_x, true] call BIS_fnc_crewCount >= _seats_required}; 6 | 7 | if (count _vehicleTypes == 0) exitWith { 8 | "" 9 | }; 10 | 11 | // select cheapest vehicle 12 | _vehicleTypes = [_vehicleTypes, [], {_x call AS_fnc_getFIAvehiclePrice}, _cost_order] call BIS_fnc_sortBy; 13 | _vehicleTypes select 0 14 | -------------------------------------------------------------------------------- /Antistasi/initialization/headlessClient.sqf: -------------------------------------------------------------------------------- 1 | #include "../macros.hpp" 2 | diag_log "[AS] Dedicated: starting"; 3 | call compile preprocessFileLineNumbers "initialization\common_variables.sqf"; 4 | diag_log "[AS] Dedicated: common variables initialized"; 5 | waitUntil {private _var = AS_P("player_side"); not isNil "_var"}; 6 | call compile preprocessFileLineNumbers "initialization\common_side_variables.sqf"; 7 | diag_log "[AS] Dedicated: side variables initialized"; 8 | call AS_scheduler_fnc_initialize; 9 | diag_log "[AS] Dedicated: scheduler initialized"; 10 | diag_log "[AS] Dedicated: done"; 11 | -------------------------------------------------------------------------------- /Antistasi/spawn/fnc_toggle.sqf: -------------------------------------------------------------------------------- 1 | #include "../macros.hpp" 2 | AS_SERVER_ONLY("AS_spawn_fnc_toggle.sqf"); 3 | params ["_on"]; 4 | 5 | if isNil "AS_spawning" then { 6 | AS_spawning = false; 7 | }; 8 | 9 | if (not AS_spawning and _on) then { 10 | AS_spawning = true; 11 | diag_log "[AS] Server: spawn loop started."; 12 | 13 | [] spawn { 14 | while {AS_spawning} do { 15 | call AS_spawn_fnc_update; 16 | sleep AS_spawnLoopTime; 17 | }; 18 | }; 19 | }; 20 | 21 | if (AS_spawning and not _on) then { 22 | AS_spawning = false; 23 | diag_log "[AS] Server: spawn loop stopped."; 24 | }; 25 | -------------------------------------------------------------------------------- /Antistasi/AI/fnc_activateSmokeCoverAI.sqf: -------------------------------------------------------------------------------- 1 | private ["_veh"]; 2 | 3 | _veh = _this select 0; 4 | _tipo = "SmokeShellPurple"; 5 | 6 | if !(alive _veh) exitWith {}; 7 | 8 | if (side _veh == ("FIA" call AS_fnc_getFactionSide)) then { 9 | _tipo = "SmokeShellBlue"; 10 | }; 11 | 12 | if (_veh isKindOf "Air") then 13 | { 14 | private ["_pos","_humo"]; 15 | for "_i" from 0 to 8 do 16 | { 17 | _pos = position _veh getPos [10,_i*40]; 18 | _humo = _tipo createVehicle [_pos select 0, _pos select 1,getPos _veh select 2]; 19 | }; 20 | } 21 | else 22 | { 23 | _veh fire "SmokeLauncher"; 24 | }; 25 | -------------------------------------------------------------------------------- /Antistasi/dialogs/manageHQ/fnc_UI_takeMoney.sqf: -------------------------------------------------------------------------------- 1 | #include "../../macros.hpp" 2 | 3 | if not isMultiplayer exitWith { 4 | hint "In single player your money is FIA money"; 5 | }; 6 | if (AS_P("resourcesFIA") < 100) exitWith { 7 | hint "FIA does not have money" 8 | }; 9 | 10 | [player, "money", 100] remoteExec ["AS_players_fnc_change", 2]; 11 | [0,-100] remoteExec ["AS_fnc_changeFIAmoney", 2]; 12 | [player, "score", -2] remoteExec ["AS_players_fnc_change", 2]; 13 | 14 | hint "You grabbed 100 € from the FIA Money Pool.\n\nThis will affect your status among FIA forces"; 15 | closeDialog 0; 16 | -------------------------------------------------------------------------------- /Antistasi/dialogs/recruitUnit/fnc_UI_recruit.sqf: -------------------------------------------------------------------------------- 1 | disableSerialization; 2 | private _id = lbCurSel 0; 3 | private _unitName = lbData [0, _id]; 4 | 5 | if (_unitName != "") then { 6 | 7 | if (player call AS_fnc_controlsAI) exitWith { 8 | hint "You cannot buy units while you are controlling AI" 9 | }; 10 | 11 | if (player != leader group player) exitWith { 12 | hint "You cannot recruit units as you are not your group leader" 13 | }; 14 | 15 | [player, _unitName] remoteExec ["AS_fnc_recruitFIAunit", 2]; 16 | } else { 17 | hint "no unit selected"; 18 | }; 19 | -------------------------------------------------------------------------------- /Antistasi/fnc_abandonFIAlocation.sqf: -------------------------------------------------------------------------------- 1 | #include "macros.hpp" 2 | AS_SERVER_ONLY("fnc_abandonFIAlocation.sqf"); 3 | private _type = _this call AS_location_fnc_type; 4 | 5 | if (_type == "camp") then { 6 | campNames pushBack ([_this, "name"] call AS_location_fnc_get); 7 | }; 8 | 9 | // transfer garrison to FIA HQ 10 | 11 | private _hq_garrison = "FIA_HQ" call AS_location_fnc_garrison; 12 | _hq_garrison append (_this call AS_location_fnc_garrison); 13 | ["FIA_HQ","garrison",_hq_garrison] call AS_location_fnc_set; 14 | 15 | _this call AS_location_fnc_remove; 16 | 17 | hint "Location abandoned"; 18 | -------------------------------------------------------------------------------- /Antistasi/fnc_groupCfgToComposition.sqf: -------------------------------------------------------------------------------- 1 | /* 2 | Converts a groupCfg to a list of 3 lists: [_types, _positions, _ranks] 3 | */ 4 | params ["_groupCfg"]; 5 | 6 | private _types = []; 7 | private _positions = []; 8 | private _ranks = []; 9 | for "_i" from 0 to ((count _groupCfg) - 1) do { 10 | private _unit = _groupCfg select _i; 11 | 12 | if (isClass _unit) then { 13 | _types pushBack getText(_unit >> "vehicle"); 14 | _ranks pushBack getText(_unit >> "rank"); 15 | _positions pushBack getArray(_unit >> "position"); 16 | }; 17 | }; 18 | 19 | [_types, _positions, _ranks] 20 | -------------------------------------------------------------------------------- /Antistasi/medical/fnc_healUnit.sqf: -------------------------------------------------------------------------------- 1 | params ["_medic", "_target"]; 2 | if (not hasACEMedical) then { 3 | _target setVariable ["AS_medical_assignedMedic", _medic]; 4 | _medic setVariable ["AS_medical_assignedPatient", _target]; 5 | [_medic, _target] spawn AS_medical_fnc_healAction; 6 | } else { 7 | // for ACE, assign medic to unit 8 | _target setVariable ["ace_medical_ai_assignedMedic", _medic]; 9 | private _healQueue = _medic getVariable ["ace_medical_ai_healQueue", []]; 10 | _healQueue pushBack _target; 11 | _medic setVariable ["ace_medical_ai_healQueue", _healQueue]; 12 | }; 13 | -------------------------------------------------------------------------------- /Antistasi/templates/FIA_EAST_CUP.sqf: -------------------------------------------------------------------------------- 1 | private _dict = ([AS_entities, "CUP_FIA_WEST"] call DICT_fnc_get) call DICT_fnc_copy; 2 | [_dict, "side", str east] call DICT_fnc_set; 3 | [_dict, "name", "CMRS (CUP)"] call DICT_fnc_set; 4 | [_dict, "flag", "Flag_FIA_F"] call DICT_fnc_set; 5 | 6 | [_dict, "soldier", "CUP_O_INS_Soldier"] call DICT_fnc_set; 7 | [_dict, "crew", "CUP_O_INS_Crew"] call DICT_fnc_set; 8 | [_dict, "survivor", "CUP_O_INS_Soldier"] call DICT_fnc_set; 9 | [_dict, "engineer", "CUP_O_INS_Soldier_Engineer"] call DICT_fnc_set; 10 | [_dict, "medic", "CUP_O_INS_Medic"] call DICT_fnc_set; 11 | 12 | _dict 13 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/Params/fnc/UPSMON_GetRespawndelay.sqf: -------------------------------------------------------------------------------- 1 | /**************************************************************** 2 | File: UPSMON_GetRespawndelay.sqf 3 | Author: Azroul13 4 | 5 | Description: 6 | 7 | Parameter(s): 8 | <--- UPSMON parameters 9 | Returns: 10 | Number 11 | ****************************************************************/ 12 | private["_Ucthis","_respawndelay"]; 13 | 14 | _Ucthis = _this select 0; 15 | 16 | _respawndelay = 0; 17 | If ("RESPAWNDELAY:" in _Ucthis) then {_respawndelay = ["RESPAWNDELAY:",_respawndelay,_UCthis] call UPSMON_getArg}; 18 | 19 | 20 | _respawndelay 21 | -------------------------------------------------------------------------------- /Antistasi/aaf_arsenal/fnc_max.sqf: -------------------------------------------------------------------------------- 1 | // the maximum number of vehicles of a given category. 2 | switch _this do { 3 | case "planes"; 4 | case "helis_armed": {count (["airfield","AAF"] call AS_location_fnc_TS)}; 5 | case "helis_transport": {2*(count (["airfield","AAF"] call AS_location_fnc_TS))}; 6 | case "tanks": {count (["base","AAF"] call AS_location_fnc_TS)}; 7 | case "boats": {count (["seaport","AAF"] call AS_location_fnc_TS)}; 8 | case "apcs"; 9 | case "cars_armed"; 10 | case "cars_transport"; 11 | case "trucks": {1 + (count (["base","AAF"] call AS_location_fnc_TS))/2}; 12 | } 13 | -------------------------------------------------------------------------------- /Antistasi/dictionary/fnc__splitString.sqf: -------------------------------------------------------------------------------- 1 | // splits string with a given delimiter (can be more than 1 char) 2 | params ["_string", "_delimiter"]; 3 | private _index = _string find _delimiter; 4 | if (_index == -1) exitWith { 5 | [_string] 6 | }; 7 | private _result = [_string select [0, _index]]; 8 | while {_index != -1} do { 9 | _string = _string select [_index + count _delimiter]; 10 | _index = _string find _delimiter; 11 | if (_index != -1) then { 12 | _result pushBack (_string select [0, _index]); 13 | } else { 14 | _result pushBack _string; 15 | }; 16 | }; 17 | _result 18 | -------------------------------------------------------------------------------- /Antistasi/fnc_resourcesToggle.sqf: -------------------------------------------------------------------------------- 1 | #include "macros.hpp" 2 | AS_SERVER_ONLY("resourcesToogle.sqf"); 3 | params ["_on"]; 4 | 5 | if isNil "AS_resourcing" then { 6 | AS_resourcing = false; 7 | }; 8 | 9 | if (not AS_resourcing and _on) then { 10 | AS_resourcing = true; 11 | diag_log "[AS] Server: resources loop started."; 12 | 13 | [] spawn { 14 | while {AS_resourcing} do { 15 | call AS_fnc_resourcesUpdate; 16 | sleep AS_resourcesLoopTime; 17 | }; 18 | }; 19 | }; 20 | 21 | if (AS_resourcing and not _on) then { 22 | AS_resourcing = false; 23 | diag_log "[AS] Server: resources loop stopped."; 24 | }; 25 | -------------------------------------------------------------------------------- /Antistasi/templates/FIA_EAST.sqf: -------------------------------------------------------------------------------- 1 | // The first line below copies the dictionary, thus "inheriting" all its attributes. 2 | // We then modify the ones we want to be different. 3 | private _dict = ([AS_entities, "FIA_WEST"] call DICT_fnc_get) call DICT_fnc_copy; 4 | [_dict, "side", str east] call DICT_fnc_set; 5 | 6 | [_dict, "soldier", "O_G_Soldier_F"] call DICT_fnc_set; 7 | [_dict, "crew", "O_G_Soldier_lite_F"] call DICT_fnc_set; 8 | [_dict, "survivor", "O_G_Survivor_F"] call DICT_fnc_set; 9 | [_dict, "engineer", "O_G_engineer_F"] call DICT_fnc_set; 10 | [_dict, "medic", "O_G_medic_F"] call DICT_fnc_set; 11 | 12 | _dict 13 | -------------------------------------------------------------------------------- /Antistasi/templates/FIA_EAST_RHS.sqf: -------------------------------------------------------------------------------- 1 | private _dict = ([AS_entities, "RHS_FIA_WEST"] call DICT_fnc_get) call DICT_fnc_copy; 2 | [_dict, "side", str east] call DICT_fnc_set; 3 | [_dict, "name", "ChDKZ (RHS)"] call DICT_fnc_set; 4 | [_dict, "flag", "rhs_flag_ChDKZ"] call DICT_fnc_set; 5 | 6 | [_dict, "soldier", "rhsgref_ins_rifleman"] call DICT_fnc_set; 7 | [_dict, "crew", "rhsgref_ins_crew"] call DICT_fnc_set; 8 | [_dict, "survivor", "rhsgref_ins_rifleman"] call DICT_fnc_set; 9 | [_dict, "engineer", "rhsgref_ins_engineer"] call DICT_fnc_set; 10 | [_dict, "medic", "rhsgref_ins_medic"] call DICT_fnc_set; 11 | 12 | _dict 13 | -------------------------------------------------------------------------------- /Antistasi/actions/interrogate.sqf: -------------------------------------------------------------------------------- 1 | #include "../macros.hpp" 2 | params ["_unit", "_player"]; 3 | 4 | [[_unit,"remove"],"AS_fnc_addAction"] call BIS_fnc_MP; 5 | 6 | if (!alive _unit) exitWith {}; 7 | 8 | _player globalChat "You souvlaki! Tell me what you know!"; 9 | 10 | private _chance = AS_P("NATOsupport") - AS_P("CSATsupport"); 11 | 12 | _chance = _chance + 20; 13 | 14 | if (_chance < 20) then {_chance = 20}; 15 | 16 | if (floor random 100 < _chance) then { 17 | _unit globalChat "Okay, I'll tell you everything I know"; 18 | [_unit] call AS_fnc_showFoundIntel; 19 | } else { 20 | _unit globalChat "Screw you!"; 21 | }; 22 | -------------------------------------------------------------------------------- /Antistasi/fnc_HQbuild.sqf: -------------------------------------------------------------------------------- 1 | #include "macros.hpp" 2 | AS_SERVER_ONLY("fnc_HQbuild.sqf"); 3 | 4 | [petros] join grupoPetros; 5 | [[petros,"remove"],"AS_fnc_addAction"] call BIS_fnc_MP; 6 | [[petros,"mission"],"AS_fnc_addAction"] call BIS_fnc_MP; 7 | petros forceSpeed 0; 8 | 9 | ["FIA_HQ", "position", getPos petros] call AS_location_fnc_set; 10 | 11 | // place everything on its place 12 | call AS_fnc_HQdeploy; 13 | 14 | // and then show everything 15 | if isMultiplayer then { 16 | {_x hideObjectGlobal false} forEach AS_permanent_HQplacements; 17 | } else { 18 | {_x hideObject false} forEach AS_permanent_HQplacements; 19 | }; 20 | -------------------------------------------------------------------------------- /Antistasi/fnc_getBasesForConvoy.sqf: -------------------------------------------------------------------------------- 1 | params ["_position"]; 2 | 3 | // get closest airfield within some conditions 4 | private _base = ""; 5 | private _closestDistance = 7500; 6 | { 7 | private _busy = _x call AS_location_fnc_busy; 8 | private _pos = _x call AS_location_fnc_position; 9 | if (_position distance _pos < _closestDistance and 10 | _position distance _pos > 1500 and 11 | !(_x call AS_location_fnc_spawned) and !_busy) then { 12 | _base = _x; 13 | _closestDistance = _position distance _pos; 14 | }; 15 | } forEach (["base", "AAF"] call AS_location_fnc_TS); 16 | 17 | _base 18 | -------------------------------------------------------------------------------- /Antistasi/fnc_spawnAAF_truck.sqf: -------------------------------------------------------------------------------- 1 | params ["_location"]; 2 | 3 | private _position = _location call AS_location_fnc_position; 4 | private _size = _location call AS_location_fnc_size; 5 | 6 | private _vehicles = []; 7 | 8 | if ("trucks" call AS_AAFarsenal_fnc_count > 0) then { 9 | private _type = selectRandom ("trucks" call AS_AAFarsenal_fnc_valid); 10 | private _pos = _position findEmptyPosition [5,_size, _type]; 11 | private _veh = createVehicle [_type, _pos, [], 0, "NONE"]; 12 | _veh setDir random 360; 13 | _vehicles pushBack _veh; 14 | [_veh, "AAF"] call AS_fnc_initVehicle; 15 | }; 16 | [_vehicles] 17 | -------------------------------------------------------------------------------- /Antistasi/fnc_getLocationName.sqf: -------------------------------------------------------------------------------- 1 | params[ "_name", "_getClass", "_return" ]; 2 | 3 | _return = ""; 4 | " 5 | _value = switch ( _getClass ) do 6 | { 7 | case true : 8 | { 9 | if ( getText( _x >> 'name') == _name ) then 10 | { 11 | _return = configName _x; 12 | }; 13 | }; 14 | case false : 15 | { 16 | if ( configName _x == _name ) then 17 | { 18 | _return = getText( _x >> 'name' ); 19 | }; 20 | }; 21 | }; 22 | "configClasses ( configFile >> "CfgWorlds" >> worldName >> "Names" ); 23 | 24 | _return 25 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/Core/fnc/UPSMON_setArg.sqf: -------------------------------------------------------------------------------- 1 | /**************************************************************** 2 | File: UPSMON_setArg.sqf 3 | Author: KRONZKY 4 | 5 | Description: 6 | 7 | Parameter(s): 8 | 9 | Returns: 10 | 11 | ****************************************************************/ 12 | private["_cmd","_arg","_list","_a","_v"]; 13 | 14 | _cmd=_this select 0; 15 | _arg=_this select 1; 16 | _list=_this select 2; 17 | _a=-1; 18 | { 19 | _a=_a+1; 20 | _v= format ["%1", _list select _a]; 21 | if (_v==_cmd) then 22 | { 23 | _a=_a+1; 24 | _list set [_a,_arg]; 25 | }; 26 | } foreach _list; 27 | _list -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/vehicles/fnc/UPSMON_Emptyturret.sqf: -------------------------------------------------------------------------------- 1 | /**************************************************************** 2 | File: UPSMON_Emptyturret.sqf 3 | Author: Azroul13 4 | 5 | Description: 6 | Get number of empty turret 7 | Parameter(s): 8 | <--- vehicle 9 | Returns: 10 | number 11 | ****************************************************************/ 12 | 13 | private ["_turretpath","_number"]; 14 | 15 | _turretpath = _this call UPSMON_fnc_commonTurrets; 16 | 17 | _number = 0; 18 | 19 | { 20 | If (IsNull (_this turretUnit _x)) then {_number = _number + 1;}; 21 | } foreach _turretpath; 22 | 23 | _number 24 | -------------------------------------------------------------------------------- /Antistasi/arsenal/fnc_transferToBox.sqf: -------------------------------------------------------------------------------- 1 | #include "../macros.hpp" 2 | params ["_origin", "_destination"]; 3 | 4 | private _restrict_to_locked = false; 5 | if (_destination == caja) then { 6 | _restrict_to_locked = true; 7 | waitUntil {not AS_S("lockTransfer")}; 8 | AS_Sset("lockTransfer", true); 9 | }; 10 | 11 | ([_origin] call AS_fnc_getBoxArsenal) params ["_cargo_w", "_cargo_m", "_cargo_i", "_cargo_b"]; 12 | [_destination, _cargo_w, _cargo_m, _cargo_i, _cargo_b, _restrict_to_locked] call AS_fnc_populateBox; 13 | [_origin] call AS_fnc_emptyCrate; 14 | 15 | if (_destination == caja) then { 16 | AS_Sset("lockTransfer", false); 17 | }; 18 | -------------------------------------------------------------------------------- /Antistasi/dialogs/manageGarrisons/dialogs.hpp: -------------------------------------------------------------------------------- 1 | class AS_manageGarrisons 2 | { 3 | idd=1602; 4 | movingenable=false; 5 | 6 | class controls 7 | { 8 | AS_DIALOG(5,"Manage garrison", "closeDialog 0; call AS_fnc_UI_manageHQ_menu"); 9 | 10 | LIST_L(0,1,1,4,""); 11 | 12 | BTN_L(5,-1,"Recruit selected", "Recruit the unit selected above", "call AS_fnc_UI_manageGarrisons_recruit;"); 13 | BTN_R(1,2,"Select location", "Select the location", "[] spawn AS_fnc_UI_manageGarrisons_selectOnMap;"); 14 | LIST_L(1,2,3,3,""); 15 | BTN_R(5,-1,"Dismiss selected", "Dismiss the unit selected above", "call AS_fnc_UI_manageGarrisons_dismiss;"); 16 | }; 17 | }; 18 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/Core/fnc/UPSMON_SN_EHFIREDNEAR.sqf: -------------------------------------------------------------------------------- 1 | /**************************************************************** 2 | File: UPSMON_SN_EHFIREDNEAR.sqf 3 | Author: Rafalsky 4 | 5 | Description: 6 | 7 | Parameter(s): 8 | 9 | Returns: 10 | 11 | ****************************************************************/ 12 | private ["_unit","_shooter","_dist"]; 13 | 14 | _unit = _this select 0; 15 | _shooter = _this select 1; 16 | _dist = _this select 2; 17 | 18 | If (alive _unit) then 19 | { 20 | If (!(_unit getvariable ["UPSMON_Civfleeing",false])) then 21 | { 22 | ["FLEE",_unit,_shooter,_dist] spawn UPSMON_Civaction; 23 | }; 24 | }; 25 | -------------------------------------------------------------------------------- /Antistasi/fnc_HQmove.sqf: -------------------------------------------------------------------------------- 1 | #include "macros.hpp" 2 | AS_SERVER_ONLY("fnc_HQmove.sqf"); 3 | 4 | petros enableAI "MOVE"; 5 | petros enableAI "AUTOTARGET"; 6 | petros forceSpeed -1; 7 | 8 | [[petros, "remove"], "AS_fnc_addAction"] call BIS_fnc_MP; 9 | call AS_fnc_rearmPetros; 10 | [petros] join AS_commander; 11 | petros setBehaviour "AWARE"; 12 | 13 | if isMultiplayer then { 14 | {_x hideObjectGlobal true} forEach AS_permanent_HQplacements; 15 | } else { 16 | {_x hideObject true} forEach AS_permanent_HQplacements; 17 | }; 18 | 19 | "delete" call AS_fnc_HQaddObject; 20 | 21 | sleep 5; 22 | 23 | [[Petros, "buildHQ"],"AS_fnc_addAction"] call BIS_fnc_MP; 24 | -------------------------------------------------------------------------------- /Antistasi/macros.hpp: -------------------------------------------------------------------------------- 1 | #define AS_P(name) (AS_persistent getVariable name) 2 | #define AS_Pset(name,value) (AS_persistent setVariable [name,value,true]) 3 | 4 | #define AS_S(name) (AS_shared getVariable name) 5 | #define AS_Sset(name,value) (AS_shared setVariable [name,value,true]) 6 | 7 | 8 | #define AS_SERVER_ONLY(name) (if !(isServer) then {diag_log format ["[AS] Error: Server-only script " + name + " called"]}) 9 | 10 | #define AS_CLIENT_ONLY(name) (if !(hasInterface) then {diag_log format ["[AS] Error: Client-only script " + name + " called"]}) 11 | 12 | #define AS_ISDEBUG(message) (if (AS_debug_flag) then {diag_log ("[AS] DEBUG: " + (message))}) 13 | -------------------------------------------------------------------------------- /Antistasi/fnc_HQplace.sqf: -------------------------------------------------------------------------------- 1 | #include "macros.hpp" 2 | AS_SERVER_ONLY("fnc_HQplace.sqf"); 3 | params ["_position", "_isNewGame"]; 4 | 5 | "delete" call AS_fnc_HQaddObject; 6 | 7 | ["FIA_HQ", "position", _position] call AS_location_fnc_set; 8 | call AS_fnc_initPetros; 9 | call AS_fnc_HQdeploy; 10 | 11 | if _isNewGame then { 12 | // move all players to the HQ. 13 | {_x call AS_fnc_initPlayerPosition} forEach (allPlayers - (entities "HeadlessClient_F")); 14 | } else { 15 | if isMultiplayer then { 16 | {_x hideObjectGlobal false} forEach AS_permanent_HQplacements; 17 | } else { 18 | {_x hideObject false} forEach AS_permanent_HQplacements; 19 | }; 20 | }; 21 | -------------------------------------------------------------------------------- /Antistasi/fnc_changeSecondsForAAFattack.sqf: -------------------------------------------------------------------------------- 1 | #include "macros.hpp" 2 | AS_SERVER_ONLY("fnc_changeSecondsforAAFattack.sqf"); 3 | 4 | params ["_time", ["_multiply", true]]; 5 | 6 | if (_multiply) then { 7 | private _FIAbases = ["base", "FIA"] call AS_location_fnc_TS; 8 | private _allBases = "base" call AS_location_fnc_T; 9 | 10 | if (count _allBases == 0) then { 11 | _allBases = [0]; // avoid 0/0 below 12 | }; 13 | private _multiplier = 0.3 + (1 - 0.3)*(count _FIAbases)/(count _allBases); 14 | _time = _time * _multiplier; 15 | }; 16 | 17 | private _current = AS_P("secondsForAAFAttack"); 18 | AS_Pset("secondsForAAFAttack", (_current + round _time) max 0); 19 | -------------------------------------------------------------------------------- /Antistasi/Scripts/Infos/Credits.txt: -------------------------------------------------------------------------------- 1 | Many thanks to: 2 | -Kronzky who create the UPS script which is the base of UPSMON 3 | -Monsada who's the one that create this master piece. 4 | -Rafalsky who made several improvements to the script. 5 | -Beerkan,Ollem,Shaygman who made improvements and port the script to ArmaIII 6 | -Mando for his "mando_check_los" script. 7 | -Carl Gustav for his "sun_angle" script. 8 | -Das Attornay for helping me with the fortify module. 9 | -Shuko for his "shkpos" that help me a lot... 10 | -Grumpy old man for taking time to test this new version of UPSMON and for all his support. 11 | -Gienkov and Kord who test all pieces of the script ... 12 | 13 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/Params/fnc/UPSMON_GetRespawntime.sqf: -------------------------------------------------------------------------------- 1 | /**************************************************************** 2 | File: UPSMON_GetRespawntime.sqf 3 | Author: Azroul13 4 | 5 | Description: 6 | 7 | Parameter(s): 8 | <--- UPSMON parameters 9 | Returns: 10 | Number 11 | ****************************************************************/ 12 | private["_Ucthis","_respawn","_respawntime"]; 13 | 14 | _Ucthis = _this select 0; 15 | 16 | _respawntime = 0; 17 | if ("RESPAWN" in _UCthis) then {_respawntime = 1;}; 18 | If ("RESPAWN:" in _UCthis) then {_respawntime = ["RESPAWN:",_respawntime,_UCthis] call UPSMON_getArg}; 19 | 20 | 21 | _respawntime 22 | -------------------------------------------------------------------------------- /Antistasi/dialogs/buyVehicle/fnc_UI_updateList.sqf: -------------------------------------------------------------------------------- 1 | // updates the left list and right text field 2 | disableSerialization; 3 | private _cbo = ((findDisplay 1602) displayCtrl 0); 4 | lbCLear _cbo; 5 | 6 | { 7 | _cbo lbAdd (getText(configFile >> "cfgVehicles" >> _x >> "displayName")); 8 | private _picture = (getText(configFile >> "cfgVehicles" >> _x >> "picture")); 9 | _cbo lbSetPicture[(lbSize _cbo)-1, _picture]; 10 | 11 | _cbo lbSetData[(lbSize _cbo)-1, _x]; 12 | } forEach ((["FIA", "land_vehicles"] call AS_fnc_getEntity) + (["FIA", "air_vehicles"] call AS_fnc_getEntity)); 13 | 14 | _cbo lbSetCurSel 0; 15 | call AS_fnc_UI_buyVehicle_updateVehicleData; 16 | -------------------------------------------------------------------------------- /Antistasi/fnc_setConvoyImmune.sqf: -------------------------------------------------------------------------------- 1 | params ["_veh","_text"]; 2 | 3 | waitUntil {sleep 5; (alive _veh) and !(isNull driver _veh)}; 4 | private _side = side (driver _veh); 5 | 6 | while {(alive _veh) and (side (driver _veh) == _side)} do { 7 | private _pos = getPos _veh; 8 | sleep 60; 9 | private _newPos = getPos _veh; 10 | // in case it stopped, give vehicles a nodge to continue 11 | if (_newPos distance _pos < 5 and {{_x distance _newPos < 500} count (allPlayers - (entities "HeadlessClient_F")) == 0}) then { 12 | private _road = [_newPos,100] call BIS_fnc_nearestRoad; 13 | if (!isNull _road) then { 14 | _veh setPos getPos _road; 15 | }; 16 | }; 17 | }; 18 | -------------------------------------------------------------------------------- /Antistasi/medical/cfgFunctions.hpp: -------------------------------------------------------------------------------- 1 | class AS_medical { 2 | class common { 3 | FNC(medical,getAssignedMedic); 4 | FNC(medical,canHeal); 5 | FNC(medical,clearAssignedMedic); 6 | FNC(medical,effectsLoop); 7 | FNC(medical,healAction); 8 | FNC(medical,healUnit); 9 | FNC(medical,initUnit); 10 | FNC(medical,isHealed); 11 | FNC(medical,isUnconscious); 12 | FNC(medical,medicLoop); 13 | FNC(medical,setUnconscious); 14 | 15 | FNC(medical\templates,crateMeds); 16 | FNC(medical\templates,FIAuniformMeds); 17 | FNC(medical\templates,FIAmedicBackpack); 18 | }; 19 | }; 20 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/UPSMON_closedoor.sqf: -------------------------------------------------------------------------------- 1 | 2 | private ["_bld"]; 3 | _bld = _this select 0; 4 | _nbrdoors = round (count ((configfile >> "cfgVehicles" >> (typeOf _bld) >> "UserActions") call bis_fnc_returnchildren))/2; 5 | sleep 20; 6 | 7 | for "_i" from 0 to _nbrdoors do 8 | { 9 | //[_bld, "door_" + str _i + "_rot", "Door_Handle_" + str _i + "_rot_1", "Door_Handle_" + str _i + "_rot_2"] execVM "\A3\Structures_F\scripts\fn_Door_close.sqf";//cambiado para compatibilizar con nexus 10 | [_bld, "door_" + str _i + "_rot", "Door_Handle_" + str _i + "_rot_1", "Door_Handle_" + str _i + "_rot_2"] spawn BIS_fnc_DoorClose;//cambiado para compatibilizar con nexus 11 | }; 12 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/unit/fnc/UPSMON_Disableunitloop.sqf: -------------------------------------------------------------------------------- 1 | /**************************************************************** 2 | 3 | ****************************************************************/ 4 | private["_unit"]; 5 | 6 | _unit = _this select 0; 7 | 8 | waituntil {IsNull _unit || !alive _unit || !IsNull ((group _unit) getvariable ["UPSMON_target",Objnull]) || _unit getvariable ["UPSMON_SUPSTATUS",""] != "" || _unit getvariable ["UPSMON_Wait",time] <= time}; 9 | 10 | if (!IsNull _unit) then 11 | { 12 | If (alive _unit) then 13 | { 14 | _unit switchmove ""; 15 | _unit enableAI "MOVE"; 16 | _unit setvariable ["UPSMON_Civdisable",false]; 17 | }; 18 | }; -------------------------------------------------------------------------------- /Antistasi/dialogs/loadMenu/fnc_UI_delete.sqf: -------------------------------------------------------------------------------- 1 | disableSerialization; 2 | 3 | private _id = lbCurSel 0; 4 | 5 | // Exit if no save selected 6 | if (_id == -1) exitWith { 7 | hint "No save selected."; 8 | }; 9 | 10 | private _saveName = lbData [0, _id]; 11 | [_saveName] spawn { 12 | params ["_saveName"]; 13 | private _result = [format ["Delete save '%1'", _saveName], "", true, true] call BIS_fnc_guiMessage; 14 | if _result then { 15 | AS_database_waiting = true; 16 | [_saveName] remoteExec ["AS_database_fnc_deleteGame", 2]; 17 | waitUntil {isNil "AS_database_waiting"}; 18 | [] call AS_fnc_UI_loadMenu_update; 19 | }; 20 | }; 21 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/Core/fnc/UPSMON_getDirPos.sqf: -------------------------------------------------------------------------------- 1 | /**************************************************************** 2 | File: UPSMON_randomPos.sqf 3 | Author: KRONZKY 4 | 5 | Description: 6 | 7 | Parameter(s): 8 | 9 | Returns: 10 | 11 | ****************************************************************/ 12 | private["_a","_b","_from","_to","_return"]; 13 | 14 | _from = _this select 0; 15 | _to = _this select 1; 16 | _return = 0; 17 | 18 | _a = ((_to select 0) - (_from select 0)); 19 | _b = ((_to select 1) - (_from select 1)); 20 | if (_a != 0 || _b != 0) then {_return = _a atan2 _b}; 21 | if ( _return < 0 ) then { _return = _return + 360 }; 22 | 23 | _return -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/Get_pos/UPSMON_pos_fnc_getmarkershape.sqf: -------------------------------------------------------------------------------- 1 | // In: marker 2 | // Out: string (marker shape) 3 | 4 | private ["_size","_x","_y","_ret"]; 5 | _size = markersize _this; 6 | _x = _size select 0; 7 | _y = _size select 1; 8 | 9 | _ret = ""; 10 | 11 | switch (tolower(markershape _this)) do { 12 | case "rectangle": { 13 | if (_x == _y) then { 14 | _ret = "SQUARE"; 15 | } else { 16 | _ret = "RECTANGLE"; 17 | }; 18 | }; 19 | case "ellipse": { 20 | if (_x == _y) then { 21 | _ret = "CIRCLE"; 22 | } else { 23 | _ret = "ELLIPSE"; 24 | }; 25 | }; 26 | case "icon": { 27 | _ret = "ICON"; 28 | }; 29 | }; 30 | _ret -------------------------------------------------------------------------------- /Antistasi/database/fnc_migrate.sqf: -------------------------------------------------------------------------------- 1 | params ["_dict"]; 2 | 3 | private _version = 0; 4 | if ([_dict, "version"] call DICT_fnc_exists) then { 5 | _version = [_dict, "version"] call DICT_fnc_get; 6 | }; 7 | 8 | private _current_version = [AS_database_migrations, "latest"] call DICT_fnc_get; 9 | 10 | if (_version != _current_version) then { 11 | diag_log format ["[AS] Server: outdated by %1 versions.", _current_version - _version]; 12 | for "_i" from (_version + 1) to _current_version do { 13 | diag_log format ["[AS] Server: Migrating %1/%2", _i, _current_version - _version]; 14 | [_dict, str _i] call AS_database_fnc_apply_migration; 15 | }; 16 | }; 17 | -------------------------------------------------------------------------------- /Antistasi/players/fnc_fromDict.sqf: -------------------------------------------------------------------------------- 1 | #include "../macros.hpp" 2 | AS_SERVER_ONLY("AS_players_fnc_fromDict"); 3 | 4 | params ["_dict"]; 5 | call AS_players_fnc_deinitialize; 6 | [AS_container, "players", _dict call DICT_fnc_copy] call DICT_fnc_setGlobal; 7 | 8 | { 9 | private _uid = tolower getPlayerUID _x; 10 | if ([AS_container, "players", _uid] call DICT_fnc_exists) then { 11 | [] remoteExec ["AS_players_fnc_loadLocal", owner _x]; 12 | }; 13 | private _pos = (getMarkerPos "FIA_HQ") findEmptyPosition [2, 20, typeOf (vehicle _x)]; 14 | _x call AS_fnc_emptyUnit; 15 | _x call AS_fnc_equipDefault; 16 | _x setPos _pos; 17 | } forEach allPlayers; 18 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/Params/fnc/UPSMON_GetParams.sqf: -------------------------------------------------------------------------------- 1 | /**************************************************************** 2 | File: UPSMON_GetParams.sqf 3 | Author: Azroul13 4 | 5 | Description: 6 | Convert argument list to uppercase 7 | Parameter(s): 8 | <--- Parameters 9 | Returns: 10 | ---> Parameters 11 | ****************************************************************/ 12 | 13 | private["_Params","_UCthis","_i","_e"]; 14 | 15 | _Params = _this select 0; 16 | _UCthis = []; 17 | 18 | for [{_i=0},{_i 1) then { 20 | _unit call AS_fnc_removeNightEquipment; 21 | }; 22 | 23 | _unit enableIRLasers true; 24 | _unit enableGunLights "AUTO"; 25 | -------------------------------------------------------------------------------- /Antistasi/mission/fnc_createDefendHQ.sqf: -------------------------------------------------------------------------------- 1 | #include "../macros.hpp" 2 | AS_SERVER_ONLY("defendHQ"); 3 | private _location = "FIA_HQ"; 4 | private _position = _location call AS_location_fnc_position; 5 | 6 | private _debug_prefix = "defend_hq cancelled: "; 7 | if AS_S("blockCSAT") exitWith { 8 | private _message = "blocked"; 9 | AS_ISDEBUG(_debug_prefix + _message); 10 | }; 11 | if (count ("defend_hq" call AS_mission_fnc_active_missions) != 0) exitWith { 12 | private _message = "one already in progress"; 13 | AS_ISDEBUG(_debug_prefix + _message); 14 | }; 15 | 16 | private _mission = ["defend_hq", _location] call AS_mission_fnc_add; 17 | _mission call AS_mission_fnc_activate; 18 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/Core/fnc/UPSMON_Getunitsincargo.sqf: -------------------------------------------------------------------------------- 1 | /**************************************************************** 2 | File: UPSMON_Getunitsincargo.sqf 3 | Author: Azroul13 4 | 5 | Description: 6 | Function for order a unit to exit if no gunner 7 | Parameter(s): 8 | 9 | Returns: 10 | 11 | ****************************************************************/ 12 | private["_vehicle","_unitsincargo","_crew"]; 13 | 14 | _vehicle = _this select 0; 15 | 16 | _unitsincargo = []; 17 | 18 | _crew = crew _vehicle; 19 | 20 | { 21 | If (alive _x) then 22 | { 23 | If () then 24 | { 25 | _unitsincargo pushback _x; 26 | }; 27 | }; 28 | } foreach _crew; 29 | 30 | _unitsincargo -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/MODULES/ORDERS/UPSMON_SUPPLY/fnc/UPSMON_GetSupplyPos.sqf: -------------------------------------------------------------------------------- 1 | /**************************************************************** 2 | File: UPSMON_GetTransport.sqf 3 | Author: Azroul13 4 | 5 | Description: 6 | Search for a valid patrol position. 7 | 8 | Parameter(s): 9 | <--- group 10 | Returns: 11 | Transport group 12 | ****************************************************************/ 13 | private ["_grp","_supplypos","_side","_supplyneeded","_supplyarray","_supplyselected","_supplygrp","_assignedvehicles","_cargonumber"]; 14 | 15 | _grp = _this select 0; 16 | 17 | _wppos = waypointPosition [_grp,count(waypoints _grp)-1]; 18 | 19 | _supplypos = []; 20 | 21 | _supplypos; -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/Params/fnc/UPSMON_NOSMOKE.sqf: -------------------------------------------------------------------------------- 1 | /**************************************************************** 2 | File: UPSMON_BackToNormal.sqf 3 | Author: Azroul13 4 | 5 | Description: 6 | 7 | Parameter(s): 8 | <--- group 9 | Returns: 10 | Nothing 11 | ****************************************************************/ 12 | private["_grp","_nosmoke"]; 13 | 14 | _grp = _this select 0; 15 | _nosmoke = true; 16 | 17 | If (random 100 > UPSMON_USE_SMOKE) then 18 | { 19 | If (_grp getvariable ["UPSMON_SmokeTime",0] < time) then 20 | { 21 | If (!(_grp getvariable ["UPSMON_NOSMOKE",false])) then 22 | { 23 | _nosmoke = false; 24 | }; 25 | }; 26 | }; 27 | 28 | _nosmoke 29 | -------------------------------------------------------------------------------- /Antistasi/arsenal/fnc_getWeaponItemsCargo.sqf: -------------------------------------------------------------------------------- 1 | // add everything inside _weaponsItemsCargo (includes the weapon) 2 | params ["_weaponsItemsCargo"]; 3 | private ["_weapons", "_magazines", "_items"]; 4 | _weapons = []; 5 | _magazines = []; 6 | _items = []; 7 | 8 | { 9 | _weapon = [(_x select 0)] call BIS_fnc_baseWeapon; 10 | _weapons pushBack ([(_x select 0)] call BIS_fnc_baseWeapon); 11 | 12 | _magazines pushBack ((_x select 4) select 0); 13 | 14 | for "_i" from 1 to (count _x) - 1 do { 15 | _cosa = _x select _i; 16 | if (typeName _cosa == typeName "") then { 17 | if (_cosa != "") then {_items pushBack _cosa}; 18 | }; 19 | }; 20 | } forEach _weaponsItemsCargo; 21 | [_weapons, _magazines, _items] 22 | -------------------------------------------------------------------------------- /Antistasi/fnc_unlockVehicle.sqf: -------------------------------------------------------------------------------- 1 | private _veh = cursortarget; 2 | if (isNull _veh) exitWith {hint "You are not looking at any vehicle"}; 3 | 4 | if (player call AS_fnc_controlsAI) exitWith {hint "You cannot do this while controlling an AI"}; 5 | 6 | if ({isPlayer _x} count crew _veh > 0) exitWith {hint "In order to unlock this vehicle, it must be empty."}; 7 | 8 | private _owner = _veh getVariable "AS_vehOwner"; 9 | private _isFIA = isNil "_owner"; 10 | 11 | if _isFIA exitWith { 12 | hint "vehicle is already unlocked"; 13 | }; 14 | if (_owner != getPlayerUID player) exitWith { 15 | hint "You do not own this vehicle"; 16 | }; 17 | _veh setVariable ["AS_vehOwner", nil, true]; 18 | hint "vehicle unlocked"; 19 | -------------------------------------------------------------------------------- /Antistasi/fnc_EH_KeyDown.sqf: -------------------------------------------------------------------------------- 1 | params ["_control", "_key", "_shift", "_ctrl", "_alt"]; 2 | _handled = false; 3 | if (player call AS_medical_fnc_isUnconscious) exitWith {_handled}; 4 | if (player call AS_fnc_controlsAI) exitWith {_handled}; 5 | if (_key == 21) then { 6 | if (_shift) then { 7 | if (player == AS_commander) then { 8 | if (_ctrl) then { 9 | CreateDialog "com_menu"; 10 | } else { 11 | [] spawn AS_fnc_callArtillerySupport; 12 | }; 13 | }; 14 | } else { 15 | if (player == AS_commander) then { 16 | closedialog 0; 17 | createDialog "radio_comm_commander"; 18 | } else { 19 | closedialog 0; 20 | createDialog "radio_comm_player"; 21 | }; 22 | }; 23 | }; 24 | 25 | _handled 26 | -------------------------------------------------------------------------------- /Antistasi/arsenal/fnc_unlockedCargoList.sqf: -------------------------------------------------------------------------------- 1 | private _cargo_w = [[], []]; 2 | private _cargo_m = [[], []]; 3 | private _cargo_i = [[], []]; 4 | private _cargo_b = [[], []]; 5 | 6 | { 7 | (_cargo_w select 0) pushBack _x; 8 | (_cargo_w select 1) pushBack 100; 9 | } forEach unlockedWeapons; 10 | 11 | { 12 | (_cargo_m select 0) pushBack _x; 13 | (_cargo_m select 1) pushBack 100; 14 | } forEach unlockedMagazines; 15 | 16 | { 17 | (_cargo_i select 0) pushBack _x; 18 | (_cargo_i select 1) pushBack 100; 19 | } forEach unlockedItems; 20 | { 21 | (_cargo_b select 0) pushBack _x; 22 | (_cargo_b select 1) pushBack 100; 23 | } forEach unlockedBackpacks; 24 | 25 | [_cargo_w, _cargo_m, _cargo_i, _cargo_b] 26 | -------------------------------------------------------------------------------- /Antistasi/dictionary/fnc__get.sqf: -------------------------------------------------------------------------------- 1 | #include "macros.hpp" 2 | 3 | private _dictionary = _this select 0; 4 | private _key = _this select (count _this - 1); // last is the last key 5 | if (count _this == 2) exitWith { 6 | private _key = _this select 1; 7 | _dictionary getVariable (toLower _key) // may be nil 8 | }; 9 | 10 | for "_i" from 1 to (count _this - 2) do { 11 | _dictionary = [_dictionary, _this select _i] call EFUNC(_get); 12 | if isNil "_dictionary" exitWith {}; 13 | }; 14 | if isNil "_dictionary" exitWith {}; 15 | if not ISOBJECT(_dictionary) exitWith { 16 | diag_log format ["DICT:get(%1):ERROR: first argument must be an object", _dictionary]; 17 | }; 18 | _dictionary getVariable (toLower _key) 19 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/Core/fnc/UPSMON_SN_EHHIT.sqf: -------------------------------------------------------------------------------- 1 | /**************************************************************** 2 | File: UPSMON_SN_EHHIT.sqf 3 | Author: Rafalsky 4 | 5 | Description: 6 | 7 | Parameter(s): 8 | 9 | Returns: 10 | 11 | ****************************************************************/ 12 | private ["_unit","_shooter","_grpId"]; 13 | _unit = _this select 0; 14 | _shooter = _this select 1; 15 | _grp = group _unit; 16 | 17 | if (!(_unit in UPSMON_GOTHIT_ARRAY)) then 18 | { 19 | if (side _unit != side _shooter) then 20 | { 21 | UPSMON_GOTHIT_ARRAY pushback _unit; 22 | if (UPSMON_Debug > 0) then {player globalchat format["UNIT: %1, SHOOTER :%2 %3",_unit,_shooter,side _shooter]}; 23 | }; 24 | }; -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/vehicles/fnc/UPSMON_FN_unitsInCargo.sqf: -------------------------------------------------------------------------------- 1 | /**************************************************************** 2 | File: UPSMON_FN_unitsInCargo.sqf 3 | Author: Rafalsky 4 | 5 | Description: 6 | Return all units in cargo 7 | Parameter(s): 8 | <--- vehicle 9 | Returns: 10 | array of units in cargo of the vehicle (in vehicle and assigned as cargo) 11 | ****************************************************************/ 12 | private ["_vehicle","_x","_unitsInCargo"]; 13 | 14 | _vehicle = _this select 0; 15 | _unitsInCargo = []; 16 | { 17 | if( (assignedVehicleRole _x) select 0 == "Cargo") then 18 | { 19 | _unitsInCargo pushback _x; 20 | }; 21 | } forEach crew _vehicle; 22 | 23 | _unitsInCargo -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/vehicles/fnc/UPSMON_Fn_Gunnercrew.sqf: -------------------------------------------------------------------------------- 1 | /**************************************************************** 2 | File: UPSMON_Fn_Gunnercrew.sqf 3 | Author: Rafalsky 4 | 5 | Description: 6 | Return all units in turret 7 | Parameter(s): 8 | <--- vehicle 9 | Returns: 10 | array of units in turret of the vehicle (in vehicle and assigned as turret) 11 | ****************************************************************/ 12 | private ["_vehicle","_x","_unitsInturret"]; 13 | 14 | _vehicle = _this select 0; 15 | _unitsInturret = []; 16 | { 17 | if( (assignedVehicleRole _x) select 0 == "TURRET") then 18 | { 19 | _unitsInturret pushback _x; 20 | }; 21 | } forEach crew _vehicle; 22 | 23 | _unitsInturret -------------------------------------------------------------------------------- /Antistasi/tactics/fnc_ground_attack.sqf: -------------------------------------------------------------------------------- 1 | params ["_origin", "_destination", "_crew_group", "_marker", ["_threat", 0]]; 2 | 3 | private _safePosition = [_destination, _origin, _threat] call AS_fnc_getSafeRoadToUnload; 4 | private _wp1 = _crew_group addWaypoint [_safePosition, 0]; 5 | _wp1 setWaypointType "MOVE"; 6 | _wp1 setWaypointSpeed "FULL"; 7 | _wp1 setWaypointBehaviour "CARELESS"; 8 | 9 | _crew_group setVariable ["AS_patrol_marker", _marker, true]; 10 | private _statement = { 11 | {deleteWaypoint _x} forEach waypoints group this; 12 | [this, group this getVariable "AS_patrol_marker", "COMBAT", "SPAWNED", "NOFOLLOW"] spawn UPSMON; 13 | }; 14 | 15 | _wp1 setWaypointStatements ["true", _statement call AS_fnc_codeToString]; 16 | -------------------------------------------------------------------------------- /Antistasi/tactics/fnc_ground_combined.sqf: -------------------------------------------------------------------------------- 1 | params ["_origin", "_destination", "_crew_group", "_marker", ["_threat", 0]]; 2 | 3 | private _safePosition = [_destination, _origin, _threat] call AS_fnc_getSafeRoadToUnload; 4 | private _wp1 = _crew_group addWaypoint [_safePosition, 0]; 5 | _wp1 setWaypointType "UNLOAD"; 6 | _wp1 setWaypointSpeed "FULL"; 7 | _wp1 setWaypointBehaviour "CARELESS"; 8 | 9 | _crew_group setVariable ["AS_patrol_marker", _marker, true]; 10 | private _statement = { 11 | {deleteWaypoint _x} forEach waypoints group this; 12 | [this, group this getVariable "AS_patrol_marker", "COMBAT", "SPAWNED", "NOFOLLOW"] spawn UPSMON; 13 | }; 14 | 15 | _wp1 setWaypointStatements ["true", _statement call AS_fnc_codeToString]; 16 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/Core/fnc/UPSMON_arrayShufflePlus.sqf: -------------------------------------------------------------------------------- 1 | /**************************************************************** 2 | File: UPSMON_arrayShufflePlus.sqf 3 | Author: KillZoneKid 4 | 5 | Description: 6 | 7 | Parameter(s): 8 | <--- Array 9 | Returns: 10 | Array 11 | ****************************************************************/ 12 | 13 | private ["_cnt","_el1","_rnd","_indx","_el2"]; 14 | 15 | _cnt = count _this - 1; 16 | _el1 = _this select _cnt; 17 | _this resize _cnt; 18 | _rnd = random diag_tickTime * _cnt; 19 | for "_i" from 0 to _cnt do { 20 | _indx = floor random _rnd % _cnt; 21 | _el2 = _this select _indx; 22 | _this set [_indx, _el1]; 23 | _el1 = _el2; 24 | }; 25 | _this set [_cnt, _el1]; 26 | _this -------------------------------------------------------------------------------- /Antistasi/spawn/fnc_states.sqf: -------------------------------------------------------------------------------- 1 | /* 2 | Description: 3 | Returns the lists of state functions and state names 4 | */ 5 | params ["_type", "_spawn"]; 6 | if (_type == "mission") exitWith { 7 | _spawn call AS_mission_fnc_spawn_states 8 | }; 9 | if (_type == "location") exitWith { 10 | _spawn call AS_location_fnc_spawn_states 11 | }; 12 | if (_type == "AAFpatrol") exitWith { 13 | [AS_spawn_patrolAAF_states, AS_spawn_patrolAAF_state_functions] 14 | }; 15 | if (_type == "AAFroadPatrol") exitWith { 16 | [AS_spawn_AAFroadPatrol_states, AS_spawn_AAFroadPatrol_state_functions] 17 | }; 18 | 19 | diag_log format ["[AS] Error: spawn_states: invalid arguments [%1, %2]", _type, _spawn]; 20 | [[], []] // default is to not do anything (no states) 21 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/Get_pos/UPSMON_pos_fnc_getposfromcircle.sqf: -------------------------------------------------------------------------------- 1 | // In: marker 2 | // Out: position 3 | 4 | // Center point 5 | private ["_center","_centerX","_centerY"]; 6 | _center = getMarkerPos _this; 7 | _centerX = _center select 0; 8 | _centerY = _center select 1; 9 | 10 | // Size 11 | private ["_size"]; 12 | _size = getMarkerSize _this; 13 | _size = _size select 0; 14 | 15 | // Randomly pick a direction, 16 | private ["_dir","_posX","_posY","_rand","_pos"]; 17 | _dir = random 360; 18 | _rand = sqrt random 1; 19 | _posX = (_size * (cos _dir)) * _rand; 20 | _posY = (_size * (sin _dir)) * _rand; 21 | _pos = [_posX,_posY]; 22 | 23 | _posX = _centerX + (_pos select 0); 24 | _posY = _centerY + (_pos select 1); 25 | 26 | [_posX,_posY,0] 27 | -------------------------------------------------------------------------------- /Antistasi/scheduler/fnc_initialize.sqf: -------------------------------------------------------------------------------- 1 | // number of samples in the moving average of FPS 2 | #define WINDOW_SIZE 12 3 | 4 | AS_FPSsamples = []; // the recent FPS samples of each machine (local) 5 | for "_i" from 0 to WINDOW_SIZE do { 6 | AS_FPSsamples pushBack 60; 7 | }; 8 | 9 | if isServer then { 10 | // the server stores status of the clients 11 | AS_workers = createSimpleObject ["Static", [0, 0, 0]]; 12 | AS_workers setVariable ["_all", []]; 13 | } else { 14 | // clients send status to the server 15 | [] spawn { 16 | while {true} do { 17 | call AS_scheduler_fnc_sendStatus; 18 | sleep 5; 19 | }; 20 | }; 21 | }; 22 | // all sides measure FPS 23 | [] spawn AS_scheduler_fnc_measureFPS; 24 | -------------------------------------------------------------------------------- /Antistasi/database/cfgFunctions.hpp: -------------------------------------------------------------------------------- 1 | class AS_database { 2 | class server { 3 | FNC(database,getData); 4 | FNC(database,setData); 5 | FNC(database,getGames); 6 | FNC(database,getAdmin); 7 | FNC(database,saveGame); 8 | FNC(database,loadGame); 9 | FNC(database,deleteGame); 10 | FNC(database,serialize); 11 | FNC(database,deserialize); 12 | FNC(database,migrate); 13 | FNC(database,apply_migration); 14 | FNC(database,hq_toDict); 15 | FNC(database,hq_fromDict); 16 | FNC(database,persistents_toDict); 17 | FNC(database,persistents_fromDict); 18 | FNC(database,persistents_start); 19 | INIT_FNC(database,init); 20 | }; 21 | }; 22 | -------------------------------------------------------------------------------- /Antistasi/fnc_spawnCSATuav.sqf: -------------------------------------------------------------------------------- 1 | params ["_position", "_marker"]; 2 | 3 | private _vehicles = []; 4 | private _groups = []; 5 | 6 | if (count (["CSAT", "uavs_small"] call AS_fnc_getEntity) != 0) then { 7 | private _uavType = selectRandom (["CSAT", "uavs_small"] call AS_fnc_getEntity); 8 | private _uav = createVehicle [_uavType, _position, [], 0, "FLY"]; 9 | _vehicles pushBack _uav; 10 | createVehicleCrew _uav; 11 | private _grupoUAV = group (crew _uav select 1); 12 | [leader _grupoUAV, _marker, "SAFE", "SPAWNED","NOVEH", "NOFOLLOW"] spawn UPSMON; 13 | [_uav,"CSAT"] call AS_fnc_initVehicle; 14 | {_x call AS_fnc_initUnitCSAT;} forEach units _grupoUAV; 15 | _groups pushBack _grupoUAV; 16 | }; 17 | 18 | [_groups, _vehicles] 19 | -------------------------------------------------------------------------------- /Antistasi/players/fnc_change.sqf: -------------------------------------------------------------------------------- 1 | #include "../macros.hpp" 2 | AS_SERVER_ONLY("players_fnc_change"); 3 | params ["_player", "_attribute", "_difference", ["_notify", true]]; 4 | private _id = getPlayerUID _player; 5 | 6 | private _old_amount = [_player, _attribute] call AS_players_fnc_get; 7 | if (_attribute == "money") then { 8 | // must be a positive value 9 | _difference = (-_old_amount) max _difference; 10 | }; 11 | [AS_container, "players", _id, _attribute, _old_amount + _difference] call DICT_fnc_setGlobal; 12 | 13 | if (_notify and {_attribute == "money"}) then { 14 | private _texto = format ["





Money %1 €", _difference]; 15 | [petros, "income", _texto] remoteExec ["AS_fnc_localCommunication", _player]; 16 | }; 17 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/buildings/fnc/UPSMON_Isroof.sqf: -------------------------------------------------------------------------------- 1 | /**************************************************************** 2 | File: UPSMON_Isroof.sqf 3 | Author: Azroul13 4 | 5 | Description: 6 | Check if the AI is under a roof. 7 | 8 | Parameter(s): 9 | <--- Unit 10 | Returns: 11 | boolean 12 | ****************************************************************/ 13 | 14 | private ["_Inbuilding","_Roof","_unit"]; 15 | 16 | _unit = _this select 0; 17 | 18 | _Inbuilding = false; 19 | _Roof = lineIntersectsWith [getposASL _unit, [((getposASL _unit) select 0), ((getposASL _unit) select 1), ((getposASL _unit) select 2) + 20]]; 20 | 21 | If (count _Roof > 0) then 22 | { 23 | _Inbuilding = (_Roof select 0) isKindOf "BUILDING"; 24 | }; 25 | 26 | _Inbuilding -------------------------------------------------------------------------------- /Antistasi/fnc_HQdeployPad.sqf: -------------------------------------------------------------------------------- 1 | #include "macros.hpp" 2 | AS_SERVER_ONLY("fnc_HQdeployPad.sqf"); 3 | // _obj is the paint 4 | params ["_obj"]; 5 | 6 | private _pos = position _obj; 7 | if ((_pos distance fuego) > 30) exitWith { 8 | [petros,"hint","Too far from HQ."] remoteExec ["AS_fnc_localCommunication",AS_commander]; 9 | deleteVehicle _obj; 10 | }; 11 | if !(isNil "vehiclePad") exitWith { 12 | [petros,"hint","Pad already deployed."] remoteExec ["AS_fnc_localCommunication",AS_commander]; 13 | deleteVehicle _obj; 14 | }; 15 | 16 | AS_Sset("AS_vehicleOrientation", [_caller, _obj] call BIS_fnc_dirTo); 17 | vehiclePad = createVehicle ["Land_JumpTarget_F", _pos, [], 0, "CAN_COLLIDE"]; 18 | publicVariable "vehiclePad"; 19 | 20 | deleteVehicle _obj; 21 | -------------------------------------------------------------------------------- /Antistasi/fnc_getBasesForCA.sqf: -------------------------------------------------------------------------------- 1 | params ["_position", ["_ignoreRadio", false]]; 2 | 3 | // get closest airfield within some conditions 4 | private _base = ""; 5 | private _closestDistance = 5000; 6 | { 7 | private _busy = _x call AS_location_fnc_busy; 8 | private _pos = _x call AS_location_fnc_position; 9 | private _radio = true; 10 | if (!_ignoreRadio) then {_radio = _pos call AS_fnc_hasRadioCoverage}; 11 | if ((_radio and _position distance _pos < _closestDistance or 12 | _position distance _pos < 2000) and 13 | !(_x call AS_location_fnc_spawned) and !_busy) then { 14 | _base = _x; 15 | _closestDistance = _position distance _pos; 16 | }; 17 | } forEach (["base", "AAF"] call AS_location_fnc_TS); 18 | 19 | _base 20 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/vehicles/fnc/UPSMON_UnitsGetOut.sqf: -------------------------------------------------------------------------------- 1 | /**************************************************************** 2 | File: UPSMON_UnitsGetout.sqf 3 | Author: Azroul13 4 | 5 | Description: 6 | Make unit leave the vehicle 7 | Parameter(s): 8 | <--- vehicle 9 | <--- Units 10 | Returns: 11 | 12 | ****************************************************************/ 13 | private["_transport","_units"]; 14 | 15 | _transport = _this select 0; 16 | _units = _this select 1; 17 | 18 | { 19 | unassignVehicle _x; 20 | _x action ["GETOUT", _transport]; 21 | doGetOut _x; 22 | [_x] allowGetIn false; 23 | _x leaveVehicle _transport; 24 | _Pos = [getposATL _x,[5,20],[0,360]] call UPSMON_pos; 25 | _x domove _Pos; 26 | sleep 0.1; 27 | } forEach _units; -------------------------------------------------------------------------------- /Antistasi/fnc_createGroup.sqf: -------------------------------------------------------------------------------- 1 | /* 2 | Spawns a group in a vehicle taking into account the number of seats available 3 | */ 4 | params ["_groupComposition", "_group", "_position", ["_maxUnits", 20]]; 5 | 6 | _groupComposition params ["_types", "_positions", "_ranks"]; 7 | 8 | for "_i" from 0 to ((count _types min _maxUnits) - 1) do { 9 | private _relPos = _positions select _i; 10 | private _unitPos = [(_position select 0) + (_relPos select 0), (_position select 1) + (_relPos select 1)]; 11 | private _type = _types select _i; 12 | private _rank = _ranks select _i; 13 | 14 | private _unit = _group createUnit [_type, _unitPos, [], 0, "NONE"]; 15 | [_unit, _rank] call bis_fnc_setRank; 16 | [_unit] joinsilent _group; 17 | }; 18 | 19 | _group 20 | -------------------------------------------------------------------------------- /Antistasi/location/fnc_set.sqf: -------------------------------------------------------------------------------- 1 | #include "../macros.hpp" 2 | AS_SERVER_ONLY("AS_location_fnc_set"); 3 | params ["_location", "_property", "_value", ["_update",true]]; 4 | if (_property != "type" and {not (_property in ((_location call AS_location_fnc_type) call AS_location_fnc_properties))}) exitWith { 5 | diag_log format ["[AS] Error: AS_location_fnc_set: wrong property '%1' for location '%2'", _property, _location]; 6 | }; 7 | [call AS_location_fnc_dictionary, _location, _property, _value] call DICT_fnc_setGlobal; 8 | if not _update exitWith {}; 9 | 10 | if (_property == "position") then { 11 | _location setMarkerPos _value; 12 | }; 13 | if (_property in ["position", "side", "garrison"]) then { 14 | _location call AS_location_fnc_updateMarker; 15 | }; 16 | -------------------------------------------------------------------------------- /Antistasi/location/spawn/fnc_AAFwait_capture.sqf: -------------------------------------------------------------------------------- 1 | params ["_location"]; 2 | private _posicion = _location call AS_location_fnc_position; 3 | private _size = _location call AS_location_fnc_size; 4 | 5 | private _soldados = [_location, "soldiers"] call AS_spawn_fnc_get; 6 | 7 | private _fnc_was_captured = { 8 | (({(not(vehicle _x isKindOf "Air"))} count ([_size, _posicion, "BLUFORSpawn"] call AS_fnc_unitsAtDistance)) > 9 | 3*({_x call AS_fnc_canFight} count _soldados)) 10 | }; 11 | 12 | private _was_captured = false; 13 | waitUntil {sleep 1; 14 | _was_captured = call _fnc_was_captured; 15 | (not (_location call AS_location_fnc_spawned)) or _was_captured 16 | }; 17 | 18 | if _was_captured then { 19 | [_location] remoteExec ["AS_fnc_win_location", 2]; 20 | }; 21 | -------------------------------------------------------------------------------- /Antistasi/location/spawn/fnc_FIAwait_capture.sqf: -------------------------------------------------------------------------------- 1 | params ["_location"]; 2 | private _posicion = _location call AS_location_fnc_position; 3 | private _size = _location call AS_location_fnc_size; 4 | 5 | private _soldados = [_location, "soldiers"] call AS_spawn_fnc_get; 6 | 7 | private _fnc_was_captured = { 8 | (({(not(vehicle _x isKindOf "Air"))} count ([_size, _posicion, "OPFORSpawn"] call AS_fnc_unitsAtDistance)) > 9 | 3*({_x call AS_fnc_canFight} count _soldados)) 10 | }; 11 | 12 | private _was_captured = false; 13 | waitUntil {sleep 1; 14 | _was_captured = call _fnc_was_captured; 15 | (not (_location call AS_location_fnc_spawned)) or _was_captured 16 | }; 17 | 18 | if _was_captured then { 19 | [_location] remoteExec ["AS_fnc_lose_location", 2]; 20 | }; 21 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/Core/fnc/UPSMON_Nighttime.sqf: -------------------------------------------------------------------------------- 1 | /**************************************************************** 2 | File: UPSMON_timeloop.sqf 3 | Author: CarlGustav 4 | 5 | Description: 6 | 7 | Parameter(s): 8 | 9 | Returns: 10 | 11 | ****************************************************************/ 12 | 13 | private ["_lat","_day","_hour","_sunangle","_Night"]; 14 | 15 | _Night = false; 16 | _lat = -1 * getNumber(configFile >> "CfgWorlds" >> worldName >> "latitude"); 17 | _day = 360 * (dateToNumber date); 18 | _hour = (daytime / 24) * 360; 19 | _sunangle = ((12 * cos(_day) - 78) * cos(_lat) * cos(_hour)) - (24 * sin(_lat) * cos(_day)); 20 | 21 | If (_sunangle < 0) then {_Night = true;}; 22 | If (_sunangle > 0) then {_Night = False;}; 23 | 24 | _Night; 25 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/Core/fnc/UPSMON_rotpoint.sqf: -------------------------------------------------------------------------------- 1 | /**************************************************************** 2 | File: UPSMON_rotpoint.sqf 3 | Author: KRONZKY 4 | 5 | Description: 6 | 7 | Parameter(s): 8 | 9 | Returns: 10 | 11 | ****************************************************************/ 12 | private["_cp","_a","_tx","_ty","_cd","_sd","_cx","_cy","_xout","_yout"]; 13 | 14 | _cp=_this select 0; 15 | _cx=_cp select 0; 16 | _cy=_cp select 1; 17 | _a=_this select 1; 18 | _cd=cos(_a*-1); 19 | _sd=sin(_a*-1); 20 | _tx=_this select 2; 21 | _ty=_this select 3; 22 | _xout=if (_a!=0) then 23 | { 24 | _cx+ (_cd*_tx - _sd*_ty) 25 | } else 26 | { 27 | _cx+_tx 28 | }; 29 | _yout=if (_a!=0) then {_cy+ (_sd*_tx + _cd*_ty)} else {_cy+_ty}; 30 | 31 | [_xout,_yout,0] -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/Params/fnc/UPSMON_GetRespawnpos.sqf: -------------------------------------------------------------------------------- 1 | /**************************************************************** 2 | File: UPSMON_GetRespawnpos.sqf 3 | Author: Azroul13 4 | 5 | Description: 6 | 7 | Parameter(s): 8 | <--- UPSMON parameters 9 | Returns: 10 | Array of position 11 | ****************************************************************/ 12 | private["_Ucthis","_respawnpos","_npc"]; 13 | 14 | _Ucthis = _this select 0; 15 | _npc = _this select 1; 16 | 17 | _respawnpos = getposATL _npc; 18 | If ("RESPAWNPOS:" in _Ucthis) then {_respawnpos = ["RESPAWNPOS:",_respawnpos,_UCthis] call UPSMON_getArg}; 19 | 20 | If (typename (_respawnpos select 0) == "ARRAY") then {_respawnpos = _respawnpos select (floor (random (count _respawnpos)))}; 21 | 22 | _respawnpos 23 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/vehicles/fnc/UPSMON_fnc_commonTurrets.sqf: -------------------------------------------------------------------------------- 1 | /**************************************************************** 2 | File: UPSMON_fnc_commonTurrets.sqf 3 | Author: Killzonekid 4 | 5 | Description: 6 | Get all the turretpath of the vehicle 7 | Parameter(s): 8 | <--- vehicle 9 | Returns: 10 | array of turretpath 11 | ****************************************************************/ 12 | 13 | private ["_arr","_trts"]; 14 | 15 | _arr = []; 16 | _trts = configFile / "CfgVehicles" / typeOf _this / "Turrets"; 17 | for "_i" from 0 to count _trts - 1 do 18 | { 19 | _arr pushback [_i]; 20 | 21 | for "_j" from 0 to count ( 22 | _trts / configName (_trts select _i) / "Turrets" 23 | ) - 1 do 24 | { 25 | _arr pushback [_i, _j]; 26 | }; 27 | }; 28 | 29 | _arr 30 | -------------------------------------------------------------------------------- /Antistasi/dialogs/manageMissions/fnc_UI_updatePanel.sqf: -------------------------------------------------------------------------------- 1 | disableSerialization; 2 | private _mission = lbData [0, lbCurSel 0]; 3 | private _textCbo = ((findDisplay 1602) displayCtrl 1); 4 | if (_mission == "") exitWith { 5 | _textCbo ctrlSetStructuredText parseText "No mission selected"; 6 | }; 7 | 8 | private _str_success = ""; 9 | { 10 | _str_success = _str_success + format ["* %1
", _x]; 11 | } forEach (_mission call AS_mission_fnc_getSuccessDescription); 12 | private _str_fail = ""; 13 | { 14 | _str_fail = _str_fail + format ["* %1
", _x]; 15 | } forEach (_mission call AS_mission_fnc_getFailDescription); 16 | 17 | private _str = format ["Success outcomes
%1Failure outcomes
%2", _str_success, _str_fail]; 18 | 19 | _textCbo ctrlSetStructuredText parseText _str; 20 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/Core/fnc/UPSMON_randomPos.sqf: -------------------------------------------------------------------------------- 1 | /**************************************************************** 2 | File: UPSMON_randomPos.sqf 3 | Author: KRONZKY 4 | 5 | Description: 6 | 7 | Parameter(s): 8 | 9 | Returns: 10 | 11 | ****************************************************************/ 12 | private["_cx","_cy","_rx","_ry","_cd","_sd","_ad","_tx","_ty","_xout","_yout"]; 13 | 14 | _cx=_this select 0; 15 | _cy=_this select 1; 16 | _rx=_this select 2; 17 | _ry=_this select 3; 18 | _cd=_this select 4; 19 | _sd=_this select 5; 20 | _ad=_this select 6; 21 | _tx=random (_rx*2)-_rx; 22 | _ty=random (_ry*2)-_ry; 23 | _xout=if (_ad!=0) then {_cx+ (_cd*_tx - _sd*_ty)} else {_cx+_tx}; 24 | _yout=if (_ad!=0) then {_cy+ (_sd*_tx + _cd*_ty)} else {_cy+_ty}; 25 | [_xout,_yout] -------------------------------------------------------------------------------- /Antistasi/fnc_getAirportsForCA.sqf: -------------------------------------------------------------------------------- 1 | params ["_position", ["_ignoreRadio", false]]; 2 | 3 | // get closest airfield within some conditions 4 | private _airfield = ""; 5 | private _closestDistance = 10000; 6 | { 7 | private _busy = _x call AS_location_fnc_busy; 8 | private _pos = _x call AS_location_fnc_position; 9 | private _radio = true; 10 | if (!_ignoreRadio) then {_radio = _pos call AS_fnc_hasRadioCoverage}; 11 | if (_position distance _pos < _closestDistance and 12 | _position distance _pos > 2000 and 13 | !(_x call AS_location_fnc_spawned) and !_busy and _radio) then { 14 | _airfield = _x; 15 | _closestDistance = _position distance _pos; 16 | }; 17 | } forEach (["airfield", "AAF"] call AS_location_fnc_TS); 18 | 19 | _airfield 20 | -------------------------------------------------------------------------------- /Antistasi/AI/VANTinfo.sqf: -------------------------------------------------------------------------------- 1 | #include "../macros.hpp" 2 | params ["_veh","_posicion"]; 3 | private ["_grupos","_conocidos","_grupo","_lider"]; 4 | 5 | while {alive _veh} do 6 | { 7 | _conocidos = []; 8 | _grupos = []; 9 | _enemigos = [AS_P("spawnDistance"), _posicion, "OPFORSpawn"] call AS_fnc_unitsAtDistance; 10 | sleep 60; 11 | { 12 | _lider = leader _x; 13 | if ((_lider in _enemigos) and (vehicle _lider != _lider)) then {_grupos pushBack _x}; 14 | } forEach allGroups; 15 | { 16 | if ((side _x == ("FIA" call AS_fnc_getFactionSide)) and (alive _x) and (_x distance _posicion < 500)) then 17 | { 18 | _conocidos pushBack _x; 19 | }; 20 | } forEach allUnits; 21 | { 22 | _grupo = _x; 23 | { 24 | _grupo reveal [_x,4]; 25 | } forEach _conocidos; 26 | } forEach _grupos; 27 | 28 | }; 29 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/Init.sqf: -------------------------------------------------------------------------------- 1 | //Group 2 | UPSMON_SetLeaderGrp = call compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Group\UPSMON_SetLeaderGrp.sqf"; 3 | 4 | UPSMON_GetParams = call compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Group\Params\UPSMON_GetParams.sqf"; 5 | UPSMON_GetGroupbehaviour = call compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Group\Params\UPSMON_GetGroupbehaviour.sqf"; 6 | UPSMON_GetGroupformation = call compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Group\Params\UPSMON_GetGroupformation.sqf"; 7 | UPSMON_GetGroupspeed = call compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Group\Params\UPSMON_GetGroupspeed.sqf"; 8 | UPSMON_SetEventhandlers = call compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Group\Params\UPSMON_SetEventhandlers.sqf"; -------------------------------------------------------------------------------- /Antistasi/location/spawn/fnc_AAFlocation_clean.sqf: -------------------------------------------------------------------------------- 1 | params ["_location"]; 2 | waitUntil {sleep 1; not (_location call AS_location_fnc_spawned)}; 3 | 4 | private _soldados = [_location, "soldiers"] call AS_spawn_fnc_get; 5 | 6 | { 7 | // store unit arsenal if location is FIA and unit is dead (store dead AAF units) 8 | if ((_location call AS_location_fnc_side == "FIA") and !alive _x) then { 9 | ([_x, true] call AS_fnc_getUnitArsenal) params ["_cargo_w", "_cargo_m", "_cargo_i", "_cargo_b"]; 10 | [caja, _cargo_w, _cargo_m, _cargo_i, _cargo_b, true] call AS_fnc_populateBox; 11 | }; 12 | } forEach _soldados; 13 | 14 | ([_location, "resources"] call AS_spawn_fnc_get) params ["_task", "_groups", "_vehicles", "_markers"]; 15 | [_groups, _vehicles, _markers] call AS_fnc_cleanResources; 16 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/Group/fnc/UPSMON_Cangrpmaneuver.sqf: -------------------------------------------------------------------------------- 1 | 2 | private ["_grp","_nowp","_attackpos","_typeofgrp","_maneuver"]; 3 | 4 | _grp = _this select 0; 5 | _nowp = _this select 1; 6 | _attackpos = _this select 2; 7 | _typeofgrp = _this select 3; 8 | 9 | _maneuver = false; 10 | 11 | If (!_nowp) then 12 | { 13 | If (count _attackpos > 0) then 14 | { 15 | If (!("static" in _typeofgrp)) then 16 | { 17 | If (!("arti" in _typeofgrp)) then 18 | { 19 | If (!("supply" in _typeofgrp)) then 20 | { 21 | If (_grp getvariable ["UPSMON_TIMEORDER",time] <= time) then 22 | { 23 | If (_grp getvariable ["UPSMON_Grpmission",""] != "TRANSPORT") then 24 | { 25 | _maneuver = true; 26 | }; 27 | }; 28 | }; 29 | }; 30 | }; 31 | }; 32 | }; 33 | 34 | _maneuver; -------------------------------------------------------------------------------- /Antistasi/location/fnc_add.sqf: -------------------------------------------------------------------------------- 1 | // adds a location. The first argument must be a marker. The location 2 | // taks ownership of it. Every location requires a different marker. 3 | #include "../macros.hpp" 4 | AS_SERVER_ONLY("AS_location_fnc_add"); 5 | params ["_marker", "_type", ["_update", true]]; 6 | [call AS_location_fnc_dictionary, _marker, call DICT_fnc_create] call DICT_fnc_setGlobal; 7 | [_marker, "type", _type, false] call AS_location_fnc_set; 8 | [_marker, "position", getMarkerPos _marker, false] call AS_location_fnc_set; 9 | _marker call AS_location_fnc_init; 10 | 11 | [_marker, "size", ((getMarkerSize _marker) select 0) max ((getMarkerSize _marker) select 1), false] call AS_location_fnc_set; 12 | _marker setMarkerAlpha 0; 13 | if _update exitWith { 14 | _marker call AS_location_fnc_updateMarker; 15 | }; 16 | -------------------------------------------------------------------------------- /Antistasi/database/fnc_hq_fromDict.sqf: -------------------------------------------------------------------------------- 1 | #include "../macros.hpp" 2 | AS_SERVER_ONLY("AS_database_fnc_hq_fromDict"); 3 | params ["_dict"]; 4 | 5 | { 6 | (AS_permanent_HQplacements select _forEachIndex) setPos (_x select 0); 7 | (AS_permanent_HQplacements select _forEachIndex) setDir (_x select 1); 8 | } forEach ([_dict, "permanents"] call DICT_fnc_get); 9 | 10 | {deleteVehicle _x} forEach AS_HQ_placements; 11 | AS_HQ_placements = []; 12 | { 13 | _x params ["_pos", "_dir", "_type"]; 14 | private _obj = _type createVehicle _pos; 15 | _obj setDir _dir; 16 | AS_HQ_placements pushBack _obj; 17 | [[_obj,"moveObject"],"AS_fnc_addAction"] call BIS_fnc_MP; 18 | } forEach ([_dict, "placed"] call DICT_fnc_get); 19 | 20 | fuego inflame ([_dict, "inflame"] call DICT_fnc_get); 21 | call AS_fnc_initPetros; 22 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/MODULES/ARTILLERY/fnc/UPSMON_artilleryBatteryout.sqf: -------------------------------------------------------------------------------- 1 | /**************************************************************** 2 | File: UPSMON_artilleryBatteryout.sqf 3 | Author: Azroul13 4 | 5 | Description: 6 | Mortar units repack the static weapon 7 | Parameter(s): 8 | 9 | Returns: 10 | nothing 11 | ****************************************************************/ 12 | private ["_batteryunits","_staticteam"]; 13 | 14 | _batteryunits = _this select 0; 15 | 16 | If (typename (_batteryunits select 0) == "ARRAY") then 17 | { 18 | _staticteam = _batteryunits select 0; 19 | { 20 | If (!alive _x) exitwith {_batteryunits = [];}; 21 | } foreach _staticteam; 22 | 23 | If (count _batteryunits > 0) then 24 | { 25 | [_staticteam select 0,_staticteam select 1] call UPSMON_Packbag; 26 | }; 27 | 28 | }; -------------------------------------------------------------------------------- /Antistasi/arsenal/fnc_collectDroppedEquipment.sqf: -------------------------------------------------------------------------------- 1 | #include "../macros.hpp" 2 | AS_SERVER_ONLY("fnc_collectDroppedEquipment"); 3 | params ["_position", "_size", "_box"]; 4 | { 5 | ([_x, true] call AS_fnc_getBoxArsenal) params ["_cargo_w", "_cargo_m", "_cargo_i", "_cargo_b"]; 6 | [_box, _cargo_w, _cargo_m, _cargo_i, _cargo_b, true] call AS_fnc_populateBox; 7 | deleteVehicle _x; 8 | } forEach nearestObjects [_position, ["WeaponHolderSimulated", "WeaponHolder"], _size]; 9 | 10 | { 11 | if not (alive _x) then { 12 | ([_x, true] call AS_fnc_getUnitArsenal) params ["_cargo_w", "_cargo_m", "_cargo_i", "_cargo_b"]; 13 | [_box, _cargo_w, _cargo_m, _cargo_i, _cargo_b, true] call AS_fnc_populateBox; 14 | _x call AS_fnc_emptyUnit; 15 | }; 16 | } forEach (_position nearObjects ["Man", _size]); 17 | -------------------------------------------------------------------------------- /Antistasi/hpp_macros.hpp: -------------------------------------------------------------------------------- 1 | #define DOUBLES(var1,var2) ##var1##_##var2 2 | #define TRIPLES(var1,var2,var3) ##var1##_##var2##_##var3 3 | #define QUOTE(var1) #var1 4 | #define FNC_FILE_BASE(func) QUOTE(DOUBLES(fnc,func).sqf) 5 | #define FNC_BASE(func) class func {file = FNC_FILE_BASE(func);} 6 | #define FNC_FILE(component,func) QUOTE(component\DOUBLES(fnc,func).sqf) 7 | #define FNC(component,func) class func {file = FNC_FILE(component,func);} 8 | #define INIT_FNC(component,func) class func {file = FNC_FILE(component,func); preInit = 1;} 9 | 10 | #define FNC_UI_FILE(component,func) QUOTE(component\TRIPLES(fnc,UI,func).sqf) 11 | #define FNC_UI(component,func) class UI_##func {file = FNC_UI_FILE(component,func);} 12 | #define FNC_UI_PREFIX(component,prefix,func) class TRIPLES(UI,prefix,func) {file = FNC_UI_FILE(component\prefix,func);} 13 | -------------------------------------------------------------------------------- /Antistasi/players/fnc_get.sqf: -------------------------------------------------------------------------------- 1 | params ["_player", "_attribute"]; 2 | 3 | private _id = getPlayerUID _player; 4 | 5 | if not ([AS_container, "players", _id] call DICT_fnc_exists) then { 6 | [AS_container, "players", _id, call DICT_fnc_create] call DICT_fnc_setGlobal; 7 | }; 8 | 9 | if ([AS_container, "players", _id, _attribute] call DICT_fnc_exists) then { 10 | [AS_container, "players", _id, _attribute] call DICT_fnc_get 11 | } else { 12 | switch _attribute do { 13 | case "traits": {[]}; 14 | case "garage": {[]}; 15 | case "rank": {AS_ranks select 0}; 16 | case "elegible": {if (_player == AS_commander) then {false} else {true}}; 17 | case "money": {100}; 18 | case "score": {if (_player == AS_commander) then {25} else {0}}; 19 | default {nil}; 20 | } 21 | }; 22 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/MP/fnc/UPSMON_fnc_setVehicleVarName.sqf: -------------------------------------------------------------------------------- 1 | /**************************************************************** 2 | File: UPSMON_fnc_setVehicleVarName.sqf 3 | Author: Ollem 4 | 5 | Description: 6 | Replacement of "setvehicleinit" command. 7 | Parameter(s): 8 | <--- netid object 9 | <--- unit name 10 | Returns: 11 | Nothing 12 | ****************************************************************/ 13 | 14 | private ["_netID","_unit","_unitname"]; 15 | 16 | _netID = _this select 0; 17 | _unit = objectFromNetID _netID; 18 | _unitname = _this select 1; 19 | 20 | _unit setVehicleVarName _unitname; 21 | _unit call compile format ["%1=_This; PublicVariable ""%1""",_unitname]; 22 | 23 | if (UPSMON_Debug>0) then { diag_log format ["UPSMON 'UPSMON_fnc_setVehicleVarName': %1=_This; PublicVariable ""%1""",_unitname]; }; -------------------------------------------------------------------------------- /Antistasi/dictionary/fnc__splitStringDelimited.sqf: -------------------------------------------------------------------------------- 1 | // a splitString that accepts a delimiter with more than one char and 2 | // ignores delimiters within starters and enders 3 | #include "macros.hpp" 4 | 5 | params ["_string", "_delimiter", "_starter", "_ender"]; 6 | if (_string find _delimiter == -1) exitWith { 7 | [_string] 8 | }; 9 | private _bits = [_string, _delimiter] call EFUNC(_splitString); 10 | private _level = 0; 11 | private _result = []; 12 | { 13 | if (_level == 0) then { 14 | _result pushBack _x; 15 | } else { 16 | private _last = count _result - 1; 17 | _result set [_last, (_result select _last) + _delimiter + _x]; 18 | }; 19 | _level = _level + count ([_x, _starter] call EFUNC(_splitString)) - count ([_x, _ender] call EFUNC(_splitString)); 20 | } forEach _bits; 21 | _result 22 | -------------------------------------------------------------------------------- /Antistasi/fia_recruitment/fnc_recruitFIAgarrison.sqf: -------------------------------------------------------------------------------- 1 | #include "../macros.hpp" 2 | params ["_type", "_location"]; 3 | 4 | if (AS_P("hr") < 1) exitWith {hint "You lack of HR to make a new recruitment"}; 5 | 6 | private _cost = _type call AS_fnc_getCost; 7 | 8 | if (_cost > AS_P("resourcesFIA")) exitWith {hint format ["You do not have enough money for this unit (%1 € needed)",_cost]}; 9 | 10 | private _position = _location call AS_location_fnc_position; 11 | 12 | if ([_position, 500] call AS_fnc_enemiesNearby) exitWith { 13 | hint "There are enemies within 500m of the zone. You can not recruit."; 14 | }; 15 | 16 | [-1,-_cost] remoteExec ["AS_fnc_changeFIAmoney",2]; 17 | private _garrison = [_location, "garrison"] call AS_location_fnc_get; 18 | _garrison pushBack _type; 19 | [_location, "garrison", _garrison] call AS_location_fnc_set; 20 | -------------------------------------------------------------------------------- /Antistasi/fnc_addMinefield.sqf: -------------------------------------------------------------------------------- 1 | #include "macros.hpp" 2 | AS_SERVER_ONLY("fnc_addMinefield.sqf"); 3 | params ["_position", "_side", ["_minesData", []]]; 4 | 5 | private _size = 100; 6 | 7 | private _mrk = createMarker [format ["minefield%1", random 1000], _position]; 8 | _mrk setMarkerShape "ELLIPSE"; 9 | _mrk setMarkerSize [_size,_size]; // size of minefield 10 | _mrk setMarkerAlpha 0; 11 | [_mrk,"minefield", false] call AS_location_fnc_add; 12 | [_mrk,"side",_side] call AS_location_fnc_set; 13 | 14 | if (_minesData isEqualTo []) then { 15 | for "_i" from 1 to (30 + floor random 30) do { 16 | _minesData pushBack [selectRandom (["AAF", "ap_mines"] call AS_fnc_getEntity), ([_position, random _size, random 360] call BIS_Fnc_relPos), random 360]; 17 | }; 18 | }; 19 | [_mrk,"mines",_minesData] call AS_location_fnc_set; 20 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/Group/fnc/UPSMON_grptype.sqf: -------------------------------------------------------------------------------- 1 | /**************************************************************** 2 | File: UPSMON_grptype.sqf 3 | Author: Azroul13 4 | 5 | Description: 6 | get the type of the group 7 | Parameter(s): 8 | <--- leader 9 | Returns: 10 | ----> Group type ("Isman"/"Iscar"/"IsAir"/"Isboat"/"Isdiver") 11 | ****************************************************************/ 12 | private []; 13 | 14 | _npc = _this select 0; 15 | _type = ""; 16 | 17 | If ("LandVehicle" countType [vehicle _npc]>0) then {_type = "Iscar"}; 18 | If ("Ship" countType [vehicle _npc]>0) then {_type = "Isboat"}; 19 | If ("Air" countType [vehicle _npc]>0) then {_type = "IsAir"}; 20 | If (["diver", (typeOf (leader _npc))] call BIS_fnc_inString) then {_type = "Isdiver"}; 21 | If (_type == "") then {_type = "Isman"}; 22 | 23 | _type -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/Get_pos/UPSMON_pos_fnc_isinrectangle.sqf: -------------------------------------------------------------------------------- 1 | // In: [pointPosition,corners] 2 | // Out: boolean 3 | private ["_pos","_corners","_return"]; 4 | _pos = _this select 0; 5 | _corners = _this select 1; 6 | _return = false; 7 | 8 | private ["_dotX","_dotY","_bottomLeft","_left","_bottom","_topRight","_right","_top"]; 9 | _dotX = _pos select 0; 10 | _dotY = _pos select 1; 11 | 12 | _bottomLeft = _corners select 0; 13 | _left = _bottomLeft select 0; 14 | _bottom = _bottomLeft select 1; 15 | 16 | _topRight = _corners select 2; 17 | _right = _topRight select 0; 18 | _top = _topRight select 1; 19 | 20 | // x is between left and right 21 | // y is between bottom and top 22 | if (_dotX >= _left && _dotX < _right && _dotY >= _bottom && _dotY < _top) then { 23 | _return = true; 24 | }; 25 | 26 | _return -------------------------------------------------------------------------------- /Antistasi/fnc_respawnPlayer.sqf: -------------------------------------------------------------------------------- 1 | #include "macros.hpp" 2 | params ["_unit"]; 3 | 4 | 5 | if (not isNil "AS_respawning") exitWith { 6 | diag_log "[AS] Error: unit was respawned while respawning"; 7 | }; 8 | if (player call AS_fnc_controlsAI) exitWith { 9 | diag_log "[AS] Error: unit was respawned while controlling an AI"; 10 | call AS_fnc_completeDropAIcontrol; 11 | }; 12 | if not isPlayer _unit exitWith { 13 | diag_log "[AS] Error: non-player was respawned"; 14 | }; 15 | AS_respawning = true; // avoids double-respawn 16 | 17 | ["Respawning",0,0,3,0,0,4] spawn bis_fnc_dynamicText; 18 | titleText ["", "BLACK IN", 0]; 19 | 20 | if isMultiplayer then { 21 | _unit setDamage 1; // triggers onPlayerRespawn.sqf 22 | } else { 23 | [_unit, _unit] call compile preprocessFileLineNumbers "onPlayerRespawn.sqf"; 24 | }; 25 | AS_respawning = nil; 26 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/Core/fnc/UPSMON_StrIndex.sqf: -------------------------------------------------------------------------------- 1 | /**************************************************************** 2 | File: UPSMON_StrIndex.sqf 3 | Author: KRONZKY 4 | 5 | Description: 6 | 7 | Parameter(s): 8 | 9 | Returns: 10 | 11 | ****************************************************************/ 12 | private["_hay","_ndl","_lh","_ln","_arr","_tmp","_i","_j","_out"]; 13 | 14 | _hay=_this select 0; 15 | _ndl=_this select 1; 16 | _out=-1; 17 | _i=0; 18 | if (_hay == _ndl) exitWith {0}; 19 | _lh=[_hay] call UPSMON_StrLen; 20 | _ln=[_ndl] call UPSMON_StrLen; 21 | if (_lh < _ln) exitWith {-1}; 22 | _arr=[_hay] call UPSMON_StrToArray; 23 | for "_i" from 0 to (_lh-_ln) do 24 | { 25 | _tmp=""; 26 | for "_j" from _i to (_i+_ln-1) do { 27 | _tmp=_tmp + (_arr select _j); 28 | }; 29 | if (_tmp==_ndl) exitWith {_out=_i}; 30 | }; 31 | _out -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/Params/fnc/UPSMON_GetGroupspeed.sqf: -------------------------------------------------------------------------------- 1 | /**************************************************************** 2 | File: UPSMON_GetGroupspeed.sqf 3 | Author: Azroul13 4 | 5 | Description: 6 | Get unit speed mode 7 | Parameter(s): 8 | <--- leader 9 | <--- UPSMON parameters 10 | Returns: 11 | ---> speed mode 12 | ****************************************************************/ 13 | private["_npc","_Ucthis","_speed"]; 14 | 15 | _npc = _this select 0; 16 | _Ucthis = _this select 1; 17 | 18 | _speed = Speedmode _npc; 19 | 20 | // set initial speed 21 | _noslow = if ("NOSLOW" in _UCthis) then {"NOSLOW"} else {"SLOW"}; 22 | if ("LIMITED" in _UCthis) then {_speed = "LIMITED"}; 23 | if ("NORMAL" in _UCthis) then {_speed = "NORMAL"}; 24 | if ("FULL" in _UCthis || _noslow == "NOSLOW") then {_speed = "FULL"}; 25 | 26 | _speed 27 | -------------------------------------------------------------------------------- /Antistasi/dialogs/manageGarrisons/fnc_UI_updateList.sqf: -------------------------------------------------------------------------------- 1 | disableSerialization; 2 | 3 | // Fill recruiting list 4 | private _cbo = ((findDisplay 1602) displayCtrl 1); 5 | lbCLear _cbo; 6 | { 7 | _cbo lbAdd(format ["%1 (%2€)", _x, _x call AS_fnc_getCost]); 8 | _cbo lbSetData[(lbSize _cbo)-1, _x]; 9 | } forEach AS_allFIARecruitableSoldiers; 10 | _cbo lbSetCurSel 0; 11 | 12 | // Fill dismiss list 13 | private _location = ctrlText ((findDisplay 1602) displayCtrl 2); 14 | private _garrison = [_location, "garrison"] call AS_location_fnc_get; 15 | 16 | _cbo = ((findDisplay 1602) displayCtrl 3); 17 | lbCLear _cbo; 18 | { 19 | private _unit = _x; 20 | _cbo lbAdd(format ["%1 (%2)", _unit, {_unit == _x} count _garrison]); 21 | _cbo lbSetData[(lbSize _cbo)-1, _unit]; 22 | } forEach (_garrison arrayIntersect _garrison); 23 | _cbo lbSetCurSel 0; 24 | -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/vehicles/fnc/UPSMON_EjectUnits.sqf: -------------------------------------------------------------------------------- 1 | /**************************************************************** 2 | File: UPSMON_EjectUnits.sqf 3 | Author: Azroul13 4 | 5 | Description: 6 | Make unit leave the vehicle 7 | Parameter(s): 8 | <--- vehicle 9 | <--- Units 10 | Returns: 11 | 12 | ****************************************************************/ 13 | private["_transport","_units","_chute"]; 14 | 15 | _transport = _this select 0; 16 | _units = _this select 1; 17 | 18 | { 19 | _x disableCollisionWith _transport; 20 | unassignVehicle _x; 21 | _x action ["EJECT", _transport]; 22 | [_x] allowGetIn false; 23 | sleep 0.25; 24 | _chute = createVehicle ["NonSteerable_Parachute_F", (getPosATL _x), [], 0, "NONE"]; 25 | _chute setPos (getPosATL _x); 26 | _x moveinDriver _chute; 27 | sleep 0.1; 28 | } forEach _units; -------------------------------------------------------------------------------- /Antistasi/Scripts/UPSMON/COMMON/buildings/fnc/UPSMON_gethighestbldpos.sqf: -------------------------------------------------------------------------------- 1 | /**************************************************************** 2 | File: UPSMON_gethighestbldpos.sqf 3 | Author: Azroul13 4 | 5 | Description: 6 | Get the highest point of the building 7 | 8 | Parameter(s): 9 | <--- Array of building positions 10 | Returns: 11 | Number 12 | ****************************************************************/ 13 | 14 | private ["_bldpos","_result","_zbldposs","_lastzbldpos"]; 15 | 16 | _bldpos = _this select 0; 17 | _result = 0; 18 | _zbldposs = []; 19 | _lastzbldpos = 0; 20 | 21 | 22 | { 23 | _zbldposs = _zbldposs + [_x select 2]; 24 | } foreach _bldpos; 25 | 26 | { 27 | _zblpos = _x; 28 | If (_zblpos > _lastzbldpos) then {_result = _zblpos;} else {_result = _lastzbldpos;}; 29 | _lastzbldpos = _x; 30 | } foreach _zbldposs; 31 | 32 | _result; -------------------------------------------------------------------------------- /Antistasi/database/fnc_loadGame.sqf: -------------------------------------------------------------------------------- 1 | #include "../macros.hpp" 2 | AS_SERVER_ONLY("AS_database_fnc_loadGame"); 3 | params ["_saveGame"]; 4 | 5 | private _admin = call AS_database_fnc_getAdmin; 6 | 7 | // Exit if the remoteExecutedOwner isn't an admin 8 | if (isRemoteExecuted && (remoteExecutedOwner != _admin) ) exitWith { 9 | diag_log "[AS] Server: loadGame cancelled; remotely executed by non-admin"; 10 | }; 11 | 12 | private _message = format ["Save '%1' loaded", _saveGame]; 13 | private _data = _saveGame call AS_database_fnc_getData; 14 | if (_data == "") then { 15 | _message = format ["Save '%1' not loaded because it does not exist", _saveGame]; 16 | } else { 17 | _data call AS_database_fnc_deserialize; 18 | }; 19 | 20 | diag_log ("[AS] Server: " + _message); 21 | if (_admin != -1) then { 22 | [_message] remoteExecCall ["hint", 2]; 23 | }; 24 | --------------------------------------------------------------------------------