User Tools

Site Tools


arma3:missions:add-cargo-global

ArmA 3 Add Cargo Global

ArmA 3 Forum, ArmA 3, ArmA 3 Config, ArmA 3 Missions, ArmA 3 3D Modeling, ArmA 3 Scripting, ArmA 3 Terrain, ArmA 3 Texturing, ArmA 3 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: 2024/08/02 15:16 by snakeman

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

All PMC web site download services are temporarily suspended until web site yearly fees have been recovered, want to download addons/mods? Then Support PMC.

If you are grateful for all the work PMC has done in the past 25 years, use Support PMC page.