Jump to content
  • 0

Safes, tents and plotpoles.


ElDubya

Question

Hi all, 

 

Just wondering what I have to alter to make it a requirement to have a plotpole to place safes and tents down? I have 

DZE_requireplot = 1;

enabled on the server, but people can still dot the landscape with safes and plotpoles, and I want to remove that option.

 

Thanks

Link to comment
Share on other sites

14 answers to this question

Recommended Posts

  • 0
  • 0

wouldnt it be easier to define an array in player_build with items which require a pole instead of including new configs?

 

 

EDIT: Something like this:

 

player_build.sqf

 

search for

_requireplot = DZE_requireplot;
if(isNumber (configFile >> "CfgVehicles" >> _classname >> "requireplot")) then {
        _requireplot = getNumber(configFile >> "CfgVehicles" >> _classname >> "requireplot");
};

add after:

 

 
if (_classname in schwedes_requirePlot) then {
_requireplot = 1;
};

in your variables.sqf

search for

DZE_UnLockedStorage = ...

add below

schwedes_requirePlot = ["VaultStorage","VaultStorageLocked","TentStorage","TentStorageDomed","TentStorageDomed2"]; buildings which should require a plot

you can add/remove as many buildings as you want to,

test it tell us the results =)

Link to comment
Share on other sites

  • 0

ok here it is:

 

For PP4L Users:

 

after the variables

 

_classname

 

is defined place this:

_hasPole = false;
if (_classname == "Plastic_Pole_EP1_DZ") then {
_hasPole = [] call Schwedes_Plot_Check;
};

if (_hasPole) exitWith { DZE_ActionInProgress = false; cutText ["You cannot build another Pole!", "PLAIN DOWN"];};

go to your compiles.sqf

 

place this in the !isDedicated Section

Schwedes_Plot_Check =				compile preprocessFileLineNumbers "Path_to\maxplotcheck.sqf";

create a file called maxplotcheck

 

paste this in there and safe everything:

//Author: Schwede 
//Credits: ElDubya
private ["_hasPole","_Pole","_playerUID"];

_playerUID = getPlayerUID player;
//get all the Poles on Map
_Pole = [];
_Pole = [0,0,0] nearEntities [["Plastic_Pole_EP1_DZ"], 10000000];

{
	//get Owner ID for each Pole
	if ((_x getVariable["OwnerPUID","0"]) == _playerUID) exitWith { _hasPole = true;};
} count _Pole;

_hasPole 

Safe and Done

 

This will allow players only to have one Pole on the Map, but it also could be added an option to have a max number of plots.

Will add this in if you guys want it, till then...wll here you go, a plot pole limitation ;D

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...