Buck0 Posted April 20, 2015 Report Share Posted April 20, 2015 so, im looking for abit of help here from someone who is more knowledgeable then myself about this lol im looking to create a script where you cannot log out if you are not the plotpole owner or on the _friendlies list Link to comment Share on other sites More sharing options...
0 SchwEde Posted April 20, 2015 Report Share Posted April 20, 2015 Trader safezones have this feature, if i remember right. So check those for an good example :) Link to comment Share on other sites More sharing options...
0 Buck0 Posted April 21, 2015 Author Report Share Posted April 21, 2015 im pretty sure thats triggered off canbuild = false tho? so wouldnt that function be somewhere in the dayz code? Link to comment Share on other sites More sharing options...
0 Guest Posted April 21, 2015 Report Share Posted April 21, 2015 Maybe something like this? _isPole = (_classname == "Plastic_Pole_EP1_DZ"); _distance = DZE_PlotPole select 0; if(_isPole) then { _distance = DZE_PlotPole select 1; }; // check for near plot _findNearestPoles = nearestObjects [(vehicle player), ["Plastic_Pole_EP1_DZ"], _distance]; _findNearestPole = []; { if (alive _x) then { _findNearestPole set [(count _findNearestPole),_x]; }; } count _findNearestPoles; _IsNearPlot = count (_findNearestPole); canbuild = false; if(_IsNearPlot == 0) then { // Allow building of plot if(_requireplot == 0) then { canbuild = true; }; } else { // Since there are plots nearby we check for ownership and then for friend status // check nearby plots ownership and then for friend status _nearestPole = _findNearestPole select 0; // Find owner _ownerID = _nearestPole getVariable ["ownerPUID","0"]; diag_log format["Player_build start: [PlayerUID = %1] [OwnerID = %2]", _playerUID, _ownerID]; // check if friendly to owner if(_playerUID == _ownerID) then { //Keep ownership // owner can build anything within his plot except other plots if(!_isPole) then { canbuild = true; }; } else { _friendlies = _nearestPole getVariable ["plotfriends",[]]; _fuid = []; { _friendUID = _x select 0; _fuid = _fuid + [_friendUID]; } forEach _friendlies; _builder = getPlayerUID player; // check if friendly to owner if(_builder in _fuid) then { canbuild = true; }; }; }; That's just copied out of player Build. Link to comment Share on other sites More sharing options...
Question
Buck0
so, im looking for abit of help here from someone who is more knowledgeable then myself about this lol
im looking to create a script where you cannot log out if you are not the plotpole owner or on the _friendlies list
Link to comment
Share on other sites
3 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