DMS_Exile/@ExileServer/addons/a3_dms/scripts/fn_SpawnCrate.sqf
eraser1 2650157577 Bunch of stuff...
* NEW CONFIG VALUES: ```DMS_GodmodeCrates``` and
```DMS_CrateCase_Sniper```. DMS_GodmodeCrates is pretty self-explanatory
:P
* NEW FEATURE FOR "DMS_fnc_FillCrate": You can now define "crate cases"
in the config (such as "DMS_CrateCase_Sniper"). Passing the "crate case"
name (such as "Sniper") will make the crate spawn with the exact gear
defined in the config. Refer to the testmission.sqf (line 80) and
"DMS_CrateCase_Sniper" config for an example.
* Spawned vehicles will now be LOCKED and INVINCIBLE until the mission
is completed.
* Spawned vehicles spawn with 100% fuel.
* "Fixed" some cases where killing from a mounted gun would reset your
money/respect (maybe).
* Fixed some spelling errors and incorrect names in some of the mission
messages/markers.
* Fixed DMS_fnc_FindSafePos for Bornholm. If you have any issues with
custom maps, please let us know.
* Fixed backpack spawning on the ground behind an AI unit that was
supposed to get a launcher.
2015-09-11 20:21:58 -05:00

36 lines
614 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"];
_crate allowDamage false;
clearWeaponCargoGlobal _crate;
clearItemCargoGlobal _crate;
clearMagazineCargoGlobal _crate;
clearBackpackCargoGlobal _crate;
_crate;