Advertisement
Brenner650

ExileClient_gui_virtualGarageDialog_show.sqf

Feb 17th, 2019
260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. private["_flag", "_buildRights", "_territoryLevel", "_maxNumberOfVehicles", "_control"];
  2. disableSerialization;
  3. try
  4. {
  5. if ((getNumber(missionConfigFile >> 'CfgVirtualGarage' >> 'enableVirtualGarage')) isEqualTo 0) then
  6. {
  7. throw "This server has Virtual Garage disabled! Ask the server owner to enable it!";
  8. };
  9. if ((getNumber(missionConfigFile >> "CfgVirtualGarage" >> "canAccessGarageInCombat") isEqualTo 1) && {ExileClientPlayerIsInCombat}) then
  10. {
  11. throw "You cannot access Virtual Garage while in combat!";
  12. };
  13. _flag = player call ExileClient_util_world_getTerritoryAtPosition;
  14. if (isNull _flag) then
  15. {
  16. throw "You must be in your territory in order to access Virtual Garage";
  17. };
  18. _buildRights = _flag getVariable ["ExileTerritoryBuildRights", []];
  19. if !((getPlayerUID player) in _buildRights) then
  20. {
  21. throw "You do not have permission to access this territory's Virtual Garage";
  22. };
  23. _control = ['ExAd_VG', 0] call ExileClient_gui_xm8_slide;
  24. }
  25. catch
  26. {
  27. [_exception, 'Okay'] call ExileClient_gui_xm8_showWarning;
  28. };
  29. true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement