Search the Community
Showing results for tags 'fnc'.
Found 8 results
-
Calling a Function from a Mission File
Captinlarry posted a topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
I had a Function wrote by a friend that I need to call in a MP mission file. The Function is saved in the file already in a sub folder called functions and is called fn_MoveObject.sqf How would I go about calling this function in an SQF? Also is there a better way to call an sqf on a MP mission than "call{Ham addaction [ "Check in with the Sergeant", { "HamTalk.sqf" remoteExec ["execVM", 2];}];};" -
Create Config.cpp with function liberay
MBMC posted a topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
Hello, I have a problem with my config.cpp. I want to create a mod in which I add functions to the function library. I have already looked at and tried many posts and github mods, but all variants end up with the same problem. The functions are not found after Arma start. (Warning Message: Script beo_mod_serv_db\fnc\save\fn_dbSaveAct.sqf not found) THE PROBLEM IS SOLVED !!! LOOK AT THE END OF THE POST I will now enter a variant as an example that seems to me the most sensible of the approx. 40 variants that I have tried. config.cpp: class CfgPatches { class beo_mod_serv_db { author = "MBMC"; requiredAddons[] = {}; requiredVersion = 0.1; units[] = {}; weapons[] = {}; }; }; class CfgFunctions { class mbmc { class beo_mod_serv_db_save { file = "addons\beo_mod_serv_db\fnc\save"; // I forgot the addons\ folder class dbSaveAct{}; class dbSaveAm{}; class dbSaveAmPylon{}; class dbSaveBui{}; class dbSaveCargo{}; class dbSaveFiller{}; class dbSaveFobObj{}; class dbSaveGarage{}; class dbSaveGearVeh{}; class dbSaveLoc{}; class dbSaveMark{}; class dbSaveMarkUser{}; class dbSaveMhq{}; class dbSaveMineF{}; class dbSaveSani{}; class dbSaveSup{}; class dbSaveVar{}; class dbSaveVeh{}; }; class beo_mod_serv_db_save_ini { file = "addons\beo_mod_serv_db\fnc\save\ini"; // I forgot the addons\ folder class dbIniAryNum{}; class dbIniArySize{}; class dbIniD{}; class dbIniDelete{}; class dbIniM{}; class dbIniS{}; class dbIniSave{}; class dbIniSin{}; }; class beo_mod_serv_db_load { file = "addons\beo_mod_serv_db\fnc\load"; // I forgot the addons\ folder class dbLoadAct{}; class dbLoadAm{}; class dbLoadAmPylon{}; class dbLoadStatic{}; class dbLoadBui{}; class dbLoadCargo{}; class dbLoadComp{}; class dbLoadFiller{}; class dbLoadFlag{}; class dbLoadFob{}; class dbLoadGarage{}; class dbLoadLoc{}; class dbLoadMain{}; class dbLoadMark{}; class dbLoadMarkFin{}; class dbLoadMhq{}; class dbLoadMis{}; class dbLoadSani{}; class dbLoadSup{}; class dbLoadVeh{}; }; class beo_mod_serv_db_load_ini { file = "addons\beo_mod_serv_db\fnc\load\ini"; // I forgot the addons\ folder class dbIniL{}; class dbIniLd{}; class dbIniLm{}; class dbIniLmd{}; class dbIniLoadUser{}; class dbIniLs{}; }; }; }; Mod Structure: @beo_server >> addons >> beo_serv_db >> inside folder "beo_serv_db": config.cpp folder name: fnc inside folder "fnc": folder name: save >> lot of functions: fn_dbSaveAct,fn_dbSaveAm,fn_dbSaveAmPylon..... etc. and another folder: ini >> also lot of functions: fn_dbIniAryNum,fn_dbIniArySize.....etc folder name: load >> lot of functions: fn_dbLoadAct,fn_dbLoadAm,fn_dbLoadAmPylon.....etc. and another folder: ini >> also lot of functions: fn_dbIniL,fn_dbIniLd......etc I test it also with only one function in only one fnc folder but I cant get it to work. https://community.bistudio.com/wiki/Arma_3:_Functions_Library#:~:text=Arma 3 Functions Library is,Functions manager to be present. In this wiki post I test both variants File Path and Folder Path but same results. I create the mod with Arma 3 Tools and Addon Builder. I hope someone can help me. Thanks in advance. MBMC SOLUTION: After another 2 days of testing, I found the solution. So if anyone has the same problem here is the solution: config.cpp: I forgot the "addons" folder. So the file path must be: file = "addons\beo_mod_serv_db\fnc\save"; file = "addons\yourModPBOname\FolderOfYourFunctions\SubFolderIfYouNeed"; So this post can be closed.-
- config.cpp
- config
-
(and 7 more)
Tagged with:
-
BIS_fnc_holdActionAdd with сondition
Anteq Iney posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello, I need a script that will display my holdaction if the player has an item in his inventory. My script that doesn't work: if (playerside == west) then { { [_x,"<t color='#FFAA00'>Remove!</t>", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_unbind_ca.paa", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_unbind_ca.paa", "_this distance _target < 4", "(_caller distance _target < 4) && ("ToolKit" in items _caller)", {[_target, "wire_s",100] spawn CBA_fnc_globalSay3d;}, {}, {deleteVehicle _target;}, {}, [], 9, 0, true, false] call BIS_fnc_holdActionAdd; } forEach wire; }; Arma writes that there is an error in the line: "(_caller distance _target < 4) && ("ToolKit" in items _caller)", Where is the error and why it doesn't work?- 3 replies
-
- bis_fnc_holdactionadd
- holdaction
-
(and 6 more)
Tagged with:
-
PlaySubtitles function isn't working
smirlianos posted a topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
I try to use the default example from the wiki inside a trigger but I get the following error message, and only the last subtitle is shown. What is happening? Error Message [ ["Speaker1","Subtitle1",0], ["Speaker2","Subtitle2",5], ["Speaker3","Subtitle3",10], ["Speaker4","Subtitle5",15] ] call BIS_fnc_EXP_camp_playSubtitles; -
So, I'm making a credits script which spawns movie-like credits rolling on the screen. The script works fine but I'm using bis_fnc_dynamictext to create the text, and there seems to be a limit to the length of the text you can use. My initial idea was to rewrite a very similar function only changing the length cap. Trouble is I don't understand what's limiting the length of the text in the original function. Any clues? Here's the code to the fnc: /* File: credits.sqf Author: Karel Moricky Description: Dynamic opening credits Parameter(s): _this select 0: Text _this select 1: (Optional) X coordinates _this select 2: (Optional) Y coordinates _this select 3: (Optional) Duration _this select 4: (Optional) Fadein time _this select 5: (Optional) Delta Y _this select 6: (Optional) Resource layer */ disableserialization; _text = _this select 0; _x = if (count _this > 1) then {_this select 1} else {-1}; _y = if (count _this > 2) then {_this select 2} else {-1}; _w = -1; _h = -1; _delay = if (count _this > 3) then {_this select 3} else {4}; _fade = if (count _this > 4) then {_this select 4} else {1}; _moveY = if (count _this > 5) then {_this select 5} else {0}; _layer = if (count _this > 6) then {_this select 6} else {[] call bis_fnc_rscLayer}; if (_delay < 0) then {_delay = 4}; if (_fade < 0) then {_fade = 1}; //--- Width and Height if (typename _x == typename []) then { _array = _x; _x = _array select 0; _w = _array select 1; }; if (typename _y == typename []) then { _array = _y; _y = _array select 0; _h = _array select 1; }; _layer cutrsc ["rscDynamicText","plain"]; _display = uinamespace getvariable "BIS_dynamicText"; _control = _display displayctrl 9999; _control ctrlsetfade 1; _control ctrlcommit 0; _pos = ctrlposition _control; if (_x != -1) then {_pos set [0,_x]}; if (_y != -1) then {_pos set [1,_y]}; if (_w != -1) then {_pos set [2,_w]}; if (_h != -1) then {_pos set [3,_h]}; _control ctrlsetposition _pos; if (typeName _text == typeName "") then { _control ctrlsetstructuredtext parseText _text; } else { _control ctrlsetstructuredtext _text; }; _control ctrlcommit 0; _control ctrlsetfade 0; _control ctrlcommit _fade; waituntil {ctrlcommitted _control}; if (_moveY != 0) then { _y = _pos select 1; _pos set [1,_y + _moveY]; _control ctrlsetposition _pos; _control ctrlcommit _delay; }; //if (_layer != 789) exitwith {}; _spawn = missionnamespace getvariable format ["bis_dynamicText_spawn_%1",_layer]; if (!isnil "_spawn") then {terminate _spawn}; _spawn = [_control,_delay,_fade,_moveY,_layer] spawn { disableserialization; _control = _this select 0; _delay = _this select 1; _fade = _this select 2; _moveY = _this select 3; _layer = _this select 4; if (_moveY != 0) then {waituntil {ctrlcommitted _control}} else {sleep _delay}; _control ctrlsetfade 1; _control ctrlcommit 1; waituntil {ctrlcommitted _control}; _layer cuttext ["","plain"]; }; missionnamespace setvariable [format ["bis_dynamicText_spawn_%1",_layer],_spawn]; waituntil {scriptdone _spawn};
- 10 replies
-
- dynamic test
- fnc
-
(and 1 more)
Tagged with:
-
z\ace\addons\zeus\functions\fnc_bi_modulecurator.sqf line 280
kMaN175 posted a topic in ARMA 3 - TROUBLESHOOTING
I've searched Google and the BI Forums for this issue and I wasn't able to find anything. If there is another post about it, my apologies before hand. I've encountered this same error with two separate missions. Both missions are on a dedicated server running ACE. I'm also unable to Zeus in the mission that is setup for Zeus, whereas I can when the mission is run on a different dedicated server. I am logged in as the admin on the dedicated server. I've also put the lines around where the error was reported in my .rpt file. https://github.com/kMaN175/Error-Messages/issues/1 Any help would be appreciated. Thanks.- 2 replies
-
- fnc
- modualcurator
-
(and 1 more)
Tagged with:
-
here's an update to my loadout, for 1 side (over kill).
dr death jm posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I'm looking for comments, what you all think, I know maybe a little overkill with removing items,ammo,uniform and what not, but it's part of my chasing down the bis bug warning (that i know is a waste f my time), but it's my OCD So don't hate me. TAG_FNC_Rifleman = { params ["_player"]; _player = player; removeAllWeapons _player; removeAllAssignedItems _player; removeAllItemsWithMagazines _player; removeHeadgear _player; removeGoggles _player; removeAllContainers _player; {_player removeitem _x} forEach items _player; { _player removeMagazineGlobal _x; } forEach magazines _player; { _player linkItem _x; } forEach ["ItemGPS", "ItemWatch", "ItemRadio", "ItemMap", "ItemCompass"]; removeUniform _player; _player forceAddUniform (["U_B_CTRG_1","U_B_CTRG_2","U_B_CTRG_3"] call BIS_fnc_selectRandom); _player addVest (["V_Chestrig_khk", "V_Chestrig_rgr", "V_Chestrig_oli", "V_TacVest_camo", "V_TacVest_khk", "V_TacVest_oli"] call BIS_fnc_selectRandom); _player addHeadgear (["H_HelmetSpecB_blk" ,"H_HelmetB_plain_mcamo"] call BIS_fnc_selectRandom); _player addGoggles "G_Balaclava_combat"; clearAllItemsFromBackpack _player; removeBackpack _player; _player addBackpack (["B_AssaultPack_blk", "B_TacticalPack_mcamo", "B_OutdoorPack_tan","B_Kitbag_cbr"] call BIS_fnc_selectRandom); (uniformContainer _player) addItemCargoGlobal ["FirstAidKit", 2]; (vestContainer _player) addMagazineCargoGlobal ["HandGrenade", (3 + floor random 2)]; (vestContainer _player) addMagazineCargoGlobal ["Chemlight_blue", (2 + floor random 2)]; (unitBackpack _player) addMagazineCargoGlobal ["MiniGrenade", (3 + floor random 2)]; (unitBackpack _player) addMagazineCargoGlobal ["SmokeShell", (3 + floor random 2)]; (unitBackpack _player) addMagazineCargoGlobal ["30Rnd_556x45_Stanag_Tracer_Green", (7 + floor random 3)]; _player addWeapon (["arifle_TRG21_F", "arifle_TRG20_F", "arifle_Mk20_plain_F", "arifle_Mk20_F", "arifle_Mk20C_F", "arifle_Mk20C_plain_F"] call BIS_fnc_selectRandom); _player addPrimaryWeaponItem "acc_flashlight"; [_player] call loadChange; }; TAG_FNC_Grenadier = { params ["_player"]; _player = player; removeAllWeapons _player; removeAllAssignedItems _player; removeAllItemsWithMagazines _player; removeHeadgear _player; removeGoggles _player; removeAllContainers _player; {_player removeitem _x} forEach items _player; { _player removeMagazineGlobal _x; } forEach magazines _player; { _player linkItem _x; } forEach ["ItemGPS", "ItemWatch", "ItemRadio", "ItemMap", "ItemCompass"]; removeUniform _player; _player forceAddUniform (["U_B_CTRG_1","U_B_CTRG_2","U_B_CTRG_3"] call BIS_fnc_selectRandom); _player addVest (["V_PlateCarrierGL_blk", "V_PlateCarrierGL_mtp", "V_PlateCarrierIAGL_oli"] call BIS_fnc_selectRandom); _player addHeadgear (["H_HelmetSpecB_blk" ,"H_HelmetB_plain_mcamo"] call BIS_fnc_selectRandom); _player addGoggles "G_Shades_Red"; clearAllItemsFromBackpack _player; removeBackpack _player; _player addBackpack (["B_Carryall_ocamo_Exp","B_Carryall_cbr", "B_Carryall_mcamo"] call BIS_fnc_selectRandom); (uniformContainer _player) addItemCargoGlobal ["FirstAidKit", 2]; (vestContainer _player) addMagazineCargoGlobal ["HandGrenade", (3 + floor random 2)]; (vestContainer _player) addMagazineCargoGlobal ["Chemlight_blue", (2 + floor random 2)]; (unitBackpack _player) addMagazineCargoGlobal ["SmokeShell", (3 + floor random 2)]; (unitBackpack _player) addMagazineCargoGlobal ["1Rnd_HE_Grenade_shell", (5 + floor random 3)]; (unitBackpack _player) addMagazineCargoGlobal ["30Rnd_556x45_Stanag_Tracer_Green", (7 + floor random 3)]; _player addWeapon "arifle_TRG21_GL_F"; _player addPrimaryWeaponItem "optic_Hamr"; _player addPrimaryWeaponItem "acc_flashlight"; [_player] call loadChange; }; TAG_FNC_Engineer = { params ["_player"]; _player = player; removeAllWeapons _player; removeAllAssignedItems _player; removeAllItemsWithMagazines _player; removeHeadgear _player; removeGoggles _player; removeAllContainers _player; {_player removeitem _x} forEach items _player; { _player removeMagazineGlobal _x; } forEach magazines _player; { _player linkItem _x; } forEach ["ItemGPS", "ItemWatch", "ItemRadio", "ItemMap", "ItemCompass"]; removeUniform _player; _player forceAddUniform (["U_B_CTRG_1","U_B_CTRG_2","U_B_CTRG_3"] call BIS_fnc_selectRandom); _player addVest (["V_Chestrig_khk", "V_Chestrig_rgr", "V_Chestrig_oli", "V_TacVest_camo", "V_TacVest_khk", "V_TacVest_oli"] call BIS_fnc_selectRandom); _player addHeadgear (["H_HelmetSpecB_blk" ,"H_HelmetB_plain_mcamo"] call BIS_fnc_selectRandom); _player addGoggles "G_Bandanna_beast"; clearAllItemsFromBackpack _player; removeBackpack _player; _player addBackpack (["B_Carryall_ocamo_Exp","B_Carryall_cbr", "B_Carryall_mcamo"] call BIS_fnc_selectRandom); (uniformContainer _player) addItemCargoGlobal ["FirstAidKit", 2]; (vestContainer _player) addMagazineCargoGlobal ["HandGrenade", (3 + floor random 2)]; (vestContainer _player) addMagazineCargoGlobal ["Chemlight_blue", (2 + floor random 2)]; (unitBackpack _player) addMagazineCargoGlobal ["MiniGrenade", (3 + floor random 2)]; (unitBackpack _player) addMagazineCargoGlobal ["SmokeShell", (3 + floor random 2)]; (unitBackpack _player) addMagazineCargoGlobal ["30Rnd_9x21_Red_Mag", (7 + floor random 3)]; (unitBackpack _player) addMagazineCargoGlobal ["11Rnd_45ACP_Mag", (4 + floor random 2)]; (unitBackpack _player) addMagazineCargoGlobal ["APERSTripMine_Wire_Mag", 1]; (unitBackpack _player) addMagazineCargoGlobal ["SLAMDirectionalMine_Wire_Mag", 1]; (unitBackpack _player) addItemCargoGlobal ["FirstAidKit", 1]; (unitBackpack _player) addMagazineCargoGlobal ["16Rnd_9x21_Mag", 3]; _player addWeapon "hgun_PDW2000_F"; _player addPrimaryWeaponItem "muzzle_snds_L"; _player addPrimaryWeaponItem "optic_Hamr"; _player addPrimaryWeaponItem "acc_flashlight"; _player addWeapon "hgun_Pistol_heavy_01_F"; _player addHandgunItem "muzzle_snds_acp"; _player addHandgunItem "optic_MRD"; _player addWeapon "rangefinder"; [_player] call loadChange; }; TAG_FNC_AutoRifleman = { params ["_player"]; _player = player; removeAllWeapons _player; removeAllAssignedItems _player; removeAllItemsWithMagazines _player; removeHeadgear _player; removeGoggles _player; removeAllContainers _player; {_player removeitem _x} forEach items _player; { _player removeMagazineGlobal _x; } forEach magazines _player; { _player linkItem _x; } forEach ["ItemGPS", "ItemWatch", "ItemRadio", "ItemMap", "ItemCompass"]; removeUniform _player; _player forceAddUniform (["U_B_CTRG_1","U_B_CTRG_2","U_B_CTRG_3"] call BIS_fnc_selectRandom); _player addVest (["V_Chestrig_khk", "V_Chestrig_rgr", "V_Chestrig_oli", "V_TacVest_camo", "V_TacVest_khk", "V_TacVest_oli"] call BIS_fnc_selectRandom); _player addHeadgear (["H_HelmetSpecB_blk" ,"H_HelmetB_plain_mcamo"] call BIS_fnc_selectRandom); _player addGoggles "G_Sport_Blackyellow"; clearAllItemsFromBackpack _player; removeBackpack _player; _player addBackpack (["B_Carryall_ocamo_Exp","B_Carryall_cbr", "B_Carryall_mcamo"] call BIS_fnc_selectRandom); (uniformContainer _player) addItemCargoGlobal ["FirstAidKit", 2]; (vestContainer _player) addMagazineCargoGlobal ["SmokeShell", (3 + floor random 2)]; (vestContainer _player) addMagazineCargoGlobal ["Chemlight_blue", (2 + floor random 2)]; (unitBackpack _player) addMagazineCargoGlobal ["200Rnd_65x39_cased_Box_Tracer", (4 + floor random 2)]; (unitBackpack _player) addMagazineCargoGlobal ["HandGrenade", (3 + floor random 2)]; (unitBackpack _player) addMagazineCargoGlobal ["MiniGrenade", (3 + floor random 2)]; _player addWeapon "LMG_Mk200_F"; _player addPrimaryWeaponItem "acc_flashlight"; [_player] call loadChange; }; TAG_FNC_AT_Light = { params ["_player"]; _player = player; removeAllWeapons _player; removeAllAssignedItems _player; removeAllItemsWithMagazines _player; removeHeadgear _player; removeGoggles _player; removeAllContainers _player; {_player removeitem _x} forEach items _player; { _player removeMagazineGlobal _x; } forEach magazines _player; { _player linkItem _x; } forEach ["ItemGPS", "ItemWatch", "ItemRadio", "ItemMap", "ItemCompass"]; removeUniform _player; _player forceAddUniform (["U_B_CTRG_1","U_B_CTRG_2","U_B_CTRG_3"] call BIS_fnc_selectRandom); _player addVest (["V_Chestrig_khk", "V_Chestrig_rgr", "V_Chestrig_oli", "V_TacVest_camo", "V_TacVest_khk", "V_TacVest_oli"] call BIS_fnc_selectRandom); _player addHeadgear (["H_HelmetSpecB_blk" ,"H_HelmetB_plain_mcamo"] call BIS_fnc_selectRandom); _player addGoggles "G_Sport_Red"; clearAllItemsFromBackpack _player; removeBackpack _player; _player addBackpack (["B_Carryall_ocamo_Exp","B_Carryall_cbr", "B_Carryall_mcamo"] call BIS_fnc_selectRandom); (uniformContainer _player) addItemCargoGlobal ["FirstAidKit", 2]; (uniformContainer _player) addMagazineCargoGlobal ["MiniGrenade", (3 + floor random 2)]; (vestContainer _player) addMagazineCargoGlobal ["SmokeShell", (3 + floor random 2)]; (vestContainer _player) addMagazineCargoGlobal ["Chemlight_blue", (2 + floor random 2)]; (unitBackpack _player) addMagazineCargoGlobal ["HandGrenade", (3 + floor random 2)]; (unitBackpack _player) addMagazineCargoGlobal ["100Rnd_65x39_caseless_mag_Tracer", (4 + floor random 2)]; (unitBackpack _player) addMagazineCargoGlobal ["30Rnd_65x39_caseless_mag_Tracer", (4 + floor random 2)]; (unitBackpack _player) addMagazineCargoGlobal ["RPG32_HE_F",3]; _player addWeapon "arifle_MX_SW_F"; _player addPrimaryWeaponItem "acc_flashlight"; _player addPrimaryWeaponItem "optic_Arco"; _player addWeapon "launch_RPG32_F"; [_player] call loadChange; }; TAG_FNC_Sapper = { params ["_player"]; _player = player; removeAllWeapons _player; removeAllAssignedItems _player; removeAllItemsWithMagazines _player; removeHeadgear _player; removeGoggles _player; removeAllContainers _player; {_player removeitem _x} forEach items _player; { _player removeMagazineGlobal _x; } forEach magazines _player; { _player linkItem _x; } forEach ["ItemGPS", "ItemWatch", "ItemRadio", "ItemMap", "ItemCompass"]; removeUniform _player; _player forceAddUniform (["U_B_CTRG_1","U_B_CTRG_2","U_B_CTRG_3"] call BIS_fnc_selectRandom); _player addVest (["V_Chestrig_khk", "V_Chestrig_rgr", "V_Chestrig_oli", "V_TacVest_camo", "V_TacVest_khk", "V_TacVest_oli"] call BIS_fnc_selectRandom); _player addHeadgear (["H_HelmetSpecB_blk" ,"H_HelmetB_plain_mcamo"] call BIS_fnc_selectRandom); _player addGoggles "G_Shades_Green"; clearAllItemsFromBackpack _player; removeBackpack _player; _player addBackpack (["B_Carryall_ocamo_Exp","B_Carryall_cbr", "B_Carryall_mcamo"] call BIS_fnc_selectRandom); (uniformContainer _player) addItemCargoGlobal ["FirstAidKit", 2]; (vestContainer _player) addMagazineCargoGlobal ["SmokeShellRed", (2 + floor random 2)]; (vestContainer _player) addMagazineCargoGlobal ["SmokeShellOrange", (2 + floor random 2)]; (vestContainer _player) addMagazineCargoGlobal ["Chemlight_green", (2 + floor random 2)]; (vestContainer _player) addMagazineCargoGlobal ["Chemlight_blue", (2 + floor random 2)]; (unitBackpack _player) addMagazineCargoGlobal ["HandGrenade", (3 + floor random 2)]; (unitBackpack _player) addMagazineCargoGlobal ["MiniGrenade", (3 + floor random 2)]; (unitBackpack _player) addMagazineCargoGlobal ["SmokeShell", (3 + floor random 2)]; (unitBackpack _player) addMagazineCargoGlobal ["11Rnd_45ACP_Mag", (4 + floor random 2)]; (unitBackpack _player) addMagazineCargoGlobal ["30Rnd_9x21_Red_Mag", (4 + floor random 2)]; (unitBackpack _player) addMagazineCargoGlobal ["APERSTripMine_Wire_Mag",3]; (unitBackpack _player) addMagazineCargoGlobal ["SLAMDirectionalMine_Wire_Mag", 3]; _player addWeapon "hgun_PDW2000_F"; _player addPrimaryWeaponItem "muzzle_snds_L"; _player addPrimaryWeaponItem "optic_Hamr"; _player addPrimaryWeaponItem "acc_flashlight"; _player addWeapon "hgun_Pistol_heavy_01_F"; _player addHandgunItem "optic_MRD"; [_player] call loadChange; }; TAG_FNC_Recon = { params ["_player"]; _player = player; removeAllWeapons _player; removeAllAssignedItems _player; removeAllItemsWithMagazines _player; removeHeadgear _player; removeGoggles _player; removeAllContainers _player; {_player removeitem _x} forEach items _player; { _player removeMagazineGlobal _x; } forEach magazines _player; { _player linkItem _x; } forEach ["ItemGPS", "ItemWatch", "ItemRadio", "ItemMap", "ItemCompass"]; removeUniform _player; _player forceAddUniform (["U_B_CTRG_1","U_B_CTRG_2","U_B_CTRG_3"] call BIS_fnc_selectRandom); _player addVest (["V_Chestrig_khk", "V_Chestrig_rgr", "V_Chestrig_oli", "V_TacVest_camo", "V_TacVest_khk", "V_TacVest_oli"] call BIS_fnc_selectRandom); _player addHeadgear (["H_HelmetSpecB_blk" ,"H_HelmetB_plain_mcamo"] call BIS_fnc_selectRandom); _player addGoggles "G_Shades_Green"; clearAllItemsFromBackpack _player; removeBackpack _player; _player addBackpack (["B_AssaultPack_blk", "B_TacticalPack_mcamo", "B_OutdoorPack_tan","B_Kitbag_cbr"] call BIS_fnc_selectRandom); (uniformContainer _player) addItemCargoGlobal ["FirstAidKit", 2]; (uniformContainer _player) addMagazineCargoGlobal ["Chemlight_blue", (2 + floor random 2)]; (vestContainer _player) addMagazineCargoGlobal ["Chemlight_green", (2 + floor random 2)]; (vestContainer _player) addMagazineCargoGlobal["SmokeShellRed", (2 + floor random 2)]; (vestContainer _player) addMagazineCargoGlobal ["SmokeShellOrange", (2 + floor random 2)]; (unitBackpack _player) addMagazineCargoGlobal ["HandGrenade", (3 + floor random 2)]; (unitBackpack _player) addMagazineCargoGlobal ["MiniGrenade", (3 + floor random 2)]; (unitBackpack _player) addMagazineCargoGlobal ["SmokeShell", (3 + floor random 2)]; (unitBackpack _player) addMagazineCargoGlobal ["30Rnd_9x21_Red_Mag", (7 + floor random 3)]; (unitBackpack _player) addMagazineCargoGlobal ["16Rnd_9x21_yellow_Mag", (4 + floor random 2)]; (unitBackpack _player) addMagazineCargoGlobal ["SLAMDirectionalMine_Wire_Mag", 2]; (unitBackpack _player) addMagazineCargoGlobal ["IEDLandSmall_Remote_Mag", 2]; _player addWeapon "SMG_02_F"; _player addPrimaryWeaponItem "muzzle_snds_L"; _player addPrimaryWeaponItem "acc_flashlight"; _player addPrimaryWeaponItem "optic_MRCO"; _player addWeapon "hgun_P07_F"; _player addHandgunItem "muzzle_snds_L"; [_player] call loadChange; }; TAG_FNC_SpecialF = { params ["_player"]; _player = player; removeAllWeapons _player; removeAllAssignedItems _player; removeAllItemsWithMagazines _player; removeHeadgear _player; removeGoggles _player; removeAllContainers _player; {_player removeitem _x} forEach items _player; { _player removeMagazineGlobal _x; } forEach magazines _player; { _player linkItem _x; } forEach ["ItemGPS", "ItemWatch", "ItemRadio", "ItemMap", "ItemCompass"]; removeUniform _player; _player forceAddUniform (["U_B_CTRG_1","U_B_CTRG_2","U_B_CTRG_3"] call BIS_fnc_selectRandom); _player addVest (["V_Chestrig_khk", "V_Chestrig_rgr", "V_Chestrig_oli", "V_TacVest_camo", "V_TacVest_khk", "V_TacVest_oli"] call BIS_fnc_selectRandom); _player addHeadgear (["H_HelmetSpecB_blk" ,"H_HelmetB_plain_mcamo"] call BIS_fnc_selectRandom); _player addGoggles "G_Shades_Green"; clearAllItemsFromBackpack _player; removeBackpack _player; _player addBackpack (["B_Carryall_ocamo_Exp","B_Carryall_cbr", "B_Carryall_mcamo"] call BIS_fnc_selectRandom); (uniformContainer _player) addItemCargoGlobal ["FirstAidKit", 2]; (vestContainer _player) addMagazineCargoGlobal ["SmokeShell", (3 + floor random 2)]; (vestContainer _player) addMagazineCargoGlobal ["Chemlight_blue", (2 + floor random 2)]; (unitBackpack _player) addMagazineCargoGlobal ["HandGrenade", (3 + floor random 2)]; (unitBackpack _player) addMagazineCargoGlobal ["MiniGrenade", (3 + floor random 2)]; (unitBackpack _player) addMagazineCargoGlobal ["16Rnd_9x21_yellow_Mag", (4 + floor random 2)]; (unitBackpack _player) addMagazineCargoGlobal ["30Rnd_9x21_Red_Mag", (5 + floor random 3)]; (unitBackpack _player) addMagazineCargoGlobal ["IEDLandBig_Remote_Mag", 2]; (unitBackpack _player) addItemCargoGlobal ["MineDetector", 1]; _player addWeapon "SMG_02_F"; _player addPrimaryWeaponItem "muzzle_snds_L"; _player addPrimaryWeaponItem "acc_flashlight"; _player addPrimaryWeaponItem "optic_Hamr"; _player addWeapon "hgun_P07_F"; _player addHandgunItem "muzzle_snds_L"; [_player] call loadChange; }; TAG_FNC_AT_Heavy = { params ["_player"]; _player = player; removeAllWeapons _player; removeAllAssignedItems _player; removeAllItemsWithMagazines _player; removeHeadgear _player; removeGoggles _player; removeAllContainers _player; {_player removeitem _x} forEach items _player; { _player removeMagazineGlobal _x; } forEach magazines _player; { _player linkItem _x; } forEach ["ItemGPS", "ItemWatch", "ItemRadio", "ItemMap", "ItemCompass"]; removeUniform _player; _player forceAddUniform (["U_B_CTRG_1","U_B_CTRG_2","U_B_CTRG_3"] call BIS_fnc_selectRandom); _player addVest (["V_Chestrig_khk", "V_Chestrig_rgr", "V_Chestrig_oli", "V_TacVest_camo", "V_TacVest_khk", "V_TacVest_oli"] call BIS_fnc_selectRandom); _player addHeadgear (["H_HelmetSpecB_blk" ,"H_HelmetB_plain_mcamo"] call BIS_fnc_selectRandom); _player addGoggles "G_Shades_Green"; clearAllItemsFromBackpack _player; removeBackpack _player; _player addBackpack (["B_Carryall_ocamo_Exp","B_Carryall_cbr", "B_Carryall_mcamo"] call BIS_fnc_selectRandom); (uniformContainer _player) addItemCargoGlobal ["FirstAidKit", 2]; (uniformContainer _player) addMagazineCargoGlobal ["Chemlight_blue", (2 + floor random 2)]; (VestContainer _player) addMagazineCargoGlobal ["UGL_FlareCIR_F", (2 + floor random 2)]; (VestContainer _player) addMagazineCargoGlobal ["Chemlight_green", (2 + floor random 2)]; (VestContainer _player) addMagazineCargoGlobal ["3Rnd_HE_Grenade_shell", 2]; (unitBackpack _player) addMagazineCargoGlobal ["HandGrenade", (3 + floor random 2)]; (unitBackpack _player) addMagazineCargoGlobal ["MiniGrenade", (3 + floor random 2)]; (unitBackpack _player) addMagazineCargoGlobal ["SmokeShell", (3 + floor random 2)]; (unitBackpack _player) addMagazineCargoGlobal ["SmokeShellRed", (2 + floor random 2)]; (unitBackpack _player) addMagazineCargoGlobal ["3Rnd_HE_Grenade_shell", (5 + floor random 3)]; (unitBackpack _player) addMagazineCargoGlobal ["30Rnd_65x39_caseless_mag", (7 + floor random 3)]; (unitBackpack _player) addMagazineCargoGlobal ["16Rnd_9x21_yellow_Mag", (4 + floor random 2)]; (unitBackpack _player) addMagazineCargoGlobal ["RPG32_HE_F", 3]; _player addWeapon "arifle_MX_GL_Black_F"; _player addPrimaryWeaponItem "acc_flashlight"; _player addPrimaryWeaponItem "optic_Hamr"; _player addWeapon "launch_RPG32_F"; _player addWeapon "hgun_P07_F"; _player addHandgunItem "muzzle_snds_L"; [_player] call loadChange; }; TAG_FNC_Marksman = { params ["_player"]; _player = player; removeAllWeapons _player; removeAllAssignedItems _player; removeAllItemsWithMagazines _player; removeHeadgear _player; removeGoggles _player; removeAllContainers _player; {_player removeitem _x} forEach items _player; { _player removeMagazineGlobal _x; } forEach magazines _player; { _player linkItem _x; } forEach ["ItemGPS", "ItemWatch", "ItemRadio", "ItemMap", "ItemCompass"]; removeUniform _player; _player forceAddUniform (["U_B_CTRG_1","U_B_CTRG_2","U_B_CTRG_3"] call BIS_fnc_selectRandom); _player addVest (["V_Chestrig_khk", "V_Chestrig_rgr", "V_Chestrig_oli", "V_TacVest_camo", "V_TacVest_khk", "V_TacVest_oli"] call BIS_fnc_selectRandom); _player addHeadgear (["H_HelmetSpecB_blk" ,"H_HelmetB_plain_mcamo"] call BIS_fnc_selectRandom); _player addGoggles "G_Bandanna_sport"; clearAllItemsFromBackpack _player; removeBackpack _player; _player addBackpack (["B_AssaultPack_blk", "B_TacticalPack_mcamo", "B_OutdoorPack_tan","B_Kitbag_cbr"] call BIS_fnc_selectRandom); (uniformContainer _player) addItemCargoGlobal ["FirstAidKit", 3]; (vestContainer _player) addMagazineCargoGlobal ["Chemlight_blue", (2 + floor random 2)]; (unitBackpack _player) addMagazineCargoGlobal ["HandGrenade", (3 + floor random 2)]; (unitBackpack _player) addMagazineCargoGlobal ["MiniGrenade", (3 + floor random 2)]; (unitBackpack _player) addMagazineCargoGlobal ["SmokeShell", (3 + floor random 2)]; (unitBackpack _player) addMagazineCargoGlobal ["11Rnd_45ACP_Mag", (4 + floor random 2)]; (unitBackpack _player) addMagazineCargoGlobal ["30Rnd_65x39_caseless_mag", (7 + floor random 3)]; (unitBackpack _player) addMagazineCargoGlobal ["HandGrenade", 2]; (unitBackpack _player) addItemCargoGlobal ["MineDetector", 1]; _player addWeapon "arifle_MXM_Black_F"; _player addPrimaryWeaponItem "muzzle_snds_H"; _player addPrimaryWeaponItem "optic_Nightstalker"; _player addPrimaryWeaponItem "acc_flashlight"; _player addWeapon "hgun_Pistol_heavy_01_F"; _player addHandgunItem "optic_MRD"; _player addWeapon "Rangefinder"; [_player] call loadChange; }; -
How to call function for an individual player
csk222 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello. How can I get the following code to work only for the person pressing the button? Right now if the button is pressed by anybody, it calls it for everybody. teg_fnc_sway0 = {player setCustomAimCoef 0;}; called like this: action = "[[],'teg_fnc_sway0',true,true] call BIS_fnc_MP;";