Advertisement
skotracker

ExileClient_construction_beginExistingObject

Apr 19th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 1.89 KB | None | 0 0
  1. /**
  2.  * ExileClient_construction_beginExistingObject
  3.  *
  4.  * Edited for Exile by _sinworks
  5.  *
  6.  * Exile Mod
  7.  * www.exilemod.com
  8.  * © 2015 Exile Mod Team
  9.  *
  10.  * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
  11.  * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
  12.  */
  13.  
  14. private["_previewObjectClassName"];
  15. if (ExileClientPlayerIsInCombat) then
  16. {
  17.     ["ErrorTitleAndText", ["Construction aborted!", "You cannot build during a combat."]] call ExileClient_gui_toaster_addTemplateToast;
  18. }
  19. else
  20. {
  21.     ExileClientConstructionObject = _this;
  22.     ExileClientConstructionCanPlaceObject = false;
  23.     ExileClientConstructionConfig = ("getText(_x >> 'staticObject') == ExileClientConstructionObject" configClasses(configFile >> "CfgConstruction")) select 0;
  24.     _previewObjectClassName = getText(ExileClientConstructionConfig >> "previewObject");
  25.     ExileClientConstructionSnapToObjectClassNames = (ExileClientConstructionConfig >> "SnapObjects") call Bis_fnc_getCfgSubClasses;
  26.     ExileClientConstructionProcess = 2;
  27.     ExileClientConstructionRotation = 0;
  28.     ExileClientConstructionPitch = 0;
  29.     ExileClientConstructionBank = 0;
  30.     ExileClientConstructionObjectDisplayName = getText(configFile >> "CfgVehicles" >> _previewObjectClassName >> "displayName");
  31.     ExileClientConstructionOffset = [0, 5,0];
  32.     ExileClientConstructionMode = 1;
  33.     ExileClientConstructionVectorMode = false;
  34.     ExileClientConstructionIsInSelectSnapObjectMode = true;
  35.     ExileClientConstructionSupportSnapMode = count(ExileClientConstructionSnapToObjectClassNames) > 0;
  36.     ExileClientConstructionCurrentSnapToObject = objNull;
  37.     {
  38.         player reveal _x;
  39.     }
  40.     forEach (player nearObjects  ["Exile_Construction_Abstract_Static", 20]);
  41.     ["buildConstructionRequest", [_previewObjectClassName,ExileClientConstructionPosition]] call ExileClient_system_network_send;
  42. };
  43. true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement