DMS_Exile/@ExileServer/addons/a3_dms/scripts/SpawnCrate.sqf
eraser1 6e3a9b8615 More fixes + SpawnCrate
Created function SpawnCrate

Updated missions to use DMS_SpawnCrate

Fix (I think) issue with _side being passed to onkilled

updated test PBO
2015-08-31 01:08:30 -05:00

34 lines
579 B
Plaintext

/*
DMS_SpawnCrate
Created by eraser1
Usage:
[
_crateClassName,
_pos
] call DMS_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;