Advertisement
Guest User

Untitled

a guest
Sep 16th, 2014
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.10 KB | None | 0 0
  1. {
  2. {
  3. if (getPlayerUID _x != "" && isPlayer _x) then
  4. {
  5. _dir = getdir _x;
  6. _pos = getPosATL _x;
  7. _pos = [(_pos select 0)+2*sin(_dir),(_pos select 1)+2*cos(_dir),(_pos select 2)];
  8. [_dir,_pos] spawn {
  9. _dir = _this select 0;
  10. _pos = _this select 1;
  11. _b0x = 'Foodbox1' createVehicle _pos;
  12. _b0x setPosATL _pos;
  13. clearWeaponCargoGlobal _b0x;
  14. clearmagazinecargoGlobal _b0x;
  15.  
  16. if (isNil "PV_b0x_wpnlist") then
  17. {
  18. PV_b0x_wpnlist = [];
  19. _CfgWeapons = configFile >> "CfgWeapons";
  20. for "_i" from 0 to (count _CfgWeapons)-1 do
  21. {
  22. _weapon = _CfgWeapons select _i;
  23. if (isClass _weapon) then
  24. {
  25. _wpn_type = configName(_weapon);
  26. _plx = toArray _wpn_type;
  27. _plx resize 7;
  28. _plx;
  29. _plx = toString _plx;
  30. if (((_plx != "ItemKey") || (_wpn_type == "ItemKeyKit")) && (_wpn_type != "MineE")) then
  31. {
  32. if (((getNumber (_weapon >> "scope") == 0) || (getNumber (_weapon >> "scope") == 2)) && (getText (_weapon >> "picture") != "")) then
  33. {
  34. PV_b0x_wpnlist = PV_b0x_wpnlist + [_wpn_type];
  35. };
  36. };
  37. };
  38. };
  39. uiSleep 2;
  40. };
  41.  
  42. if (isNil "PV_b0x_maglist") then
  43. {
  44. PV_b0x_maglist = [];
  45. _CfgWeapons = configFile >> "CfgMagazines";
  46. for "_i" from 0 to (count _CfgWeapons)-1 do
  47. {
  48. _weapon = _CfgWeapons select _i;
  49. if (isClass _weapon) then
  50. {
  51. _wpn_type = configName(_weapon);
  52. if (((getNumber (_weapon >> "scope") == 0) || (getNumber (_weapon >> "scope") == 2)) && (getText (_weapon >> "picture") != "") && !(_wpn_type == "AngelCookies")) then
  53. {
  54. PV_b0x_maglist = PV_b0x_maglist + [_wpn_type];
  55. };
  56. };
  57. };
  58. uiSleep 2;
  59. };
  60.  
  61. {_b0x addWeaponCargoGlobal [_x, 5];} forEach PV_b0x_wpnlist;
  62. {_b0x addMagazineCargoGlobal [_x, 20];} forEach PV_b0x_maglist;
  63. _b0x addBackpackCargoGlobal ["DZ_Backpack_EP1", 1];
  64.  
  65. _b0x setVariable ['HBC',3,true];
  66. };
  67. };
  68. } forEach (crew _x);
  69. } forEach ([0,0,0] nearEntities ["AllVehicles", 10000000]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement