Hi folks,
I have a .sqf script that is run from the initialization field of two playable snipers that changes their loadout and moves them into the cargo area of a CRRC. The script is as follows:
private ["_i", "_unit"];
_unit = _this;
// c1 is the CRRC.
_unit moveInCargo c1;
_unit removeMagazine "SmokeShellRed";
_unit removeMagazine "SmokeShellGreen";
for [{_i=1},{_i<=4},{_i=_i+1}] do {
_unit addMagazine "5Rnd_762x51_M24";
_unit addMagazine "15Rnd_9x19_M9";
};
It removes their smoke grenades and gives them 4 M24 mags and 4 M9 mags. Seems simple enough.
In single player, it works without a problem. In multiplayer, the client player does not have his loadout changed. Thus, he still has the smoke grenades and does not get the extra mags. However, he does get moved into the CRRC, which means that the script is running.
Is there a way to remove mags and add mags via a script in multiplayer, or can you only do this from the initialization field of a unit?