Advertisement
Guest User

Untitled

a guest
Sep 20th, 2014
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. /*
  2. Author: Bryan "Tonic" Boardwine
  3.  
  4. Description:
  5. For the mean time it blocks the player from opening another persons backpack
  6. */
  7. private["_container","_unit"];
  8. if(count _this == 1) exitWith {false};
  9. _unit = _this select 0;
  10. _container = _this select 1;
  11.  
  12. _isPack = getNumber(configFile >> "CfgVehicles" >> (typeOf _container) >> "isBackpack");
  13. if(_isPack == 1) then {
  14. hint localize "STR_MISC_Backpack";
  15. [] spawn {
  16. waitUntil {!isNull (findDisplay 602)};
  17. closeDialog 0;
  18. };
  19. };
  20.  
  21. if((typeOf _container) in ["Box_IND_Grenades_F","B_supplyCrate_F"]) exitWith {
  22. _house = nearestBuilding (getPosATL player);
  23. if(!(_house in life_vehicles) && {(_house getVariable ["locked",false])}) then {
  24. hint localize "STR_House_ContainerDeny";
  25. [] spawn {
  26. waitUntil {!isNull (findDisplay 602)};
  27. closeDialog 0;
  28. };
  29. };
  30. };
  31.  
  32. if(_container isKindOf "LandVehicle" OR _container isKindOf "Ship" OR _container isKindOf "Air") exitWith {
  33. if(!(_container in life_vehicles) && {(locked _container) == 2}) exitWith {
  34. hint localize "STR_MISC_VehInventory";
  35. [] spawn {
  36. waitUntil {!isNull (findDisplay 602)};
  37. closeDialog 0;
  38. };
  39. };
  40. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement