Jump to content

[Request] DZE_BuildingLimit depends on humanity / UID


McToots

Recommended Posts

Here's something i made, idk if it works, cba to test, but please give it a go:

waitUntil {getPlayerUID player != ""};
_hero             = 5000;
_bandit           = -2500;
_UIDBuildingList  = ["0","0"]; //Make sure the UIDs are in an array format
_heroBuildLimit   = 250;
_banditBuildLimit = 100;
_normalBuildLimit = 175;
_UIDBuildingLimit = 1000;


if (getPlayerUID player in _UIDBuildingList) exitWith {
    DZE_BuildingLimit = _UIDBuildingLimit;
};
if ((player getVariable "humanity") > _hero) then {
    DZE_BuildingLimit = _heroBuildLimit;
};
if ((player getVariable "humanity") < _hero) then {
    DZE_BuildingLimit = _normalBuildLimit;
};
if ((player getVariable "humanity") < _bandit) then {
    DZE_BuildingLimit = _banditBuildLimit;
};

 

Link to comment
Share on other sites

Try this

In init.sqf add this

DZE_BuildingLimit_Hero = 300;

and

DZE_BuildingLimit_Bandit = 300;

after

DZE_BuildingLimit = 150;

 

In player_build.sqf change this

 

private ["_location","_dir","_classname","_item","_hasrequireditem","_missing","_hastoolweapon","_cancel","_reason","_started","_finished","_animState","_isMedic","_dis","_sfx","_hasbuilditem","_tmpbuilt","_onLadder","_isWater","_require","_text","_offset","_IsNearPlot","_isOk","_location1","_location2","_counter","_limit","_proceed","_num_removed","_position","_object","_canBuildOnPlot","_friendlies","_nearestPole","_ownerID","_findNearestPoles","_findNearestPole","_distance","_classnametmp","_ghost","_isPole","_needText","_lockable","_zheightchanged","_rotate","_combination_1","_combination_2","_combination_3","_combination_4","_combination","_combination_1_Display","_combinationDisplay","_zheightdirection","_abort","_isNear","_need","_needNear","_vehicle","_inVehicle","_requireplot","_objHDiff","_isLandFireDZ","_isTankTrap"];

 

to

 

private ["_humanity","_location","_dir","_classname","_item","_hasrequireditem","_missing","_hastoolweapon","_cancel","_reason","_started","_finished","_animState","_isMedic","_dis","_sfx","_hasbuilditem","_tmpbuilt","_onLadder","_isWater","_require","_text","_offset","_IsNearPlot","_isOk","_location1","_location2","_counter","_limit","_proceed","_num_removed","_position","_object","_canBuildOnPlot","_friendlies","_nearestPole","_ownerID","_findNearestPoles","_findNearestPole","_distance","_classnametmp","_ghost","_isPole","_needText","_lockable","_zheightchanged","_rotate","_combination_1","_combination_2","_combination_3","_combination_4","_combination","_combination_1_Display","_combinationDisplay","_zheightdirection","_abort","_isNear","_need","_needNear","_vehicle","_inVehicle","_requireplot","_objHDiff","_isLandFireDZ","_isTankTrap"];

 

behind this line add

_humanity = (player getVariable["humanity",0]);

 

search for

if((count ((getPosATL player) nearObjects ["All",30])) >= DZE_BuildingLimit) exitWith {DZE_ActionInProgress = false; cutText [(localize "str_epoch_player_41"), "PLAIN DOWN"];};

 

and change this to

 

if((count ((getPosATL player) nearObjects ["All",30])) >= DZE_BuildingLimit) exitWith {DZE_ActionInProgress = false; cutText [(localize "str_epoch_player_41"), "PLAIN DOWN"];};

if (_humanity <= -4999) then {
    if((count ((getPosATL player) nearObjects ["All",30])) >= DZE_BuildingLimit_Bandit) exitWith {DZE_ActionInProgress = false; cutText [(localize "str_epoch_player_41"), "PLAIN DOWN"];};
};

if (_humanity >= 4999) then {
    if((count ((getPosATL player) nearObjects ["All",30])) >= DZE_BuildingLimit_Hero) exitWith {DZE_ActionInProgress = false; cutText [(localize "str_epoch_player_41"), "PLAIN DOWN"];};
};

 

It´s not tested!

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...