AdirB 18 Posted October 2, 2015 Hello guys! I'm trying to make civilians friendly to opfor so they will shoot blufor. With this code (civopf.sqf): CIVILIAN SetFriend [east, 0]; And I called it to MP from the init.sqf: ["setunits\civopf.sqf","BIS_fnc_execVM",true,true] spawn BIS_fnc_MP; I did it because I read in the internet that SetFriend won't work on dedicated server unless you call it to MP. But it is not working. Then I made a script that deletes the NVG's from all BLUFOR and OPFOR and adds AK and magazines to all CIVILIANS: //Gear for BLUFOR { if (side _x == west) then { _x unassignItem "NVGoggles"; _x removeItem "NVGoggles"; }; } foreach allunits; //Gear for OPFOR { FaceArray = ["AfricanHead_01, AfricanHead_02, AfricanHead_03, PersianHead_A3_03"]; { if (side _x == CIVILIAN) then { _x unassignItem "NVGoggles"; _x removeItem "NVGoggles"; _x addWeapon "rhs_weap_akm"; _x addItemToUniform "rhs_30Rnd_762x39mm"; _x addItemToUniform "rhs_30Rnd_762x39mm"; _x addItemToUniform "rhs_30Rnd_762x39mm"; _x setface (FaceArray select (random(round(count facearray)))) }; } foreach allunits; And I called it from the init.sqf neither: nul = [this] execVM "setunits\gear.sqf" But it is not working neither. Please help me to solve this problems. Thanks guys! :) Share this post Link to post Share on other sites
froggyluv 2136 Posted October 2, 2015 May want to try 'side group west/civilian' Share this post Link to post Share on other sites
AdirB 18 Posted October 2, 2015 May want to try 'side group west/civilian' Can you please give me an example for this code? Share this post Link to post Share on other sites
phronk 898 Posted October 2, 2015 If your script is going to be used in a mission on a dedicated server, I don't think "setFace" works. Share this post Link to post Share on other sites
AdirB 18 Posted October 2, 2015 If your script is going to be used in a mission on a dedicated server, I don't think "setFace" works. It won't work even if I'm calling it with "BIS_fnc_execVM"? If so, can you please show me a code that will work? Share this post Link to post Share on other sites
AdirB 18 Posted October 2, 2015 I found out that if I group civlians with a opfor then they become enemies of BLUFOR. So, the problem of SetFriend is solved. please help me with the other problem :) Share this post Link to post Share on other sites
AdirB 18 Posted October 2, 2015 The script is working but the SetFace is not working for somereason. I've tried to add RemoveUniform _x; to check if its working. Share this post Link to post Share on other sites
froggyluv 2136 Posted October 2, 2015 Hey man I got a similar getup going in my mission so I just kinda just infused mine into your -now you civs will be a shotgun crew :P Couldnt get the faces going but why not just use the default african faces? //Gear for BLUFOR { if (side group _x == west) then { _x unlinkitem "NVGoggles" }; } foreach allunits; //Gear for OPFOR { FaceArray = ["AfricanHead_01, AfricanHead_02, AfricanHead_03, PersianHead_A3_03"]; if (side group _x == CIVILIAN) then { _x unlinkitem "NVGoggles"; removeAllWeapons _x; _x addVest "V_mas_chi_chicom"; _x addMagazine "rhsusf_8Rnd_00Buck"; _x addMagazine "rhsusf_8Rnd_00Buck"; _x addMagazine "rhsusf_8Rnd_00Buck"; _x addMagazine "rhsusf_8Rnd_00Buck"; _x addWeapon "rhs_weap_M590_8RD"; _x addItemToVest "rhsusf_8Rnd_00Buck"; _x addItemToVest "rhsusf_8Rnd_00Buck"; _x addItemToVest "rhsusf_8Rnd_00Buck"; _x addItemToVest "rhsusf_8Rnd_00Buck"; _x addItemToVest "rhsusf_8Rnd_00Buck"; _x addItemToVest "rhsusf_8Rnd_00Buck"; _x addItemToVest "rhsusf_8Rnd_00Buck"; _x addItemToVest "rhsusf_8Rnd_00Buck"; _x addItemToVest "rhsusf_8Rnd_00Buck"; _x addItemToVest "rhsusf_8Rnd_00Buck"; _x addItemToVest "rhsusf_8Rnd_00Buck"; _x addItemToVest "rhs_mag_9x18_12_57N181S"; _x addItemToVest "rhs_mag_9x18_12_57N181S"; _x addWeapon "rhs_weap_makarov_pmm"; _x setface (FaceArray select (random(round(count facearray))))}; } foreach allUnits; Share this post Link to post Share on other sites
AdirB 18 Posted October 3, 2015 Hey man I got a similar getup going in my mission so I just kinda just infused mine into your -now you civs will be a shotgun crew :P Couldnt get the faces going but why not just use the default african faces? //Gear for BLUFOR { if (side group _x == west) then { _x unlinkitem "NVGoggles" }; } foreach allunits; //Gear for OPFOR { FaceArray = ["AfricanHead_01, AfricanHead_02, AfricanHead_03, PersianHead_A3_03"]; if (side group _x == CIVILIAN) then { _x unlinkitem "NVGoggles"; removeAllWeapons _x; _x addVest "V_mas_chi_chicom"; _x addMagazine "rhsusf_8Rnd_00Buck"; _x addMagazine "rhsusf_8Rnd_00Buck"; _x addMagazine "rhsusf_8Rnd_00Buck"; _x addMagazine "rhsusf_8Rnd_00Buck"; _x addWeapon "rhs_weap_M590_8RD"; _x addItemToVest "rhsusf_8Rnd_00Buck"; _x addItemToVest "rhsusf_8Rnd_00Buck"; _x addItemToVest "rhsusf_8Rnd_00Buck"; _x addItemToVest "rhsusf_8Rnd_00Buck"; _x addItemToVest "rhsusf_8Rnd_00Buck"; _x addItemToVest "rhsusf_8Rnd_00Buck"; _x addItemToVest "rhsusf_8Rnd_00Buck"; _x addItemToVest "rhsusf_8Rnd_00Buck"; _x addItemToVest "rhsusf_8Rnd_00Buck"; _x addItemToVest "rhsusf_8Rnd_00Buck"; _x addItemToVest "rhsusf_8Rnd_00Buck"; _x addItemToVest "rhs_mag_9x18_12_57N181S"; _x addItemToVest "rhs_mag_9x18_12_57N181S"; _x addWeapon "rhs_weap_makarov_pmm"; _x setface (FaceArray select (random(round(count facearray))))}; } foreach allUnits; Thank you very much! I've got the SetFace working. The problem was that I haven't gave the string thingy ( " " ) in the array for the every specific face name but for all of the, together. Share this post Link to post Share on other sites