_plotReq = false; //Plotpole requirement to build enabled
fnc_Pos_fired1 = { disableSerialization; _indexPic = lbCurSel 2667; // index of selection _returnTextPic = lbText [2667, _indexPic]; // name of selection hint format["BAR : [%1] \n [%2]",_indexPic,_returnTextPic];// display the value classnameChange = _returnTextPic; itemgems = "ItemObsidian"; // change made here to say what gem is use to pay };
fnc_Pos_fired2 = { disableSerialization; _indexChair = lbCurSel 2668; // index of selection _returnTextChair = lbText [2668, _indexChair]; // name of selection hint format["BAR : [%1] \n [%2]",_indexChair,_returnTextChair];// display the value classnameChange = _returnTextChair; itemgems = "ItemSapphire"; // change made here to say what gem is use to pay };
fnc_Pos_fired3 = { disableSerialization; _indexBed = lbCurSel 2669; // index of selection _returnTextBed = lbText [2669, _indexBed]; // name of selection hint format["BAR : [%1] \n [%2]",_indexBed,_returnTextBed];// display the value classnameChange = _returnTextBed; itemgems = "ItemCitrine"; // change made here to say what gem is use to pay };
fnc_Pos_fired4 = { disableSerialization; _indexBath = lbCurSel 2670; // index of selection _returnTextBath = lbText [2670, _indexBath]; // name of selection hint format["BAR : [%1] \n [%2]",_indexBath,_returnTextBath];// display the value classnameChange = _returnTextBath; itemgems = "ItemTopaz"; // change made here to say what gem is use to pay };
fnc_Pos_fired5 = { disableSerialization; _indexShelf = lbCurSel 2671; // index of selection _returnTextShelf = lbText [2671, _indexShelf]; // name of selection hint format["BAR : [%1] \n [%2]",_indexShelf,_returnTextShelf];// display the value classnameChange = _returnTextShelf; itemgems = "ItemAmethyst"; // change made here to say what gem is use to pay };
fnc_Pos_fired6 = { disableSerialization; _indexMisc = lbCurSel 2672; // index of selection _returnTextMisc = lbText [2672, _indexMisc]; // name of selection hint format["BAR : [%1] \n [%2]",_indexMisc,_returnTextMisc];// display the value classnameChange = _returnTextMisc; itemgems = "ItemObsidian"; // change made here to say what gem is use to pay };
fnc_Pos_fired7 = { disableSerialization; _indexTable = lbCurSel 2673; // index of selection _returnTextTable = lbText [2673, _indexTable]; // name of selection hint format["BAR : [%1] \n [%2]",_indexTable,_returnTextTable];// display the value classnameChange = _returnTextTable; itemgems = "ItemRuby"; // change made here to say what gem is use to pay };
fnc_Pos_fired8 = { disableSerialization; _indexExt = lbCurSel 2674; // index of selection _returnTextExt = lbText [2674, _indexExt]; // name of selection hint format["BAR : [%1] \n [%2]",_indexExt,_returnTextExt];// display the value classnameChange = _returnTextExt; itemgems = "ItemEmerald"; // change made here to say what gem is use to pay };
_itemgemsspawn = itemgems; // _itemgemsspawn define in private on top _classname = classnameChange;
_offset = getArray (configFile >> "CfgVehicles" >> _classname >> "offset"); if((count _offset) <= 0) then { _offset = [0,3.5,0]; //This is distance of object from player XYZ.. increase Y if you want an object to spawn further away from player };
if(_location1 distance _location2 > 5) exitWith { _isOk = false; _cancel = true; _reason = "You've moved to far away from where you started building (within 5 meters)"; detach _object; deleteVehicle _object; };
if(abs(_objHDiff) > 5) exitWith { _isOk = false; _cancel = true; _reason = "Cannot move up or down more than 5 meters"; detach _object; deleteVehicle _object; };
//No building on roads unless toggled if (!DZE_BuildOnRoads) then { if (isOnRoad _position) then { _cancel = true; _reason = "Cannot build on a road."; }; };
// No building in trader zones if(!canbuild) then { _cancel = true; _reason = "Cannot build in a city."; };
if (!_proceed) then {_cancel = true; _reason = "Someone's plotpole nearby";}; if (_plotReq) then {_cancel = true; _reason = "Plotpole required to build here";};
// I know the code is prehaps not very good but that work // Test to see if the gem to pay is in inventory else we try to pay with the superior _removed=0; while {_removed == 0} do { _removed = ([player,_itemgemsspawn,1] call BIS_fnc_invRemove); if((_itempierre == "ItemRuby") and (_removed == 0)) then { _itempierre = "ItemEmerald"; }; if((_itempierre == "ItemSapphire") and (_removed == 0)) then { _itempierre = "ItemRuby"; }; if((_itempierre == "ItemAmethyst") and (_removed == 0)) then { _itempierre = "ItemSapphire"; }; if((_itempierre == "ItemCitrine") and (_removed == 0)) then { _itempierre = "ItemAmethyst"; }; if((_itempierre == "ItemTopaz") and (_removed == 0)) then { _itempierre = "ItemCitrine"; }; if((_itempierre == "ItemObsidian") and (_removed == 0)) then { _itempierre = "ItemTopaz"; }; };
// just change text for on screen if(_itemgemsspawn == "ItemObsidian") then { _itemgemsspawn = "Obsidian"; }; if(_itemgemsspawn == "ItemTopaz") then { _itemgemsspawn = "Topaz"; }; if(_itemgemsspawn == "ItemCitrine") then { _itemgemsspawn = "Citrine"; }; if(_itemgemsspawn == "ItemAmethyst") then { _itemgemsspawn = "Amethyst"; }; if(_itemgemsspawn == "ItemSapphire") then { _itemgemsspawn = "Sapphire"; }; if(_itemgemsspawn == "ItemRuby") then { _itemgemsspawn = "Ruby"; }; if(_itemgemsspawn == "ItemEmerald") then { _itemgemsspawn = "Emerald"; };
cutText [format["%1 saved to database ! %2 delete from inventory !",_classname,_itemgemsspawn], "PLAIN DOWN",3]; player reveal _tmpbuilt; DZE_ActionInProgress = false;
Question
Overlord
Anyone know how to set the check for plotfriends on the plotpole check?
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now