User Tools

Site Tools


ArmA 3 Add Cargo Global

ArmA 3, Config, Missions, 3D Modeling, Scripting, Terrain, Texturing, Tools

Adding gunz to weapon boxes or trucks etc.

addWeaponCargoGlobal, addItemCargoGlobal or other global commands cannot be run from mission.sqm init line because that is run for all clients as well (join in progress for example), you can do it but add LOCAL check to it, see below:

[vehicle, 10] execVM "PMC\PMC_CUP_UniformsToCargo.sqf";
private _v = _this select 0;
private _amount = _this select 1;
// if we are not local (in one machine only, in MP usually the server), we exit
if !(local _v) exitWith {};
_v addItemCargoGlobal ["CUP_H_FR_BandanaGreen", _amount];
arma3/missions/add-cargo-global.txt · Last modified: 2022-06-25 17:54 by snakeman