Advertisement
Guest User

Untitled

a guest
Jan 18th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.74 KB | None | 0 0
  1. scriptName "fn_dropLoot";
  2. /*--------------------------------------------------------------------
  3. Author: Maverick (ofpectag: MAV)
  4. File: fn_dropLoot.sqf
  5.  
  6. <Maverick Applications>
  7. Written by Maverick Applications (www.maverick-apps.de)
  8. You're not allowed to use this file without permission from the author!
  9. --------------------------------------------------------------------*/
  10. #define __filename "fn_dropLoot.sqf"
  11.  
  12. // Fetch container name from config // Deprecated
  13. //_containerClass = getText(missionConfigFile >> "Maverick_ConvoySidemission" >> "ConvoyConfigurationsPool" >> mav_convoy_class >> "Loot" >> "container");
  14.  
  15. // Fetch loot type from config
  16. _lootType = getText(missionConfigFile >> "Maverick_ConvoySidemission" >> "ConvoyConfigurationsPool" >> mav_convoy_class >> "Loot" >> "type");
  17.  
  18. // Fetch loot from config
  19. _loot = getArray(missionConfigFile >> "Maverick_ConvoySidemission" >> "ConvoyConfigurationsPool" >> mav_convoy_class >> "Loot" >> "data");
  20.  
  21. // Fill container with loot
  22. if (_lootType == "virtual") exitWith {
  23. mav_convoy_mainVehicle setVariable ["Trunk",[_loot,5000],true];
  24. [mav_convoy_mainVehicle,{life_vehicles pushBack _this}] remoteExec ["BIS_fnc_spawn"];
  25. };
  26. if (_lootType == "real") exitWith {
  27. {
  28. if ((_x select 2) == "WEAPON") then {
  29. mav_convoy_mainVehicle addWeaponCargoGlobal [_x select 0, _x select 1];
  30. };
  31. if ((_x select 2) == "MAGAZINE") then {
  32. mav_convoy_mainVehicle addMagazineCargoGlobal [_x select 0, _x select 1];
  33. };
  34. if ((_x select 2) == "WEAPON") then {
  35. mav_convoy_mainVehicle addItemCargoGlobal [_x select 0, _x select 1];
  36. };
  37. if ((_x select 2) == "BACKPACK") then {
  38. mav_convoy_mainVehicle addBackpackCargoGlobal [_x select 0, _x select 1];
  39. };
  40. } forEach _loot;
  41. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement