diff --git a/addons/cargo/XEH_postInit.sqf b/addons/cargo/XEH_postInit.sqf index 6156cce1ac..b1e3493b11 100644 --- a/addons/cargo/XEH_postInit.sqf +++ b/addons/cargo/XEH_postInit.sqf @@ -101,7 +101,7 @@ GVAR(objectActions) = [ {(_target getVariable [QGVAR(canLoad), getNumber (configOf _target >> QGVAR(canLoad))]) in [true, 1]} && {alive _target} && {[_player, _target, ["isNotSwimming"]] call EFUNC(common,canInteractWith)} && - {(getNumber ((configOf _target) >> QGVAR(noRename))) == 0} + {(_target getVariable [QGVAR(noRename), getNumber (configOf _target >> QGVAR(noRename))]) in [false, 0]} } ] call EFUNC(interact_menu,createAction), [QGVAR(load), localize LSTRING(loadObject), "a3\ui_f\data\IGUI\Cfg\Actions\loadVehicle_ca.paa", diff --git a/docs/wiki/framework/cargo-framework.md b/docs/wiki/framework/cargo-framework.md index 2baf9ebc9a..1bdb7716fd 100644 --- a/docs/wiki/framework/cargo-framework.md +++ b/docs/wiki/framework/cargo-framework.md @@ -28,8 +28,8 @@ class CfgVehicles { ### 1.2 Making an object loadable ```cpp -class staticBananaLauncher { - class yourVehicleBaseClass { +class CfgVehicles { + class staticBananaLauncher { ace_cargo_size = 4; // Cargo space the object takes ace_cargo_canLoad = 1; // Enables the object to be loaded (1-yes, 0-no) ace_cargo_noRename = 1; // Blocks renaming object (1-blocked, 0-allowed) @@ -162,3 +162,9 @@ Note first arg can be a in-game object or a classname of an object type. * ["ACE_Wheel", vehicle, 2] call ace_cargo_fnc_removeCargoItem * [crate_7, truck] call ace_cargo_fnc_removeCargoItem ``` + +### 4.7 Disable cargo renaming via script + +```sqf +cargoBox setVariable ["ace_cargo_noRename", true] +```