Cargo Functions

ace_cargo_fnc_getNameItem

Description

Gets the name of the item, and alternatively the custom name if requested and available.

Parameters

Index Description Datatype(s) Default Value
0 Item or OBJECT ””
1 Add custom name BOOL false

Return Value

Description Datatype(s)
Item name STRING

Example

cursorObject call ace_cargo_fnc_getNameItem

Authors

  • JasperRab

ace_cargo_fnc_loadItem

Description

Loads an object into a vehicle. Objects loaded via classname remain virtual until unloaded.

Parameters

Index Description Datatype(s) Default Value
0 Item to be loaded or OBJECT ””
1 Holder object (vehicle) OBJECT objNull
2 Ignore interaction distance and stability checks BOOL false

Return Value

Description Datatype(s)
Object loaded BOOL

Example

["ACE_Wheel", cursorObject] call ace_cargo_fnc_loadItem

Authors

  • Glowbal

ace_cargo_fnc_removeCargoItem

Description

Removes a cargo item from the vehicle.

Parameters

Index Description Datatype(s) Default Value
0 Item to be removed or OBJECT ””
1 Holder object (vehicle) OBJECT objNull
2 Amount NUMBER 1

Return Value

Description Datatype(s)
Number of items removed NUMBER

Example

["ACE_Wheel", cursorObject, 2] call ace_cargo_fnc_removeCargoItem
[crate_7, truck] call ace_cargo_fnc_removeCargoItem

Authors

  • 654wak654

ace_cargo_fnc_setSize

Description

Sets the cargo size of any object. Has global effect. Adds the load action menu if necessary. A negative size disables the object’s cargo interactions.

Parameters

Index Description Datatype(s) Default Value
0 Object OBJECT objNull
1 Cargo size NUMBER nil

Return Value

None

Example

[cursorObject, 3] call ace_cargo_fnc_setSize

Authors

  • kymckay

ace_cargo_fnc_setSpace

Description

Sets the cargo space of any object. Has global effect. Adds the cargo action menu if necessary.

Parameters

Index Description Datatype(s) Default Value
0 Vehicle OBJECT objNull
1 Cargo space NUMBER nil

Return Value

None

Example

[vehicle player, 20] call ace_cargo_fnc_setSpace

Authors

  • kymckay

ace_cargo_fnc_unloadItem

Description

Unloads an object from a vehicle.

Parameters

Index Description Datatype(s) Default Value
0 Item to be unloaded or OBJECT ””
1 Holder object (vehicle) OBJECT objNull
2 Unloader OBJECT objNull
3 Deploy parameters ARRAY []
0 Position AGL ARRAY  
1 Direction NUMBER  

Return Value

Description Datatype(s)
Object unloaded BOOL

Example

["ACE_Wheel", cursorObject] call ace_cargo_fnc_unloadItem

Authors

  • Glowbal
  • ViperMaul