hi.
I use a script to assign the weapons to each player. It works ok if I'm hosting, I mean, I am the server and the player.
The script is the following:
_unit = player;
switch(_unit)do
{
//sniper gear
case Sni1:
{
removeAllWeapons _unit;
{_unit removeMagazines _x} foreach magazines _unit;
_unit addMagazine "10Rnd_127x99_m107";
_unit addMagazine "10Rnd_127x99_m107";
_unit addMagazine "10Rnd_127x99_m107";
_unit addMagazine "10Rnd_127x99_m107";
_unit addMagazine "10Rnd_127x99_m107";
_unit addMagazine "10Rnd_127x99_m107";
_unit addMagazine "10Rnd_127x99_m107";
_unit addMagazine "10Rnd_127x99_m107";
_unit addWeapon "M107";
_unit selectWeapon "M107";
_unit addMagazine "15Rnd_9x19_M9SD";
_unit addMagazine "15Rnd_9x19_M9SD";
_unit addMagazine "15Rnd_9x19_M9SD";
_unit addMagazine "15Rnd_9x19_M9SD";
_unit addMagazine "15Rnd_9x19_M9SD";
_unit addMagazine "15Rnd_9x19_M9SD";
_unit addMagazine "15Rnd_9x19_M9SD";
_unit addMagazine "15Rnd_9x19_M9SD";
_unit addWeapon "M9SD";
_unit addMagazine "HandGrenade";
_unit addMagazine "HandGrenade";
_unit addMagazine "SmokeShell";
_unit addMagazine "SmokeShell";
_unit addWeapon "Binocular";
_unit addWeapon "NVGoggles";
};
//Spotter gear
case Spo1:
{
removeAllWeapons _unit;
{_unit removeMagazines _x} foreach magazines _unit;
_unit addMagazine "30Rnd_556x45_StanagSD";
_unit addMagazine "30Rnd_556x45_StanagSD";
_unit addMagazine "30Rnd_556x45_StanagSD";
_unit addMagazine "30Rnd_556x45_StanagSD";
_unit addMagazine "30Rnd_556x45_StanagSD";
_unit addMagazine "30Rnd_556x45_StanagSD" ;
_unit addMagazine "30Rnd_556x45_StanagSD";
_unit addMagazine "30Rnd_556x45_StanagSD";
_unit addMagazine "30Rnd_556x45_StanagSD";
_unit addWeapon "wip_m4acog_sd";
_unit selectWeapon "wip_m4acog_sd";
_unit addMagazine "15Rnd_9x19_M9SD";
_unit addMagazine "15Rnd_9x19_M9SD";
_unit addMagazine "15Rnd_9x19_M9SD";
_unit addMagazine "15Rnd_9x19_M9SD";
_unit addMagazine "15Rnd_9x19_M9SD";
_unit addMagazine "15Rnd_9x19_M9SD";
_unit addMagazine "15Rnd_9x19_M9SD";
_unit addMagazine "15Rnd_9x19_M9SD";
_unit addWeapon "M9SD";
_unit addMagazine "LaserBatteries";
_unit addWeapon "LaserDesignator";
_unit addMagazine "HandGrenade";
_unit addMagazine "HandGrenade";
_unit addWeapon "NVGoggles";
};
//standard gear(rest of soldiers)
default
{
removeAllWeapons _unit;
{_unit removeMagazines _x} foreach magazines _unit;
_unit addMagazine "30Rnd_556x45_Stanag";
_unit addMagazine "30Rnd_556x45_Stanag";
_unit addMagazine "30Rnd_556x45_Stanag";
_unit addMagazine "30Rnd_556x45_Stanag";
_unit addMagazine "30Rnd_556x45_Stanag";
_unit addMagazine "30Rnd_556x45_Stanag";
_unit addMagazine "30Rnd_556x45_Stanag";
_unit addMagazine "30Rnd_556x45_Stanag";
_unit addMagazine "30Rnd_556x45_Stanag";
_unit addMagazine "30Rnd_556x45_Stanag";
_unit addMagazine "HandGrenade";
_unit addMagazine "SmokeShell";
_unit addMagazine "1Rnd_HE_M203";
_unit addMagazine "1Rnd_HE_M203";
_unit addMagazine "1Rnd_HE_M203";
_unit addMagazine "1Rnd_HE_M203";
_unit addMagazine "1Rnd_HE_M203";
_unit addMagazine "1Rnd_HE_M203";
_unit addMagazine "1Rnd_HE_M203";
_unit addMagazine "1Rnd_HE_M203";
_unit addWeapon "wip_m4aim_m203_sd";
_unit selectWeapon "wip_m4aim_m203_sd";
_unit addWeapon "NVGoggles";
};
};
I call the script in my init.sqf and as I said, it works fine if I am the player and the host.
However, it doesn't work when I uploaded to our dedicated server. It just load the default unit gear.
Any idea why is this happening?
Thanks in advance.