mirror of
https://github.com/Defent/DMS_Exile.git
synced 2024-08-30 16:52:12 +00:00
34 lines
579 B
Plaintext
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;
|