Running the following script to give people proper guns and ammo for a mission. The problem is, even though the players have the right guns on THEIR end, visually, the other plays some times see the wrong guns. They operate like the gun the player has, but displays the weapon the default character had, and not the custom load out.
Description
Details
- Legacy ID
- 1364624278
- Severity
- Minor
- Resolution
- Duplicate
- Reproducibility
- Always
- Category
- Multiplayer
Add a 5 man diver team, create an init.sqf, and execvm this script in it.
if (local man1) then {
removeAllWeapons man1;
(unitBackpack man1) addMagazineCargo ["30Rnd_65x39_caseless_mag",8];
man1 addWeapon "arifle_MX_ARCO_point_grip_F";
(unitBackpack man1) addMagazineCargo ["DemoCharge_Remote_Mag",2];
(unitBackpack man1) addMagazineCargo ["HandGrenade", 4];
man1 additem "FirstAidKit";
man1 additem "FirstAidKit";
man1 additem "FirstAidKit";
man1 additem "FirstAidKit";
man1 moveInCargo bird1;
man1 addITEM "NVGoggles";
man1 assignItem "NVGoggles";
man1 addItem "muzzle_snds_H";
(unitBackpack man1) addMagazineCargo ["16Rnd_9x21_Mag",8];
man1 addweapon "hgun_P07_F";
man1 additem "muzzle_snds_L";
unit1 = group man1;
man1 additem "optic_Holosight";
man1 additem "optic_Hamr";
};
if (local man2) then {
removeAllWeapons man2;
man2 addbackpack "B_AssaultPack_blk";
(unitBackpack man2) addMagazineCargo ["30Rnd_65x39_caseless_mag",8];
man2 addWeapon "arifle_MX_ARCO_point_grip_F";
(unitBackpack man2) addMagazineCargo ["DemoCharge_Remote_Mag",2];
(unitBackpack man2) addMagazineCargo ["HandGrenade", 4];
man2 additem "FirstAidKit";
man2 additem "FirstAidKit";
man2 additem "FirstAidKit";
man2 additem "FirstAidKit";
man2 moveInCargo bird1;
man2 addITEM "NVGoggles";
man2 assignItem "NVGoggles";
man2 addItem "muzzle_snds_H";
man2 additem "optic_Holosight";
man2 addMagazine ["DemoCharge_Remote_Mag",2];
(unitBackpack man2) addMagazineCargo ["16Rnd_9x21_Mag",8];
man2 addweapon "hgun_P07_F";
man2 additem "muzzle_snds_L";
unit1 = group man1;
man2 additem "optic_Hamr";
};
if (local man3) then {
removeAllWeapons man3;
man3 addbackpack "B_AssaultPack_blk";
(unitBackpack man3) addMagazineCargo ["30Rnd_65x39_caseless_mag",8];
man3 addWeapon "arifle_MX_ARCO_point_grip_F";
(unitBackpack man3) addMagazineCargo ["DemoCharge_Remote_Mag",2];
(unitBackpack man3) addMagazineCargo ["HandGrenade", 4];
man3 additem "FirstAidKit";
man3 additem "FirstAidKit";
man3 additem "FirstAidKit";
man3 additem "FirstAidKit";
man3 moveInCargo bird1;
man3 addITEM "NVGoggles";
man3 assignItem "NVGoggles";
man3 addItem "muzzle_snds_H";
(unitBackpack man3) addMagazineCargo ["16Rnd_9x21_Mag",8];
man3 addweapon "hgun_P07_F";
man3 additem "muzzle_snds_L";
man3 addMagazine ["DemoCharge_Remote_Mag",2];
man3 additem "optic_Holosight";
man3 additem "optic_Hamr";
unit1 = group man1;
};
if (local man4) then {
removeAllWeapons man4;
man4 addbackpack "B_AssaultPack_blk";
(unitBackpack man4) addMagazineCargo ["20Rnd_762x45_Mag",12];
man4 addWeapon "srifle_EBR_Hamr_point_grip_F";
(unitBackpack man4) addMagazineCargo ["DemoCharge_Remote_Mag",2];
(unitBackpack man4) addMagazineCargo ["HandGrenade", 4];
man4 additem "FirstAidKit";
man4 additem "FirstAidKit";
man4 additem "FirstAidKit";
man4 additem "FirstAidKit";
man4 moveInCargo bird1;
man4 addITEM "NVGoggles";
man4 assignItem "NVGoggles";
man4 addItem "muzzle_snds_b";
man4 addMagazine ["DemoCharge_Remote_Mag",2];
man4 additem "optic_Holosight";
(unitBackpack man4) addMagazineCargo ["16Rnd_9x21_Mag",8];
man4 addweapon "hgun_P07_F";
man4 additem "optic_Hamr";
man4 additem "muzzle_snds_L";
unit1 = group man1;
};
if (local man5) then {
removeAllWeapons man5;
man5 addbackpack "B_AssaultPack_blk";
(unitBackpack man5) addMagazineCargo ["30Rnd_65x39_caseless_mag",8];
man5 addWeapon "arifle_MX_ARCO_point_grip_F";
(unitBackpack man5) addMagazineCargo ["DemoCharge_Remote_Mag",2];
(unitBackpack man5) addMagazineCargo ["HandGrenade", 4];
man5 additem "FirstAidKit";
man5 additem "FirstAidKit";
man2 additem "FirstAidKit";
man2 additem "FirstAidKit";
man5 addITEM "NVGoggles";
man5 assignItem "NVGoggles";
man5 addItem "muzzle_snds_b";
man5 addMagazine ["DemoCharge_Remote_Mag",2];
man5 additem "optic_Holosight";
(unitBackpack man5) addMagazineCargo ["16Rnd_9x21_Mag",8];
man5 addweapon "hgun_P07_F";
man5 additem "muzzle_snds_L";
man5 additem "optic_Hamr";
unit1 = group man1;
};
Some of the players will see eachother with the proper guns, such as the CX or the EBR, but some times you will see them with the under water gun, but it still operates like its one of the other guns. This is all done when one player is hosting the server locally, not on a dedicated server environment.