mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 20:13:13 +03:00
This adds a remove and add ammo function for vehicles. Also a keep flares check if the vehicle ammo got removed. Server admins can add/remove different weapons to vehicles by just editing server_spawnVehicle.
34 lines
934 B
Plaintext
34 lines
934 B
Plaintext
local _vehicle = _this select 0;
|
|
local _clearAmmo = _this select 1;
|
|
local _addAmmo = _this select 2;
|
|
local _type = typeOf _vehicle;
|
|
|
|
local _skipAmmoClear = []; // Add vehicle classnames you do not want to clear the ammo
|
|
local _skipAmmoFill = []; // Add vehicle classnames you do not want to fill the ammo
|
|
|
|
if (_type in DZE_disableThermal) then {
|
|
_vehicle disableTIEquipment true;
|
|
};
|
|
|
|
if (_clearAmmo && {!(_type in _skipAmmoClear)}) then {
|
|
_vehicle call server_clearTurrets;
|
|
};
|
|
|
|
if (_addAmmo && {!(_type in _skipAmmoFill)}) then {
|
|
local _countMags = 2; // Number of how many magazines will be added to the vehicle
|
|
[_vehicle,_countMags] call server_fillTurrets;
|
|
};
|
|
|
|
|
|
// Add/Remove extra weapons and ammo
|
|
|
|
/*
|
|
|
|
if (_type == "GNT_C185T") exitwith {
|
|
_vehicle removeWeapon "FFARLauncher_12";
|
|
_vehicle addWeapon "pook_M60_dual_DZ";
|
|
_vehicle addMagazine "pook_1300Rnd_762x51_M60";
|
|
_vehicle addMagazine "pook_1300Rnd_762x51_M60";
|
|
};
|
|
|
|
*/ |