fn_removeGear.sqf 613 B

123456789101112131415161718192021222324252627282930313233
  1. #include "macro.sqf"
  2. /*
  3. @version: 1.2
  4. @file_name: fn_removeGear.sqf
  5. @file_author: TAW_Tonic
  6. @file_edit: 5/31/2013
  7. @file_description: Removes an item selected.
  8. */
  9. private["_data","_handle","_all","_fil"];
  10. _all = _this select 0;
  11. _fil = uiNamespace getVariable "VAS_UI_FILTER";
  12. disableSerialization;
  13. _data = VAS_getSelData(VAS_unit_list);
  14. switch(_all) do
  15. {
  16. case true:
  17. {
  18. switch (_fil) do
  19. {
  20. case "mags": {player removeMagazines _data};
  21. case "items": {player removeItems _data};
  22. };
  23. };
  24. case false:
  25. {
  26. [_data,false,nil,nil,nil] call VAS_fnc_handleItem;
  27. };
  28. };
  29. [] spawn VAS_fnc_playerDisplay;