Jump to content

Tajin

Member
  • Content Count

    1681
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by Tajin

  1. Just a little snippet that you can put in the init-field of a unit in oder to spawn a dog in its place. The dog is actually attached to the unit and the unit is made invisible. Therefor you can simply play, command or remotecontrol the unit in order to move the dog. Action menu (or the button to hold your breath) allows you to bark. If you go prone without moving, the dog will sit. if (isServer) then { 0 = [this,"Fin_random_F"] spawn { params ["_guy","_class","_act"]; private ["_dog"]; _dog = createAgent [_class, getPos _guy, [], 0, "CAN_COLLIDE"]; _dog setVariable ["BIS_fnc_animalBehaviour_disable", true]; _dog attachTo [_guy,[0,0,0]]; _guy hideObjectGlobal true; [_guy,["Bark", { params["_me","_you","_id","_d"]; _d playMoveNow "Dog_Idle_Bark"; _me setVariable["bark",true,true]; sleep 1.5; playSound3D [format["A3\Sounds_F\ambient\animals\dog%1.wss", ceil random 3], _me, false, getPosASL _me, 40, 1, 10]; sleep 2; _me setVariable["bark",false,true]; }, _dog, 0, false, true, "holdBreath", "_target isEqualTo _this", 0, false, ""]] remoteExec ["addAction", 0]; while {alive _guy && alive _dog} do { if (speed _guy > 10) then { _dog playMoveNow "Dog_Sprint"; } else { if (speed _guy > 6) then { _dog playMoveNow "Dog_Run"; } else { if ((speed _guy > 2) || (speed _guy < -2)) then { _dog playMoveNow "Dog_Walk"; } else { if !(_guy getVariable ["bark",false]) then { if ((stance _guy) == "STAND") then { _dog playMoveNow "Dog_Stop"; } else { if ((stance _guy) == "PRONE") then { _dog playMoveNow "Dog_Sit"; } else { _dog playMoveNow "Dog_Idle_Stop"; }; }; }; }; }; }; sleep 0.05; }; deleteVehicle _guy; }; }; Note that this is not meant to feel like playing as a dog, it is just a tool for gamemasters to have some easily controllable dogs that they can use.
  2. Tajin

    Arma 3 too small for fixed wing

    150km viewdistance ? My pc would implode if I tried that on arma.
  3. Tajin

    Isnil issue

    if !(isNil "somevariable") then { // whatever }; Also very useful: _pv = missionNamespace getVariable ["somevariable", 0]; getVariable can return a specified default value if the variable is not defined.
  4. Hey I simply made a point and I think I've explained it well enough, theres no reason to be rude about it. I wanted to get some more information out of him before answering so we can help in a way that is actually useful to him instead of wasting ours and his time. As it turns out, he's new to scripting, so it just wouldn't make sense to me to drop him a few lines of code without even telling what they do. Really? I took apart the problem and explained to him that there are different ways to do it, depending on what exactly he wants to achieve. How does that not contribute to the question?
  5. I don't think it really helps anyone to just throw them random bits of code with no comment whatsoever and without knowing the details. (checking for playerUIDs was never part of the question and while its great to provide an alternative solution, you should at least comment it) it's better for everyone if things happen in the right order.: The first thing should always be that the person asking for help provides enough information ! I wouldn't bother posting any solutions purely based on guesswork. Basically this: - What do you want to achieve - What have you tried to achieve it (sharing the existing code is always helpful) - Where are you stuck / what kind of help are you looking for - any additional info on your specific scenario (for example that your vehicles can respawn) However, like HazJ mentioned earlier, this forum is mainly for people who need help scripting things. Beeing new to scripting it is perfectly fine. People will gladly help you out if you're stuck. Just don't expect them to do everything for you, so you don't have to learn it yourself. - - - - - Anyway, there are multiple ways this can be done, which one is best depends on the situation and how strict you want the limitation to be.... For example, maybe you want every vehicle of a certain type to be locked for players by default, even enemy ones. This could be the case on a public server if you want to make sure certain vehicles are not publicly available so people cant mess around with them. In that case it may be better to not lock those vehicles one by one but instead use an EventHandler that you can attach to each player, which then checks if they enter a vehicle and throws them back out if they're not allowed to use that vehicle. This would easily work with vehicles that are added later on, or respawn. You would just have to add a variable to them to allow them to be usable. Actively locking vehicles basically works the other way around and requires you to do it for every single vehicle that you want locked. Even when they respawn or get added later. Certainly doable but normally more suited when you have a limited number of vehicles to which it should apply. I'd also suggest reading this: https://community.bistudio.com/wiki/addAction It is one of the true bread and butter commands for anyone starting to script.
  6. What is there to rack your brain over? Lock the vehicles and add an action to unlock them that only shows up for your HQ unit. Should be really simple or what is it that you don't understand about it ?
  7. The snippet I posted is just to move and open the box, you still have to place that into an addAction code to make it accessible via the scroll-menu.
  8. there is a function for it: https://community.bistudio.com/wiki/BIS_fnc_setUnitInsignia
  9. 1. Hide your ammobox with https://community.bistudio.com/wiki/hideObject 2. Place a different object (one without an inventory, or a simpleObject version of the ammobox) and an action to it via: https://community.bistudio.com/wiki/addAction (actions there can be named and colored however you wish) 3. In that addaction use setPos to position the ammobox where the player is and then force him to open the box, like this: yourhiddenammobox setPos getPos player; player action ["Gear", yourhiddenammobox];
  10. Tajin

    Isnil issue

    What is so hard about it? The wiki tells you exactly how it works and even has some examples: https://community.bistudio.com/wiki/isNil
  11. https://community.bistudio.com/wiki/addPublicVariableEventHandler did you read the notes on it ?
  12. Default option for testing in the editor is singleplayer. So it may easily be that you forgot to switch it to MP when you tested it. In that case the sidechat command would not work.
  13. Are you maybe testing your mission in singleplayer? Chat commands do not work there.
  14. Always a good idea to actually post the code you want help on. Anyway, why create a trigger via script when you can also do the check directly? _areaUnits = allUnits select { (side _x == east) && {_x inArea _myArea}}; // find all opfor in the area waitUntil { sleep 1; ({ alive _x } count _areaUnits) == 0 }; // wait until every one of them is dead // continue with whatever...
  15. Right, I forgot about that one. ^^
  16. Tajin

    Hit Eventhandler

    there is no need to set the variable to 0. _something getVariable ["kp",0]; This automatically returns 0 as default value, if the variable has not been defined yet.
  17. Tajin

    Problem script.

    hideObjectGlobal true; that is not going to work. Check the syntax: https://community.bistudio.com/wiki/hideObjectGlobal Instead of this: if (position player != _marker) then { you could use something like the following: // create your vehicle locally and whatever else you do there... waitUntil { sleep 1; !(player inArea _marker) }; // remove the vehicle again.
  18. Tajin

    Hit Eventhandler

    You could use "HitPart" instead, that is always only excuted for the shooter:: https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#HitPart Why use a global variable? You're better off attaching a variable to each player. player addEventHandler ["Killed", { params ["","","_instigator"]; _instigator setVariable ["cash", _instigator getVariable ["cash",0] + 1, true]; }]; In the long run that is in fact simpler to use than a global one.
  19. [_object, [0, format["#(argb,8,8,3)color(%1,%2,%3,1)", random 1, random 1, random 1]]] remoteExec ["setObjectTexture",0 , netId _object]; This should set the same color for everyone to see.
  20. The script does look a bit dated and could really use an update. I only changed the bit where the markers are created, give it a try.: /* Filename: fn_crashdrop.sqf Author: Kellojo Description: Heli crash and drop script main function - Part of the ETG script collection Link: http://www.armaholic.com/page.php?id=29519 */ fnc_createMarker = { params ["_nam","_pos"]; _nam = _nam splitString " " joinString "_"; private _i = 0; private _nam0 = _nam; while { !((getMarkerColor _nam) isEqualTo "") } do { _i = _i + 1; _nam = format["%1_%2",_nam0,_i]; }; createMarker [_nam,_pos] }; _mode = [_this, 0, 0, [0]] call BIS_fnc_param; _time = 10; //Time between every heli crash/supply drop in seconds (integer) _markertp = ""; //Type of marker? (https://community.bistudio.com/wiki/cfgMarkers) (string - leave empty if no marker is wanted) _fire = false; //Should fire be around the helicrashsite ? (true/false) _ai = true; //AI? (true/false) _mapcenter = [6987,8307,0]; //Edit this coordinate it should be roughly the center of the map you are playing on (this one is for Altis) _centerrad = 8000; //Radius around the _CenterOfMap (make sure its covering the whole map - Integer) _rpt = true; //Writes debug information to the rpt file. (true/false) _MaxAmmount = 5; //Ammount of Magazines and Items that can spawn at one lootpile _MaxItem = 10; //Max ammount of individual items _MaxMag = 10; //Max ammount of individual magazines _MaxWeap = 10; //Max ammount of individual weapons _MaxBpack = 10; //Add or remove item classnames to the array to add them to the loot table _Backpacks = ['B_AssaultPack_khk','B_AssaultPack_dgtl','B_AssaultPack_rgr','B_AssaultPack_sgg','B_AssaultPack_blk','B_AssaultPack_cbr','B_AssaultPack_mcamo','B_Kitbag_mcamo','B_Kitbag_sgg','B_Kitbag_cbr','B_Bergen_sgg','B_Bergen_mcamo','B_Bergen_rgr','B_Bergen_blk','B_FieldPack_blk','B_FieldPack_ocamo','B_FieldPack_oucamo','B_FieldPack_cbr','B_Carryall_ocamo','B_Carryall_oucamo','B_Carryall_mcamo','B_Carryall_oli','B_Carryall_khk','B_Carryall_cbr','B_OutdoorPack_blk','B_OutdoorPack_tan','B_OutdoorPack_blu','B_HuntingBackpack']; _Weapons = ["hlc_pistol_P229R_357Combat","rhs_weap_akm","rhs_weap_vss_grip_npz","rhs_weap_ak74","rhs_weap_m21s","SMA_SKS_F","rhs_weap_fgm148","rhs_weap_fim92","rhs_weap_m240G","rhs_weap_m249_pip_L_vfg","rhs_weap_sr25","rhs_weap_XM2010","rhs_weap_t5000","rhs_weap_M107"]; _Items = ["edn_Metalpipe","edn_camonet","edn_Cinderblock","edn_Cinderblock","edn_Cinderblock","edn_Cinderblock","edn_Sandbag","edn_Sandbag","edn_Steelplate","edn_Woodplank","edn_Woodplank","edn_Woodplank","edn_Wirecoil","rvg_Geiger","rvg_antiRad","Mask_M50","Mask_M40","rvg_plasticBottlePurified","SMA_ELCAN_SPECTER","SMA_MICRO_T2","rhsusf_acc_ACOG","optic_LRPS","rhsusf_acc_SpecterDR","rhsusf_acc_LEUPOLDMK4",'V_TacVestIR_blk','V_TacVestCamo_khk','V_TacVest_oli','V_TacVest_khk','V_TacVest_camo','V_TacVest_brn','V_TacVest_blk_POLICE','V_TacVest_blk','V_Rangemaster_belt','V_PlateCarrierSpec_rgr','V_PlateCarrierIAGL_dgtl','V_PlateCarrierIA2_dgtl','V_PlateCarrierIA1_dgtl','V_PlateCarrierGL_rgr','V_PlateCarrier3_rgr','V_PlateCarrier2_rgr','V_PlateCarrier1_rgr','V_PlateCarrier1_blk','V_HarnessOSpec_gry','V_HarnessOSpec_brn','V_HarnessOGL_gry','V_HarnessOGL_brn','V_HarnessO_gry','V_HarnessO_brn','V_Chestrig_rgr','V_Chestrig_oli','V_Chestrig_khk','V_Chestrig_blk','V_BandollierB_rgr','V_BandollierB_oli','V_BandollierB_khk','V_BandollierB_cbr','V_BandollierB_blk','ItemGPS','MineDetector','Rangefinder','NVGoggles','Laserdesignator','FirstAidKit','I_UavTerminal','muzzle_snds_H','muzzle_snds_L','uzzle_snds_B','muzzle_snds_H_MG','optic_Arco','optic_Hamr','optic_SOS','optic_Holosight','acc_flashlight','acc_pointer_IR','optic_MRCO','ptic_Nightstalker','optic_NVS','optic_DMS','optic_LRPS','optic_AMS','optic_KHS_hex','bipod_01_F_snd','bipod_01_F_blk','bipod_01_F_mtp','U_B_CombatUniform_mcam','U_B_CombatUniform_mcam_vest','U_B_GhillieSuit','U_Rangemaster','U_I_CombatUniform','U_I_CombatUniform_tshirt','U_I_Wetsuit','U_I_OfficerUniform','U_I_GhillieSuit','U_IG_Guerilla1_1','U_IG_Guerilla2_1','U_OG_Guerilla2_1','U_C_Journalist','V_Press_F','V_RebreatherIA','U_B_FullGhillie_lsh','U_B_FullGhillie_sard','U_B_FullGhillie_ard','U_O_FullGhillie_lsh','U_O_FullGhillie_sard','U_O_FullGhillie_ard','U_I_FullGhillie_ard','U_I_FullGhillie_sard','_PlateCarrierGL_blk','V_PlateCarrierGL_mtp','V_PlateCarrierSpec_blk','V_PlateCarrierSpec_mtp','V_PlateCarrierIAGL_oli']; _magazines = ["rhs_30Rnd_762x39mm","rhs_30Rnd_545x39_7N10_AK","hlc_12Rnd_357SIG_B_P226","rhs_20rnd_9x39mm_SP6","SMA_30Rnd_762x39_SKS_FMJ","rhs_fgm148_magazine_AT","rhs_fim92_mag","rhsusf_100Rnd_762x51_m62_tracer","rhs_200rnd_556x45_T_SAW","rhsusf_20Rnd_762x51_m993_Mag","rhsusf_5Rnd_300winmag_xm2010","rhs_5Rnd_338lapua_t5000","10Rnd_RHS_50BMG_Box"]; _aiunits = ["rhs_vdv_rifleman","rhs_vdv_rifleman_asval","rhs_vdv_officer_armored","rhs_vdv_marksman","rhs_vdv_machinegunner","rhs_vdv_junior_sergeant","rhs_vdv_at","rhs_vdv_aa","rhs_vdv_grenadier_rpg"]; //Add or remove unit classnames for more or less ai //random timer + calls in new drop/crash if (_mode == 1) exitwith { sleep (round (random _time)); [2] call fn_crashdrop; _title = "<t color='#ff0000' size='1.2' shadow='1' shadowColor='#000000' align='center'>Supply Drop Inbound!</t>"; hint parseText (_title); }; //creates a drop/crash if (_mode == 2) exitwith { //Get data _cord1 = [_mapcenter, 1, _centerrad, 3, 0, 600, 0] call BIS_fnc_findSafePos; sleep 0.5; _cord2 = [_mapcenter, 1, _centerrad, 3, 0, 600, 0] call BIS_fnc_findSafePos; sleep 0.5; _cord3 = [_mapcenter, 1, _centerrad, 3, 0, 600, 0] call BIS_fnc_findSafePos; sleep 0.5; _cord4 = [_mapcenter, 1, _centerrad, 3, 0, 600, 0] call BIS_fnc_findSafePos; sleep 0.5; _cord5 = [_mapcenter, 1, _centerrad, 3, 0, 600, 0] call BIS_fnc_findSafePos; //Spawn heli & cargo _veh = [[0,0,0], 180,"I_Heli_light_03_unarmed_F",EAST] call bis_fnc_spawnvehicle; _cargo = "B_CargoNet_01_ammo_F" createVehicle [0,0,0]; _grp = group (_veh select 0); _title = "<t color='#ff0000' size='1.2' shadow='1' shadowColor='#000000' align='center'>Supply Drop Inbound!</t>"; hint parseText (_title); veh = _veh; cargo = _cargo; clearMagazineCargoGlobal _cargo; clearWeaponCargoGlobal _cargo; clearItemCargoGlobal _cargo; clearBackpackCargoGlobal _cargo; { _x disableAI "AUTOTARGET"; _x disableAI "TARGET"; _x disableAI "SUPPRESSION"; removeBackpackGlobal _x; removeAllWeapons _x; } forEach units (_veh select 2); //Spawn loot _weapc = 0; _weapcount = round (random _MaxWeap); while {_weapc < _weapcount} do { sleep 0.1; _weapc = _weapc + 1; _curi = _Weapons call BIS_fnc_selectRandom; _ammount = 1; _mag = getArray (configFile / "CfgWeapons" / _curi / "magazines"); _cargo addWeaponCargoGlobal [_curi,_ammount]; _cargo addMagazineCargoGlobal [(_mag select 0),round random 8]; }; _magc = 0; _magcount = round (random _MaxMag); while {_magc < _magcount} do { sleep 0.1; _magc = _magc + 1; _curi = _magazines call BIS_fnc_selectRandom; _cargo addMagazineCargoGlobal [_curi,round (random 5)]; }; _ic = 0; _ic = round (random _MaxItem); while {_ic < _ic} do { sleep 0.1; _ic = _ic + 1; _curi = _Items call BIS_fnc_selectRandom; _ammount = 1; _cargo addItemCargoGlobal [_curi,_ammount]; }; _bpackc = 0; _backcount = round (random _MaxBpack); while {_bpackc < _backcount} do { sleep 0.1; _bpackc = _bpackc + 1; _curi = _Backpacks call BIS_fnc_selectRandom; _ammount = 1; _cargo addBackpackCargoGlobal [_curi,_ammount]; }; (_veh select 0) setSlingLoad _cargo; //Set waypoints ETG_tvehdrop = true; ETG_tvehcrash = true; _wp = _grp addWaypoint [_cord1, 0]; _wp setWaypointType "move"; _wp setWaypointBehaviour "CARELESS"; (_veh select 0) flyInHeight 220; [_grp,1]setWaypointSpeed "FULL"; _wp = _grp addWaypoint [_cord2, 0]; _wp setWaypointType "move"; _wp setWaypointBehaviour "CARELESS"; _wp setWaypointStatements ['true', "ETG_tvehdrop = true;"]; _wp = _grp addWaypoint [_cord3, 0]; _wp setWaypointType "move"; _wp setWaypointBehaviour "CARELESS"; _wp = _grp addWaypoint [_cord4, 0]; _wp setWaypointType "move"; _wp setWaypointBehaviour "CARELESS"; _wp = _grp addWaypoint [_cord5, 0]; _wp setWaypointType "move"; _wp setWaypointBehaviour "CARELESS"; _wp setWaypointStatements ['true', "ETG_tvehcrash = true;"]; waituntil {ETG_tvehdrop}; //Unload (_veh select 0) flyInHeight 90; (_veh select 0) setSlingLoad objNull; _chute = "B_Parachute_02_F" createVehicle position _cargo; _cargo attachTo [_chute,[0, 0, -1.2]]; _smoke = "SmokeShellRed" createVehicle position _cargo; _smoke attachto [_cargo,[0,0,0]]; sleep 10; _smoke setDamage 1; deleteVehicle _smoke; _smoke = "SmokeShellRed" createVehicle position _cargo; _smoke attachto [_cargo,[0,0,0]]; waituntil {(getPos _cargo select 2) < 4}; detach _cargo; sleep 4; deleteVehicle _chute; _smoke = "SmokeShellRed" createVehicle position _cargo; _smoke attachto [_cargo,[0,0,0]]; _markerstr = ["Supply Drop", position _cargo] call fnc_createMarker; _markerstr setMarkerShape "ICON"; _markerstr setMarkerType "hd_warning"; _title = "<t color='#ff0000' size='1.2' shadow='1' shadowColor='#000000' align='center'>Supply Drop Delivered!</t>"; hint parseText (_title); if (_rpt) then { diag_log "###ETG Heli Crash and Drop Script by Kellojo###"; diag_log format ["###Cargodrop position: %1",position _cargo]; diag_log "###End###"; }; if (_ai) then { _hcunits = [position _cargo, EAST, _aiunits,[],[],[],[],[],180] call BIS_fnc_spawnGroup; _hcg = group (leader _hcunits); _hcg addWaypoint [position _cargo, 0]; [_hcg, 0] setWaypointType "GUARD"; [_hcg, 0] setWaypointBehaviour "AWARE"; { removeBackpackGlobal _x; removeAllWeapons _x; _curW = _weapons call BIS_fnc_selectRandom; [_x,_curW, 5] call BIS_fnc_addWeapon; } forEach units _hcunits; }; //Wait for crash & crash waituntil {ETG_tvehcrash || (getDammage (_veh select 0) > 0.2)}; (_veh select 0) setDamage 1; waituntil {(getPos (_veh select 0) select 2) < 1}; sleep 10; _crashpos = position (_veh select 0); _crashrot = getDir (_veh select 0); sleep 2; deleteVehicle (_veh select 0); _cheli = createVehicle ["Land_Wreck_Heli_Attack_01_F",_crashpos,[], 0, "can_collide"]; _cheli setDir _crashrot; _cheli setPos [position _cheli select 0,position _cheli select 1, 0.1]; _cheli setVectorUp surfaceNormal position _cheli; _smokeeff = createVehicle ["test_EmptyObjectForSmoke",position _cheli,[], 0, "can_collide"]; _smokeeff attachTo [_cheli, [0.5, -2, 1] ]; _fireeff = createVehicle ["Campfire_burning_F",_crashpos,[], 0, "can_collide"]; _title = "<t color='#ff0000' size='1.2' shadow='1' shadowColor='#000000' align='center'>We've got a blackhawk down!</t>"; hint parseText (_title); _markerstr = ["Helicopter Crash", position _cheli] call fnc_createMarker; _markerstr setMarkerShape "ICON"; _markerstr setMarkerType "hd_warning"; if (_ai) then { _hcunits = [position _cheli, EAST, _aiunits,[],[],[],[],[],180] call BIS_fnc_spawnGroup; _hcg = group (leader _hcunits); _hcg addWaypoint [position _cargo, 0]; [_hcg, 0] setWaypointType "GUARD"; [_hcg, 0] setWaypointBehaviour "AWARE"; { removeBackpackGlobal _x; removeAllWeapons _x; _curW = _weapons call BIS_fnc_selectRandom; [_x,_curW, 5] call BIS_fnc_addWeapon; } forEach units _hcunits; }; if (_rpt) then { diag_log "###ETG Heli Crash and Drop Script by Kellojo###"; diag_log format ["###Helicrash position: %1",_crashpos]; diag_log "###End###"; }; _weapc = 0; _maxweapc = round (random _MaxWeap); _whold = createVehicle ["Box_IND_Wps_F",_crashpos,[], 25, "none"]; clearMagazineCargoGlobal _whold; clearWeaponCargoGlobal _whold; clearItemCargoGlobal _whold; clearBackpackCargoGlobal _whold; while {_weapc < _maxweapc} do { _weapc = _weapc + 1; _curri = _Weapons call BIS_fnc_selectRandom; _Ammount = 1; _whold addWeaponCargoGlobal [_curri,_Ammount]; _mag = getArray (configFile / "CfgWeapons" / _curri / "magazines"); _whold addMagazineCargoGlobal [(_mag select 0),round random 6]; }; _magc = 0; _maxmagc = round (random _MaxMag); _whold = createVehicle ["Box_IND_Wps_F",_crashpos,[], 25, "none"]; clearMagazineCargoGlobal _whold; clearWeaponCargoGlobal _whold; clearItemCargoGlobal _whold; clearBackpackCargoGlobal _whold; while {_magc < _maxmagc} do { _magc = _magc + 1; _curri = _magazines call BIS_fnc_selectRandom; _Ammount = round (random _MaxItem); _whold addMagazineCargoGlobal [_curri,_Ammount]; }; _ic = 0; _maxic = round (random _MaxItem); _whold = createVehicle ["Box_East_Grenades_F",_crashpos,[], 25, "none"]; clearMagazineCargoGlobal _whold; clearWeaponCargoGlobal _whold; clearItemCargoGlobal _whold; clearBackpackCargoGlobal _whold; while {_ic < _maxic} do { _ic = _ic + 1; _curri = _Items call BIS_fnc_selectRandom; _Ammount = 1; _whold addItemCargoGlobal [_curri,_Ammount]; }; _bpackc = 0; _maxbpackc = round (random _MaxBpack); _whold = createVehicle ["Box_East_Grenades_F",_crashpos,[], 25, "none"]; clearMagazineCargoGlobal _whold; clearWeaponCargoGlobal _whold; clearItemCargoGlobal _whold; clearBackpackCargoGlobal _whold; while {_bpackc < _maxbpackc} do { _bpackc = _bpackc + 1; _curri = _Backpacks call BIS_fnc_selectRandom; _Ammount = 1; clearBackpackCargoGlobal _whold; _whold addBackpackCargoGlobal [_curri,_Ammount]; }; [1] call fn_crashdrop; };
  21. You can exchange pretty much any existing weapon / turret with whatever weapon you want, they just wont be visible on the model and it wont work well on vehicles that do not have weapons to begin with. https://community.bistudio.com/wiki/addWeapon https://community.bistudio.com/wiki/addMagazine https://community.bistudio.com/wiki/removeWeapon https://community.bistudio.com/wiki/addWeaponTurret https://community.bistudio.com/wiki/addMagazineTurret https://community.bistudio.com/wiki/removeWeaponTurret
  22. addCuratorAddons has to be run on the Curator itself, not the player unit. It also has to be done serverside.
  23. Like muzzleflash said you'll end up with the same command getting spammed several times which can lead to all sort of funky problems later on, depending on your other code. Read (in this order): https://community.bistudio.com/wiki/preprocessFileLineNumbers (returns string) https://community.bistudio.com/wiki/compile (returns code) https://community.bistudio.com/wiki/call (runs code) None of that magically scans your code for functions and then pre-defines them. The code is run as is and if you have your things in the wrong order there, it wont work. Also, if you want to define your functions properly, read this aswell: https://community.bistudio.com/wiki/Functions_Library_(Arma_3)
  24. putting something like this in your init should work. Then just add prefixes to the names of your markers depending on which side they should be visible for. All other markers will be visible to everyone. CIV_mymarker [] spawn { while { !isDedicated } do { waitUntil { sleep 1; alive player}; { _arr = _x splitString "_"; _pre = _arr select 0; if (_pre in ["WEST","EAST","GUER","CIV"]) then { if (format["%1",side player] == _pre) then { _x setMarkerAlphaLocal 1; } else { _x setMarkerAlphaLocal 0; }; }; } count allMapMarkers; }; };
  25. Here, try it like this: _radarEndTime = serverTime + 300; while { serverTime < _radarEndTime } do { { private _radar = _x; { _marker = format["p_%1", getPlayerUID _x]; if (_x distance2D _radar < 3) then { if ("" isEqualTo getMarkerType _marker) then { _marker = createMarker [_marker, _x]; _markerstr setMarkerShape "ICON"; _markerstr setMarkerType "hd_dot"; }; _marker setMarkerPos getPosATL _x; } else { deleteMarker _marker; }; } forEach allPlayers; } forEach radarStations; sleep 1; };
×