Advertisement
Halvhjearne

resetvehicleammo.sqf

May 27th, 2015
421
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.37 KB | None | 0 0
  1. /*
  2.     Arma3 Epoch remove vehicle ammo/weapons by Halv
  3.  
  4.     Copyright (C) 2015  Halvhjearne
  5.  
  6.     This program is free software: you can redistribute it and/or modify
  7.     it under the terms of the GNU General Public License as published by
  8.     the Free Software Foundation, either version 3 of the License, or
  9.     (at your option) any later version.
  10.  
  11.     This program is distributed in the hope that it will be useful,
  12.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.     GNU General Public License for more details.
  15.  
  16.     You should have received a copy of the GNU General Public License
  17.     along with this program.  If not, see <http://www.gnu.org/licenses/>.
  18.  
  19.     Contact : [email protected]
  20. */
  21.  
  22. _restrictedvehicles = [
  23.     //Vehicleclass              //Weapons to remove        
  24.     ["B_Heli_Light_01_armed_F",["missiles_DAR"]]
  25. ];
  26.  
  27. //vehicle ammo %, note that this might add ammo to a vehicles with ammo below this amount, 1 = no change
  28. _vehicleammo = 1;
  29.  
  30. if(hasInterface)exitWith{};
  31. waitUntil{!isNil "EPOCH_allowedVehiclesList"};
  32. waitUntil{isNil "EPOCH_allowedVehiclesList"};
  33.  
  34. {
  35.     _veh = _x;
  36.     {
  37.         _res = _x;
  38.         if(_veh isKindOf (_res select 0))then{
  39.             {_veh removeWeapon _x;}forEach (_res select 1);
  40.             if(_vehicleammo < 1)then{
  41.                 _veh setVehicleAmmo _vehicleammo;
  42.             };
  43.         };
  44.     }forEach _restrictedvehicles;
  45. }forEach vehicles;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement