DMS_Exile/@ExileServer/addons/a3_dms/scripts/fn_SpawnCrate.sqf
eraser1 687bbfb798 Use config function definitions
Thanks for the tip Zupa!
2015-09-04 22:40:00 -05:00

34 lines
587 B
Plaintext

/*
DMS_fnc_SpawnCrate
Created by eraser1
Usage:
[
_crateClassName,
_pos
] call DMS_fnc_SpawnCrate;
Returns crate object
*/
private ["_crateClassName", "_pos", "_crate"];
_OK = params
[
["_crateClassName","ERROR",[""]],
["_pos","ERROR",[[]],[3]]
];
if (!_OK) then
{
diag_log format ["DMS ERROR :: Calling DMS_SpawnCrate with invalid parameters: %1",_this];
};
_crate = createVehicle [_crateClassName,_pos,[], 0, "CAN_COLLIDE"];
clearWeaponCargoGlobal _crate;
clearItemCargoGlobal _crate;
clearMagazineCargoGlobal _crate;
clearBackpackCargoGlobal _crate;
_crate;