Jump to content

davidoss

Member
  • Content Count

    1834
  • Joined

  • Last visited

  • Medals

Everything posted by davidoss

  1. Trenches , digg cover for your self if you not able to find any.. usage: place scripts dirctory in your mission root directory add lines in: init.sqf if (hasInterface) then { 0 = [] spawn compile preprocessFileLineNumbers "scripts\lib_trenches\trenches.sqf"; player addEventHandler ["Respawn", { 0 = [] spawn compile preprocessFileLineNumbers "scripts\lib_trenches\trenches.sqf"; }]; }; description.ext class CfgSFX { class digging_sound { sound0[] = {"scripts\lib_trenches\sounds\ShovelDigging.ogg", db-0, 1.0, 100, 0.2, 99, 99, 99}; sounds[] = {sound0}; empty[] = {"", 0, 0, 0, 0, 0, 0, 0}; }; }; class CfgVehicles { class player_digging_sound { sound = "digging_sound"; }; }; script overwiev: trenches.sqf /* by DaVidoSS Digging trenches for cover usage: place scripts directory in your mission root directory add lines in: init.sqf if (hasInterface) then { 0 = [] spawn compile preprocessFileLineNumbers "scripts\lib_trenches\trenches.sqf"; player addEventHandler ["Respawn", { 0 = [] spawn compile preprocessFileLineNumbers "scripts\lib_trenches\trenches.sqf"; }]; }; description.ext class CfgSFX { class digging_sound { sound0[] = {"scripts\lib_trenches\sounds\ShovelDigging.ogg", db-0, 1.0, 100, 0.2, 99, 99, 99}; sounds[] = {sound0}; empty[] = {"", 0, 0, 0, 0, 0, 0, 0}; }; }; class CfgVehicles { class player_digging_sound { sound = "digging_sound"; }; }; */ if !(hasInterface) exitWith {}; waitUntil {!isNull player}; waitUntil {player == player}; player addAction [ "<t>Dig Trench </t><img size='1' image='\a3\ui_f\data\IGUI\Cfg\Actions\Obsolete\ui_action_turnin_ca'/>", { params [["_target",objNull,[objNull]],["_unit",objNull,[objNull]]]; (AGLToASL (_unit modelToWorldVisual [0,1.5,0])) params ["_vx","_vy","_vz"]; if !(isNull (objectParent _unit)) exitWith {0 = [[format ["<t size='.8'> %1</t>","Really? While driving?"],1,1,5]] spawn BIS_fnc_EXP_camp_SITREP}; if (surfaceIsWater (position _unit)) exitWith {0 = [[format ["<t size='.8'> %1</t>","Oh come on, you cant be that stupid!"],1,1,5]] spawn BIS_fnc_EXP_camp_SITREP}; if !(count (lineIntersectsObjs [(AGLToASL (_unit modelToWorldVisual [0,1.5,0])), [_vx,_vy,(_vz + 20)]]) == 0) exitWith {0 = [[format ["<t size='.8'> %1</t>","Open your eyes, no suitable space here!"],1,1,5]] spawn BIS_fnc_EXP_camp_SITREP}; if (!(isTouchingGround _unit ) || {((getPosATL _unit) select 2) > 0.2}) exitWith {0 = [[format ["<t size='.8'> %1</t>","Ok, but hit the ground first!"],1,1,5]] spawn BIS_fnc_EXP_camp_SITREP}; if (isOnRoad (ASLToAGL (getPosASL _unit))) exitWith {0 = [[format ["<t size='.8'> %1</t>","Sorry, solid ground here!"],1,1,5]] spawn BIS_fnc_EXP_camp_SITREP}; _unit setVariable ["digging",true,false]; _unit playMove "AinvPknlMstpSnonWnonDnon_medic_1"; //playSound3D [getMissionPath "scripts\lib_trenches\sounds\ShovelDigging.ogg", _unit, false, getPosASL _unit, 3, 1, 25];// in MP others cant hear the shovel - switched to soundsource private _diggsnd = createSoundSource ["player_digging_sound", _unit, [], 0]; waituntil { animationState _unit == "ainvpknlmstpsnonwnondnon_medic_1"}; sleep 4; private _trench = createVehicle ["Land_ShellCrater_02_small_F",_target modelToWorld [0,2,0], [], 0, "CAN_COLLIDE"]; deleteVehicle _diggsnd; _trench setDir (getDir _target - 90); private _radGrad = ([getPos _trench, getDir _target] call BIS_fnc_terrainGradAngle)/30; _trench setVectorUp (surfacenormal (getPosATL _trench)); private _posASL = getPosASL _trench; _trench setPosASL [_posASL select 0,_posASL select 1, ((_posASL select 2) + _radGrad)]; _unit setVariable ["digging",nil,false]; _unit setVariable ["mytrench",_trench,false]; 0 = [_trench, [ "<t>Remove Trench </t><img size='1' image='\a3\ui_f\data\IGUI\Cfg\Actions\Obsolete\ui_action_turnout_ca'/>", { params [["_target",objNull,[objNull]],["_unit",objNull,[objNull]]]; _unit setVariable ["digging",true,false]; _unit playMove "AinvPknlMstpSnonWnonDnon_medic_1"; //playSound3D ["A3\sounds_f\characters\human-sfx\01_medikit1.wss", _unit, false, getPosASL _unit, 3, 1, 25]; // in MP others cant hear the shovel - switched to soundsource private _diggsnd = createSoundSource ["player_digging_sound", _unit, [], 0]; waituntil { animationState _unit == "ainvpknlmstpsnonwnondnon_medic_1"}; sleep 4; deleteVehicle _target; deleteVehicle _diggsnd; _unit setVariable ["digging",nil,false]; },nil,0,true,true,"","(isNil {_this getVariable 'digging'})",3,false,"","" ] ] remoteExec ["addAction", [0,-2] select isDedicated,_trench]; },nil,0,false,true,"", "isNull (_this getVariable ['mytrench',objNull]) && {isNil {_this getVariable 'digging'}} && {((animationState _this) in [ 'amovpknlmstpsraswpstdnon', 'amovpknlmstpslowwpstdnon', 'amovppnemstpsraswpstdnon', 'amovpknlmstpsraswrfldnon', 'amovpknlmstpslowwrfldnon', 'amovppnemstpsraswrfldnon', 'amovpknlmstpsraswlnrdnon', 'amovpknlmstpsnonwnondnon', 'amovppnemstpsnonwnondnon' ])}", -1, false, "", ""]; 0 = [[format ["<t size='.8'> %1</t>","TRENCH Started"],1,1,5]] spawn BIS_fnc_EXP_camp_SITREP; Trenches
  2. Hi. I am looking for possibility how to get array of attack helicopter from config. I knew how to iterate trough config for classes but i do not knew how to filter for attack helicopter. Is there ultimate config entry which defines an gunship, valid for any side and any mod? Maybe textSingular = "gunship"; ?
  3. Overview Clean up all dead, dropped stuff, ruins, craters around desired point or entire map and remove empty groups. You need to define at least one parameter position, marker or object. Parameter(s): 0 (Required): STRING - marker name, or ARRAY - position in format [x,y,z] or OBJECT - trigger or any object 1 (Optional): NUMMBER - Radius for dead stuff search around param 0, if not supplied, 500m will be automatically selected. 2 (Optional): NUMMBER - Min distance from object to any player. Preventing player to see disappearing of the object, if not supplied, 300m will be automatically selected. 3 (Optional): NUMMBER - Vehicle damage above which almost wrecked vehicles without crew will be selected to remove it. If not supplied such vehicles stays in game. Value between 0.1 and 0.9 4 (Optional): BOOLEAN - Ability to handle with empty groups - true/false. If not supplied false will be selected (disabled) 5 (Optional): NUMMBER - Sleep time in sec between search if not defined 5 min will be automatically selected. Returns: Nothing To prevent remove some object you need to set an "dnt_remove_me" variable on it using: this setVariable ["dnt_remove_me",true,false] You can adjust default functionality by passing desired parameters. Can be called for one area, many areas using multiple instances, or for entire map at once. Download Google Drive Armaholic Usage Place the script in mission root/scripts directory. Best method is to compile it into a function specially if more instances needed. Usage is also commented at the top of the file. init.sqf : /*Example for whole map: Constantly search entire map with 10min interval. Objects in player range (100m) will be skipped. Almost wrecked vehicles without crew stays in game. */ if (isServer) then { fnc_cleanup = compileFinal preprocessFileLineNumbers "scripts\cleanup.sqf"; null = [ [worldSize/2,worldSize/2,0], worldSize/2, 100, 1200 ] spawn fnc_cleanup; }; init.sqf : /*Example for marker: Constantly search entire marker area with 5min interval. Objects in player range (300m) will be skipped. */ if (isServer) then { fnc_cleanup = compileFinal preprocessFileLineNumbers "scripts\cleanup.sqf"; null = [ "marker0", ((getMarkerSize "marker0") call BIS_fnc_greatestNum) ] spawn fnc_cleanup; }; init.sqf : /*Example for object: Constantly search entire trigger area with 10min interval. Almost wrecked empty vehicles with damage > 0.8 will be removed. Objects in player range (500m) will be skipped. Empty groups will be removed. */ if (isServer) then { fnc_cleanup = compileFinal preprocessFileLineNumbers "scripts\cleanup.sqf"; null = [ _myTrigger, ((triggerArea _myTrigger) call BIS_fnc_greatestNum), 500, 0.8, true, 1200 ] spawn fnc_cleanup; }; cleanup.sqf Changelog 12/25/15 First release. 01/04/16 Version 1.0 * Possibility to adjust functionality. * You can now define objects to delete and define damage threshold for vehicles. * removing empty groups 02/17/16 Version 1.1 Added : * Set persistence for certain object. 13/01/17 Version 1.2 *Changed usage of BIS_fnc_inTrigger to inAreaArray command *Set lazy evaluation for conditions 03.01.2018 Version 1.3 Changed usage to more user friendly way. Added player in area check Known Issues None knew for now. Legal You are allowed to change what you want in this script.
  4. HI. Maybe someone can find this usable. This script add possibility to automatically turn back vehicle on wheels once flipped. To event take place vehicle needs to be side/up flipped and empty and no units in 10m around. /* file: autoflip.sqf by DaVidoSS add possibility to automatically turn back vehicle on wheels once flipped to event take place vehicle needs to be side/up flipped and empty and no units in 10m around parameters: 0: OBJECT return VOID usage: if (isServer) then { 0 = [_vehicle] execVM "autoflip.sqf"; }; */ params [["_vehicle",objNull,[objNull]]]; if (!isServer) exitWith {}; if (!((getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "hasDriver")) isEqualTo 1)) exitWith {}; _vehicle addEventHandler ["GetOut", { private _vehicle = param [0, objNull, [objNull]]; if !((crew _vehicle) isEqualTo []) exitWith {}; (_vehicle call BIS_fnc_getPitchBank) params ["_vx","_vy"]; if (([_vx,_vy] findIf {_x > 80 || _x < -80}) != -1) then { 0 = [_vehicle] spawn { private _vehicle = param [0, objNull, [objNull]]; waitUntil {(_vehicle nearEntities ["Man", 10]) isEqualTo [] || !alive _vehicle}; if (!alive _vehicle) exitWith {}; _vehicle allowDamage false; _vehicle setVectorUp [0,0,1]; _vehicle setPosATL [(getPosATL _vehicle) select 0, (getPosATL _vehicle) select 1, 0]; _vehicle allowDamage true; }; }; }];
  5. HI. Maybe someone can find this usable. This script adds/removes NVG's at all units besides players according to day/night cycle. ACE3 compatible. /* file: autonvg.sqf by DaVidoSS description: adds/removes nvg according to daytime for each unit included ace3 nvgs: "ACE_NVG_Gen1" "ACE_NVG_Gen2" "ACE_NVG_Gen4" "ACE_NVG_Wide" parameters: none return: VOID usage: //init.sqf if (isServer) then { 0 = [] execVM "autonvg.sqf"; }; */ private _autonvgOn = createTrigger ["EmptyDetector", [0, 0, 0], false]; _autonvgOn setTriggerActivation ["NONE", "PRESENT", true]; _autonvgOn setTriggerStatements [ "(sunOrMoon < 0.45)", " private ['_nvgsw', '_nvgse', '_nvgsi', '_nvgSide', '_itemsUnit', '_commonItemsArray', '_nvg', '_isACE']; _nvgsw = ['NVGoggles','NVGogglesB_blk_F','NVGogglesB_grn_F','NVGogglesB_gry_F']; _nvgse = ['NVGoggles_OPFOR','O_NVGoggles_ghex_F','O_NVGoggles_hex_F','O_NVGoggles_urb_F']; _nvgsi = ['NVGoggles_INDEP','NVGoggles_tna_F']; _isACE = !isnull (configfile >> 'CfgPatches' >> 'ace_main'); if (_isACE) then { _nvgsw = _nvgsw + ['ACE_NVG_Gen4', 'ACE_NVG_Wide']; _nvgse = _nvgse + ['ACE_NVG_Gen1']; _nvgsi = _nvgsi + ['ACE_NVG_Gen2']; }; { _nvgSide = switch (str (side _x)) do { case 'WEST': { _nvgsw }; case 'EAST': { _nvgse }; case 'GUER': { _nvgsi }; default { [] }; }; if(alive _x) then { _itemsUnit = (items _x + assignedItems _x); _commonItemsArray = _nvgSide arrayIntersect _itemsUnit; _nvg = _commonItemsArray select 0; if (!isNil '_nvg') then { if !(_nvg in (assignedItems _x)) then { _x assignItem _nvg; }; } else { _x linkitem (selectRandom _nvgSide); }; }; } forEach (allUnits select {!isPlayer _x}); ",""]; private _autonvgOf = createTrigger ["EmptyDetector", [0, 0, 0], false]; _autonvgOf setTriggerActivation ["NONE", "PRESENT", true]; _autonvgOf setTriggerStatements [ "(sunOrMoon >= 0.45)", " private ['_nvgsw', '_nvgse', '_nvgsi', '_itemsUnit', '_commonItemsArray', '_nvg','_isACE']; _nvgsw = ['NVGoggles','NVGogglesB_blk_F','NVGogglesB_grn_F','NVGogglesB_gry_F']; _nvgse = ['NVGoggles_OPFOR','O_NVGoggles_ghex_F','O_NVGoggles_hex_F','O_NVGoggles_urb_F']; _nvgsi = ['NVGoggles_INDEP','NVGoggles_tna_F']; _isACE = !isnull (configfile >> 'CfgPatches' >> 'ace_main'); if (_isACE) then { _nvgsw = _nvgsw + ['ACE_NVG_Gen4', 'ACE_NVG_Wide']; _nvgse = _nvgse + ['ACE_NVG_Gen1']; _nvgsi = _nvgsi + ['ACE_NVG_Gen2']; }; { if(alive _x) then { _itemsUnit = assignedItems _x; _commonItemsArray = ((_nvgsw + _nvgse + _nvgsi) arrayIntersect _itemsUnit); _nvg = _commonItemsArray select 0; if(!isNil '_nvg') then { _x unassignItem _nvg; }; }; } forEach (allUnits select {!isPlayer _x}); ",""];
  6. https://community.bistudio.com/wiki/allDead https://community.bistudio.com/wiki/allDeadMen
  7. UPDATED due to new BIS commands
  8. A flare/chemlight booster. 😄 If someday gets dark you definitely wants to check it out. Looks very cool 😄 usage: place scripts directory in your mission root directory add lines in: init.sqf if (hasInterface) then { chemlight_brg = 0.3; //Brightness of the chemlights flare_brg = 2.5; //Brightness of flares 0 = [] spawn compile preprocessFileLineNumbers "scripts\dazzle_the_darkness\dazzle_the_darkness.sqf"; }; scripts overwiev: dazzle_the_darkness /* by DaVidoSS dazzle_the_darkness Adds firedMan EH usage: place scripts directory in your mission root directory add lines in: init.sqf if (hasInterface) then { chemlight_brg = 0.3; //Brightness of the chemlights flare_brg = 2.5; //Brightness of flares 0 = [] spawn compile preprocessFileLineNumbers "scripts\dazzle_the_darkness\dazzle_the_darkness.sqf"; }; */ if (hasInterface) then { fn_setLight = compileFinal preprocessFileLineNumbers "scripts\dazzle_the_darkness\functions\setLight.sqf"; fn_upgradeLight = compileFinal preprocessFileLineNumbers "scripts\dazzle_the_darkness\functions\upgradeLight.sqf"; player addEventHandler ["FiredMan",{ params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle"]; private _lightSources = [ toLower "F_40mm_White", toLower "F_40mm_Red", toLower "F_40mm_Yellow", toLower "F_40mm_Green", toLower "Chemlight_green", toLower "Chemlight_red", toLower "Chemlight_blue", toLower "Chemlight_yellow" ]; if ((toLower (typeOf _projectile)) in _lightSources) then { 0 = [_projectile] spawn fn_upgradeLight; }; }]; }; fn_setLight /* by DaVidoSS fn_setLight Set of adjustments to the light according to the parameters passed param: 0 - object , lightpoint 1 - nummber, lightpoint size 2 - nummber, light intensity 3 - array, color returns - void */ params [["_light",objNull,[objNull]], ["_flareSize",300,[0]], ["_flareBrightness",0.2,[0]], ["_flareColor",[1,1,1],[[]]]]; if (isNull _light) exitWith {}; _light setLightFlareSize _flareSize; _light setLightBrightness _flareBrightness; _light setLightColor _flareColor; _light setLightAmbient _flareColor; fn_upgradeLight /* by DaVidoSS fn_upgradeLight Detecting projectile type and customize its parameters param: 0 - object , projectile returns - void */ params [["_flare",objNull,[objNull]]]; if (isNull _flare) exitWith {}; private _lightAmmo = [ [toLower "Chemlight_green",300,chemlight_brg,[0,1,0]], [toLower "Chemlight_red",300,chemlight_brg,[1,0,0]], [toLower "Chemlight_blue",300,chemlight_brg,[0,0,1]], [toLower "Chemlight_yellow",300,chemlight_brg,[1,1,0]], [toLower "F_40mm_White",1000,flare_brg,[1,1,1]], [toLower "F_40mm_Red",1000,flare_brg,[1,0,0]], [toLower "F_40mm_Yellow",1000,flare_brg,[1,1,0]], [toLower "F_40mm_Green",1000,flare_brg,[0,1,0]] ]; private _getidx = ([_lightAmmo , toLower (typeOf _flare)] call BIS_fnc_findNestedElement) # 0; private _size = _lightAmmo # _getidx # 1; private _brth = _lightAmmo # _getidx # 2; private _color = _lightAmmo # _getidx # 3; private _light = "#lightpoint" createVehicle (position _flare); 0 = [_light, [_flare, [0,0,0]]] remoteExecCall ["lightAttachObject", [0,-2] select isDedicated, _light]; 0 = [_light, _size, _brth, _color] remoteExecCall ["fn_setLight", [0,-2] select isDedicated, _light]; 0 = [_flare,_light] spawn { params [["_flare",objNull,[objNull]],["_light",objNull,[objNull]]]; waitUntil {sleep 1; isNull _flare}; deleteVehicle _light; }; Dazzle_the_darkness
  9. Adds scary screams while falling down. usage: place scripts directory in your mission root directory add lines in: init.sqf if (hasInterface) then { 0 = [] spawn compile preprocessFileLineNumbers "scripts\lib_fallingscream\fallingscream.sqf"; }; description.ext class CfgSFX { class fall_scream { sound0[] = {"scripts\lib_fallingscream\sounds\scream_0.ogg", db-0, 1.0, 100, 0.2, 99, 99, 99}; sound1[] = {"scripts\lib_fallingscream\sounds\scream_1.ogg", db-0, 1.0, 100, 0.2, 99, 99, 99}; sound2[] = {"scripts\lib_fallingscream\sounds\scream_2.ogg", db-0, 1.0, 100, 0.2, 99, 99, 99}; sounds[] = {sound0,sound1,sound2}; empty[] = {"", 0, 0, 0, 0, 0, 0, 0}; }; }; class CfgVehicles { class player_fall_scream { sound = "fall_scream"; }; }; script overwiev: fallingscream.sqf /* by DaVidoSS falling screeams usage: place scripts directory in your mission root directory add lines in: init.sqf if (hasInterface) then { 0 = [] spawn compile preprocessFileLineNumbers "scripts\lib_fallingscream\fallingscream.sqf"; }; description.ext class CfgSFX { class fall_scream { sound0[] = {"scripts\lib_fallingscream\sounds\scream_0.ogg", db-0, 1.0, 100, 0.2, 99, 99, 99}; sound1[] = {"scripts\lib_fallingscream\sounds\scream_1.ogg", db-0, 1.0, 100, 0.2, 99, 99, 99}; sound2[] = {"scripts\lib_fallingscream\sounds\scream_2.ogg", db-0, 1.0, 100, 0.2, 99, 99, 99}; sounds[] = {sound0,sound1,sound2}; empty[] = {"", 0, 0, 0, 0, 0, 0, 0}; }; }; class CfgVehicles { class player_fall_scream { sound = "fall_scream"; }; }; */ if !(hasInterface) exitWith {}; waitUntil {!isNull player}; waitUntil {player == player}; player setVariable ["hasFallen",false]; player addEventHandler ["AnimChanged", { params [["_unit",objNull,[objNull]], ["_anim","",[""]]]; private _fallanims = [ toLower "AfalPercMstpSrasWpstDnon", toLower "AfalPercMstpSrasWrflDnon", toLower "AfalPercMstpSrasWlnrDnon", toLower "AfalPercMstpSnonWnonDnon", toLower "AfalPknlMstpSrasWpstDnon", toLower "AfalPknlMstpSrasWrflDnon", toLower "AfalPknlMstpSrasWlnrDnon", toLower "AfalPknlMstpSnonWnonDnon", toLower "AfalPpneMstpSrasWpstDnon", toLower "AfalPpneMstpSrasWrflDnon", toLower "AfalPpneMstpSnonWnonDnon" ]; if !(toLower _anim in _fallanims) exitWith {}; if (_unit getVariable "hasFallen") exitWith {}; private _hight = ((getPosATl _unit) # 2); if (_hight > 6) then { 0 = [_unit,_hight] spawn { params [["_unit",objNull,[objNull]], ["_hight",0,[0]],["_scream",objNull,[objNull]]]; sleep .3; private _hight2 = ((getPosATl _unit) # 2); if (_hight > _hight2) then { _scream = createSoundSource ["player_fall_scream", _unit, [], 0]; _scream attachTo [_unit, [0,0,-0.1], "head"]; _unit setVariable ["hasFallen",true]; waitUntil {sleep .05; !alive _unit || isTouchingGround _unit}; if (alive _unit) then {_unit setVariable ["hasFallen",false]}; sleep 1; if (!isNull _scream) then {deleteVehicle _scream}; _scream = objNull; }; }; }; }]; fall screams
  10. Hi. Wanna ask if there can be removed or hided some of buldings furniture like: NOID washing_machine.p3d NOID kitchenstove_elec.p3d NOID fridge.p3d NOID tv_a.p3d by script.
  11. _entityName = "Alexander"; this setName _entityName; this addAction ["Interact", "script.sqf", _entityName, 1.5,true,true,"","player distance this < 2"]; params [["_target",objNull,[objNull]], ["_caller",objNull,[objNull]], ["_actionId",-1,[0]], ["_arguments","",[""]]]; DialogOwner = _arguments; DialogOption = 1; _handle = createdialog "Interakce";
  12. davidoss

    GF Auto Loot Script - Mod

    I have no problem with. I posted it for GF as example of another point of view and performance. I could make my own release but the code has no development state of any kind because i have no time to support it
  13. https://community.bistudio.com/wiki/Dialog_Control If you have never done any i assume you have no idea how much work is to create it and script out such things.
  14. davidoss

    Vehicle detection via trigger

    Activation: none Activation type: Present ({_x inArea thisTrigger} count (vehicles select {_x isKindOf "LandVehicle"})) > 0 or Activation: Anyone Activation type: Present this && {({_x isKindOf "LandVehicle"} count thisList) > 0}
  15. Condition: this && {player in thisList} && {player getVariable ["ACE_isUnconscious",false]};
  16. davidoss

    VCom AI: Script Version

    description.ext class CfgFunctions { #include "vcom\cfgFunctions.hpp" }; class Extended_PreInit_EventHandlers { VCM_CBASettings = call compile preprocessFileLineNumbers "Vcom\Functions\VCM_CBASettings.sqf"; }; class CfgRemoteExec { // List of script functions allowed to be sent from client via remoteExec class Functions { mode = 2; jip = 1; class vcm_serverask { allowedTargets = 0;jip = 1; }; class VCM_PublicScript { allowedTargets = 0;jip = 1; }; class BIS_fnc_debugConsoleExec { allowedTargets = 0;jip = 1; }; class SpawnScript { allowedTargets = 0;jip = 1; }; class enableSimulationGlobal { allowedTargets = 0;jip = 1; }; class VCM_fnc_KnowAbout { allowedTargets = 0;jip = 1; }; }; }; init.sqf //Exec Vcom AI function [] execVM "Vcom\VcomInit.sqf"; //End of Vcom commands
  17. Yes me too but unfortunately the world isn't like we wish. Anyway just simple side _team gives you group side of the player everywhere, which makes me confused about your
  18. Really i do not understand what your problem are. Maybe this can help: _sideJoined = sideUnknown; _leader = leader _team; switch (getNumber (configFile >> "CfgVehicles" >> typeOf _leader >> "side")) do { case 0: {_sideJoined = east}; case 1: {_sideJoined = west}; case 2: {_sideJoined = independent}; case 3: {_sideJoined = civilian}; default {}; };
  19. Ah you want side no JIP. Does simple check side group are not enough? You can also check for config entry "side" to get proper unit side occupied by player
  20. use playerConnectedMEH https://community.bistudio.com/wiki/Arma_3:_Event_Handlers/addMissionEventHandler#PlayerConnected
  21. I do not knew any solution for this but if you look closer you will find that there are more stuff being missed in MP. and i found other problems with which has push me to create my own trade system
  22. //fnc private _fnc_arrRandSeq = { params [ ["_array",[],[[]]], ["_indexcnt",1,[0]]]; private ["_return_array","_randindex"]; if (_array isEqualTo []) exitWith {}; _return_array = []; if (_indexcnt isEqualTo 0) then {_indexcnt = 1}; if (_indexcnt > (count _array)) then {_indexcnt = count _array}; if (_indexcnt isEqualTo (count _array)) exitWith { _return_array = _array call BIS_fnc_arrayShuffle; _return_array }; for "_i" from 1 to _indexcnt do { _randindex = selectRandom _array; _return_array pushBack _randindex; _array = _array - [_randindex]; }; (_return_array) }; private _fnc_getUnitsCnt = { private _players = [] call BIS_fnc_listPlayers; private _unitsCnt = ((count _players)*3); (_unitsCnt) }; fnc_getRandomPos = { params [["_anchor",[],[[],objNull,""]]]; private _direction = round (random 360); private _randomPos = []; if (_anchor isEqualType []) then { _randomPos = [_anchor, 150, _direction] call BIS_fnc_relPos; } else { if (_anchor isEqualType "") then { _randomPos = [getMarkerPos _anchor, 150, _direction] call BIS_fnc_relPos; } else { _randomPos = [getPos _anchor, 150, _direction] call BIS_fnc_relPos; }; }; (_randomPos) }; fnc_addNewWaypoint = { params [["_leader",objNull,[objNull]],["_anchor",[],[[],"",objNull]]]; private _group = group _leader; private _wp01a = _group addWaypoint [[_anchor] call fnc_getRandomPos,10]; _wp01a setWaypointType "SAD"; _wp01a setWaypointBehaviour "SAFE"; _wp01a setWaypointCombatMode "RED"; _wp01a setWaypointSpeed "LIMITED"; _wp01a setWaypointStatements ["true", "0 = [this,'Marker1'] spawn fnc_addNewWaypoint"]; }; //code private _unitsCnt = [] call _fnc_getUnitsCnt; _units = [ "O_G_Soldier_F","O_G_Soldier_GL_F","O_G_medic_F","O_G_Soldier_SL_F","O_G_Soldier_AR_F","O_G_Soldier_TL_F","O_G_Soldier_F", "O_G_Soldier_GL_F","O_G_medic_F","O_G_Soldier_SL_F","O_G_Soldier_AR_F","O_G_Soldier_TL_F" ]; private _grp01= [getMarkerPos "Marker1", EAST, [_units, _unitsCnt] call _fnc_arrRandSeq] call BIS_fnc_spawnGroup; {_x setSkill ["AimingAccuracy",0.7]} forEach (units _grp01); _grp01 allowFleeing 0; _grp01 enableDynamicSimulation true; _grp01 deleteGroupWhenEmpty true; 0 = [leader _grp01,"Marker1"] spawn fnc_addNewWaypoint;
  23. davidoss

    Check client mods

    Does the arma launcher not doing this already?
  24. davidoss

    Help with dialog

    Thanks i did not though about.. You have right with multi vest this is just logic failure on me. I changed this to deleteAt. For other stuff it will be useful at button BUY for now player can not have more stuff. He can have only less that at dialog start Its should work like this: Player can sell and buy with one button. In the case if he pull down something from trader and only this ,sell button stays inactive with tooltip "nothing to sale". If at the same time is something to buy and sell, button sell stays active and button buy changes to buy&sell.
  25. Hi i have this: private _fnc_getStack = { params [["_keys",[],[[]]], ["_values",[],[[]]]]; _merged = _keys apply {[_x,(_values select (_keys find _x))]}; _merged //[["10Rnd_9x21_Mag","FirstAidKit"],[1,2]] }; private _weapons = ((getWeaponCargo _vehicle) call _fnc_getStack); private _mags = ((getMagazineCargo _vehicle) call _fnc_getStack); private _items = ((getItemCargo _vehicle) call _fnc_getStack); private _bags = ((getBackpackCargo _vehicle) call _fnc_getStack); //[["10Rnd_9x21_Mag",1],["FirstAidKit",2]] private _vehicleItems = []; { for "_i" from 1 to (_x # 1) do { _vehicleItems pushBack (_x # 0); }; } forEach (_weapons+_mags+_items+_bags); //["10Rnd_9x21_Mag","FirstAidKit","FirstAidKit"] It looks pretty ugly for me. I wanna ask you guys if you have any idea how to write this better!
×