Jump to content
RimBlock

[Release] - A Plot for life v2.5. Keep your buildables on death. Take plot ownership

Recommended Posts

Plot Pole Authorised Builder management - Proposed sucessor project.

 

Overview.

Tie owner and people who the owner authorises to build in a plot poles area to the plot pole.  Authorised builders will be managed via the plotpole and not via the tagfriendly system.  Depending on performance issues searching through all the authorised builder PlayerUIDs, the number of authorised builder could equal the number of players on the server and beyond.

 

Phases.

  1. Basic mechanics via mouse scroll wheel (much like the vehicle repair option leading to sub options).
  2. Possible window popup for builder management.

Phase 1 Suggestions.

  • Add an authorised builder (like tagging).
  • Remove an authorised builder (via plot pole).
  • Record builders PlayerUID & Name when added (Players can change names easily but not PlayerUIDs without a new game serial). 
  • Anything else ?.

Phase 2 Suggestions.

  • Move to a gui menu
  • Update builders names based on their PlayerUID when they login so if they change their name between logins it will be caught on the builders menu.

 

Feedback, suggestions or additional ideas most welcome. 

 

After the tagfriendly is sorted out on this release I will kick off the Plot Pole Builder Manager Mod project and possibly move it to its own thread.

 

RB

Share this post


Link to post
Share on other sites

Ok, strange.

 

My tagging seems to be doing what I want with my original code (correct number is going in the correct place in the hive) on the new built server.

 

The contents of my player_tagfriendly.sqf is

private["_target", "_caller", "_callerID", "_targetID", "_friendlies", "_rfriendlies"];
_target = _this select 0;
_caller = _this select 1;

call fnc_usec_medic_removeActions;
r_action = false;

_callerID = [_caller] call convertPlayerUID; 
_targetID = [_target] call convertPlayerUID; 

_friendlies = _caller getVariable ["friendlies", []];
_friendlies set [count _friendlies, _targetID];
_caller setVariable ["friendlies", _friendlies, true];

_rfriendlies = _target getVariable ["friendlies", []];

if !(_callerID in _rfriendlies) then {
    titleText [(localize "STR_EPOCH_ACTIONS_8"), "PLAIN DOWN"]; //To Caller
    /* PVS/PVC - Skaronator */
    PVDZE_send = [_target,"tagFriendly",[_target]]; //To Target
    publicVariableServer "PVDZE_send";
};

If your version is saving a single character in the currentstate column in the DB after installing the update then check the file above with what you have.

 

I have tested twice to double confirm mine is working.

 

The recognition of friendlies is not working as expected so friendlies cannot build.  Debugging that now.

 

RB

 

Share this post


Link to post
Share on other sites

Ok, I think I have found the issue.

 

In custom\ConvertpUID\convertpuid.sqf

 

Find

_number_string = getPlayerUID _player; 

Change to

_number_string = getPlayerUID _playertemp ;  

The bug was resulting in the players UID always being sent back.  Good some of the time but if you wanted the UID of your target (e.g. for tagging) it would send the wrong UID back.

 

Not able to test as the person I am testing with is now asleep but that is likely to be the source of the issue.

 

Will verify when home tomorrow.

 

RB

Share this post


Link to post
Share on other sites

Quick question. 

 

Anyone want the ability to turn on the plot outline (the circle of red and white sticks you get on building a plot pole) back on from the plot pole anytime you want ?.

 

"Should" be pretty easy to add in and it is a real pain not knowing where the boundaries are when building :) .

 

Any interest.  If so I will give it a go tonight.

 

RB

Share this post


Link to post
Share on other sites

Find

_action = _unit addAction ["Tag as friendly", "\z\addons\dayz_code\actions\player_tagFriendly.sqf", [], 0, false, true, "", ""];
Change to 
_action = _unit addAction ["Tag as friendly", "custom\\ConvertpUIDplayer_tagFriendly.sqf", [], 0, false, true, "", ""]; 
 

 

 On the change to the directory has a double slash ;)

 

SGCDayZ Server Management

Jonas

Share this post


Link to post
Share on other sites

Show Plot Boundary is now working from the Plot Pole menu.

 

I will put the install instructions together and post them up.  This one is very simple to do.

 

The boundary does not stay shown past reboot (same as the initial boundary doesn't when you first build a plot pole) but you can just turn it on again after.

 

RB

Share this post


Link to post
Share on other sites

Version changed to v1.1

 

Added "Show plot boundary" to the plot pole which will turn on the plot pole boundary markers again.  They will vanish on server reboot but can be turned on again from the plot pole if needed.

 

Install details at the bottom of the first post.

Share this post


Link to post
Share on other sites

Ok when i do the prechecks i get temp.character table doesn't exist?

 

Fixed.

 

I tested with temp_character_data as a table.  Have changed it back to character_data in the first post.  Checked the post install SQL (historical realignment of buildables) and they seem fine.

 

Have found two new issues.  Neither particularly big.

 

1. The Show Plot Boundary menu item does not disappear but stays on the scroll menu wherever you look.

  • Should be fairly easy to resolve.  Will look tomorrow as it is now midnight here.  (Non issue.  works fine on re-testing).

2. Friendly builders cannot build on another friendly owners plot until they look at the owner first (yep you hear that right :wacko: ).

  • This is part of the original (DayZ / Epoch) code and not anything I have added.

 Looking at the plot owner sets the "friendlyTo" variable if both are tagged as friendly to each other but the variable is not persistent.  I am having trouble understanding the logic for it rather than just checking the friendly variables of both the builder and owner but this is the way it is currently.

 

At this point I can

  • Leave it
  • Change it to check the friendlies value which is saved in the hive and is persistent.

If anyone has any background on why the friendlyTo variable is being used, I would love to hear.

 

Let me know your preferences for how to handle and I will go with the majority.   To change it is minor work but is in multiple files (already edited for this mod).

 

RB

Share this post


Link to post
Share on other sites

There is version info at the top of the first post.

 

v1.0 -> v1.1 only has the addition of the plot pole boundary which can be done independently if desired so has its own install section at the bottom of the first post.

 

Bug fixes are in individual posts when found and fixed with info on what needs to be changed based on the main install so people with it installed already just need to make those small changes.  The first post is also updated to reflect the bug fix for new installers.

 

The issue posted above with the plot pole boundary menu item not disappearing is a non-issue.  It is working just fine.  Just takes a few seconds if the menu is up and you turn away before it vanishes from the options.

 

RB

Share this post


Link to post
Share on other sites

To make it simple for new server builders, I will be packaging a release of this mod for download.

 

This package will only be for installing on new Epoch server builds as it will overwrite key files that other mods may be dependant on.

 

Will post with a link when the package is ready for download.

 

RB

Share this post


Link to post
Share on other sites

Ok, will take a look.

 

I don't believe tagging affects opening packs as non-friendlies stealing from people while they are trading seems to be an issue on servers.  It may be something to think about though.

 

Do you have any other mods installed ?.

 

Glad the tagging for building is verified.

 

Thanks

Share this post


Link to post
Share on other sites

I am using an Anti Backpack access from a post from Cen i believe in a old thread somewhere. It worked fine before where you could tag someone and be able to access their bag. It won't allow me after adding this? Odd

 

Thanks

Share this post


Link to post
Share on other sites

That is probably the reason.

 

The old tagging used the charID.  The new tagging used the PlayerUID converted in to a number (some playerUIDs can have letters as well).

 

The conversion needs to be done on anything that used the tagging to check.

 

If you are able to direct me to the post or post the code up here I can probably advise on the changes that need to be made.  They are probably pretty simple.

 

RB

Share this post


Link to post
Share on other sites

I think i found it and looks easy enough.

 

fn_gearmenuchecks i have this

// IN SAFE ZONE
if( !canbuild ) then
{
	if( isPlayer cursorTarget and alive cursorTarget and vehicle cursorTarget == cursorTarget ) then
	{
		_friendlies = player getVariable ["friendlyTo",[]];
		_ownerID = cursorTarget getVariable ["CharacterID", "0"];

		_friend = _ownerID in _friendlies;

		// check if friendly to owner
		if( !_friend ) then {
			cutText["\n\nBag access is restricted in safe trader zones except with those tagged as friendly.", "PLAIN DOWN",0];
			_display closeDisplay 1;
		};
	};
};

I changed CharacterID to playerUID and added it to the private array at the top, this should fix it correct?

Share this post


Link to post
Share on other sites

Just tested on my server, works fine! :)

Thank you for the release!

 

 

Thanks, it is always good to hear it is working as expected.

 

I think i found it and looks easy enough.

 

fn_gearmenuchecks i have this

// IN SAFE ZONE
if( !canbuild ) then
{
	if( isPlayer cursorTarget and alive cursorTarget and vehicle cursorTarget == cursorTarget ) then
	{
		_friendlies = player getVariable ["friendlyTo",[]];
		_ownerID = cursorTarget getVariable ["CharacterID", "0"];

		_friend = _ownerID in _friendlies;

		// check if friendly to owner
		if( !_friend ) then {
			cutText["\n\nBag access is restricted in safe trader zones except with those tagged as friendly.", "PLAIN DOWN",0];
			_display closeDisplay 1;
		};
	};
};

I changed CharacterID to playerUID and added it to the private array at the top, this should fix it correct?

 

Almost.

 

As some PlayerUIDs can have characters and the ids are being stored in a numberic field (object_data -> characterID) for the buildables, we need to convert, where needed, to numeric.

 

To run the conversion we use (<> denotes a value you need to put in, without the "<>".

<result variable> = [<object>] call convertPlayerUID;

<Result variable> = The variable you need the converted PlayerUID placed in.

<object> = The input object that have the PlayerUID you need to convert.

 

For your case I would try.

 

FInd

_ownerID = cursorTarget getVariable ["CharacterID", "0"]; 

Change to

_ownerID = [cursorTarget] call convertPlayerUID;

RB

Share this post


Link to post
Share on other sites

Thanks.

 

I have tried to make it as [copy] -> [find] -> [copy] -> [paste] as possible.

 

I will get round to releaseing a package which people can then just extract to a vanilla Epoch server and be good to go.  Probably will get this done over the weekend.

 

Good to hear it has stood up well with such numbers.  This solution will work for now and I have tried to build in some longevity by allowing it to convert any characters in the PlayerUID rather than just known combinations that exist today as other mods have but I will get out a much more robust solution soon(ish) after I finish my Better Refueling project.  The better solution will not use any conversion so the PlayerUIDs will always be unique and buildables will be linked to the plot poles rather than the players.  Plot pole owners and authorised builders will be saved with the plot pole data. 

 

@Line2.lv : Any luck with that script ?.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Similar Content

    • By piggd
      WARNING ** THIS REPLACES THE HUMANITY SYSTEM
       
      Mod Features:
      Allows the player to have access to their money all the time.
      Bank is tied to the player via the humanity system and survives character death.
      Auto Deposit bars/brief cases on every sale or purchase
      Player can access balance, deposit and withdraw via player tool menu.
      If a player goes to a negative balance displaying the balance, withdraw or deposit will restore them to zero balance.
      Known Issues:
      First time character creation start the player with 2500 humanity which equates to 25gb.
      Any event that modifies humanity will effect the bank balance (usally in a minor way silve bars in most cases)
       
       

      Thank you too iSaeko for making this video for me.
       
       
      1.   Download the addon from my github by clicking on this link.   (Contains a vanilla epoch chernarus mission.pbo example file).
      2.  On the lower left corner click on the button "Download Zip"
      3   Create a directory called dayz_code and mission_pbo
      4.  Take your mission.pbo file and extract it into the mission_pbo directory
      5.  Unzip the zip file you download from my github and move the custom directory into your mission_pbo directory.
      6.  Copy C:\Program Files (x86)\Steam\SteamApps\common\ARMA 2 Operation Arrowhead\@DayZ_Epoch\addons\dayz_code.pbo into this new direttory (path may vary based on steam installation).
      7.  Extract the dayz_code.pbo into the dayz_code directory you created.
      8.  if you do not already have a fixes directory create one.
      9.  If you do not already have a custom compile then follow these steps other wise you can skip this step.
          copy dayz_code/init/compiles.sqf  mission_pbo/fixes/compules.sqf
      10.  Copy dayz_code/compile/epoch_returnChange.sqf mission_pbo/fixes/epoch_returnChange.sqf
      11.  Edit your init.sqf file and make the following modifications:
       
      from:
      //Load in compiled functions to:
      // ------------------------------------------------------------------------DZE Piggd Banking System Start ------------------------------------------------------------------------ PDZE_PiggdBankSystem = true; // ------------------------------------------------------------------------DZE Piggd Banking System End ------------------------------------------------------------------------ //Load in compiled functions from:
      call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf";                //Compile regular functions to:
      // ------------------------------------------------------------------------DZE Piggd Banking System Start ------------------------------------------------------------------------ //call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf";                //Compile regular functions call compile preprocessFileLineNumbers "fixes\compiles.sqf";                //Compile regular functions // ------------------------------------------------------------------------DZE Piggd Banking System End ------------------------------------------------------------------------ From:
          //Lights     //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf";    }; ** NOTE - If you are using
      this entry will already exist with a different comment.
      to:
          //Lights     //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; // ------------------------------------------------------------------------DZE Piggd Banking System Start ------------------------------------------------------------------------ // Activate Player Menu for Tools     [] execVM "custom\playertools\activate_player_menu.sqf"; // ------------------------------------------------------------------------DZE Piggd Banking System Start ------------------------------------------------------------------------      }; 12.  Edit your fixes\compiles.sqf file and make the following modifications:
       
      From:
      epoch_totalCurrency = {         // total currency         _total_currency = 0;         {             _part =  (configFile >> "CfgMagazines" >> _x);             _worth =  (_part >> "worth");             if isNumber (_worth) then {                 _total_currency = _total_currency + getNumber(_worth);             };         } count (magazines player);         _total_currency     };     epoch_itemCost = {         _trade_total = 0;         {             _part_in_configClass =  configFile >> "CfgMagazines" >> (_x select 0);             if (isClass (_part_in_configClass)) then {                 _part_inWorth = (_part_in_configClass >> "worth");                 if isNumber (_part_inWorth) then {                     _trade_total = _trade_total + (getNumber(_part_inWorth) * (_x select 1));                 };             };         } count _this;         //diag_log format["DEBUG TRADER ITEMCOST: %1", _this];         _trade_total     };     epoch_returnChange =            compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\epoch_returnChange.sqf";     // usage [["partinclassname",4]] call epoch_returnChange; to:
      epoch_totalCurrency = {         // total currency         _total_currency = 0;         {             _part =  (configFile >> "CfgMagazines" >> _x);             _worth =  (_part >> "worth");             if isNumber (_worth) then {                 _total_currency = _total_currency + getNumber(_worth);             };         } count (magazines player); // ------------------------------------------------------------------------DZE Piggd Banking System Start ------------------------------------------------------------------------         if(PDZE_PiggdBankSystem) then {             _humanity = player getVariable["humanity",0];             _total_currency = _total_currency + _humanity;         }; // ------------------------------------------------------------------------DZE Piggd Banking System End ------------------------------------------------------------------------         _total_currency     };     epoch_itemCost = {         _trade_total = 0;         {             _part_in_configClass =  configFile >> "CfgMagazines" >> (_x select 0);             if (isClass (_part_in_configClass)) then {                 _part_inWorth = (_part_in_configClass >> "worth");                 if isNumber (_part_inWorth) then {                     _trade_total = _trade_total + (getNumber(_part_inWorth) * (_x select 1));                 };             };         } count _this;         //diag_log format["DEBUG TRADER ITEMCOST: %1", _this];         _trade_total     }; // ------------------------------------------------------------------------DZE Piggd Banking System Start ------------------------------------------------------------------------ //    epoch_returnChange =            compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\epoch_returnChange.sqf";     epoch_returnChange =            compile preprocessFileLineNumbers "fixes\epoch_returnChange.sqf"; // ------------------------------------------------------------------------DZE Piggd Banking System End ------------------------------------------------------------------------     // usage [["partinclassname",4]] call epoch_returnChange; 13. Edit fixes/epoch_returnChange.sqf
       
      From:
          //diag_log format["DEBUG TRADER CHANGE: %1", _return_change];     if (_return_change >= 0) then {                  // total currency to:
      // ------------------------------------------------------------------------DZE Piggd Banking System Start ------------------------------------------------------------------------     if (_return_change >= 0 and !PDZE_PiggdBankSystem) then { // ------------------------------------------------------------------------DZE Piggd Banking System End ------------------------------------------------------------------------ From:
          if (_silver_1oz > 0) then {             if (_silver_1oz == 1) then {                 player addMagazine "ItemSilverBar";                 //diag_log format["DEBUG TRADER CHANG MADE: %1 x %2", _silver_1oz, "ItemSilverBar"];             } else {                 player addMagazine format["ItemSilverBar%1oz",_silver_1oz];                 //diag_log format["DEBUG TRADER CHANG MADE: %1 x %2", _silver_1oz, "ItemSilverBar"];             };         };         _successful = true; }; }; _successful to:
            if (_silver_1oz > 0) then {             if (_silver_1oz == 1) then {                 player addMagazine "ItemSilverBar";                 //diag_log format["DEBUG TRADER CHANG MADE: %1 x %2", _silver_1oz, "ItemSilverBar"];             } else {                 player addMagazine format["ItemSilverBar%1oz",_silver_1oz];                 //diag_log format["DEBUG TRADER CHANG MADE: %1 x %2", _silver_1oz, "ItemSilverBar"];             };         };         _successful = true; // ------------------------------------------------------------------------DZE Piggd Banking System Start ------------------------------------------------------------------------     } else {         if (PDZE_PiggdBankSystem) then {             _total_currency_dry = player getVariable["humanity",0];             _total_currency_dry = _total_currency_dry + _return_change;             player setVariable["humanity",_total_currency_dry,true];             _successful = true;         }; // ------------------------------------------------------------------------DZE Piggd Banking System End ------------------------------------------------------------------------ }; }; _successful 14. Edit server_traders.sqf
       
      From:
      menu_RU_Functionary1 = [     [["Ammunition",478],["Clothes",476],["Helicopter Armed",493],["Military Armed",562],["Trucks Armed",479],["Weapons",477]],     [],     "hero" ]; to:
      menu_RU_Functionary1 = [     [["Ammunition",478],["Clothes",476],["Helicopter Armed",493],["Military Armed",562],["Trucks Armed",479],["Weapons",477]],     [], // ------------------------------------------------------------------------DZE Piggd Banking System Start ------------------------------------------------------------------------ //    "hero"     "neutral" // ------------------------------------------------------------------------DZE Piggd Banking System End ------------------------------------------------------------------------ ]; from:
      menu_GUE_Soldier_MG = [     [["Ammunition",577],["Clothing",575],["Helicopter Armed",512],["Military Armed",569],["Trucks Armed",534],["Weapons",627]],     [],     "hostile" ]; to:
      menu_GUE_Soldier_MG = [     [["Ammunition",577],["Clothing",575],["Helicopter Armed",512],["Military Armed",569],["Trucks Armed",534],["Weapons",627]],     [], // ------------------------------------------------------------------------DZE Piggd Banking System Start ------------------------------------------------------------------------ //    "hostile"     "neutral" // ------------------------------------------------------------------------DZE Piggd Banking System End ------------------------------------------------------------------------ ]; 15.  Repack your mission pbo and upload to your sever.
       
      Optional Additional Configuration:
       
      **  Chameleon Skin Changer
      If you are using
      and have replaced custom/playertools/player_tools_main.sqf you will need to uncomment the following lines.
       
      from:
      playermenustart = [     ["",true], //    ["Chameleon Male Skins Menu",[],"", -5,[["expression",format[_EXECscript1,_pathtochameleon + "male_dialog.sqf"]]],"1","1"], //    ["Chameleon Female Skins Menu",[],"", -5,[["expression",format[_EXECscript1,_pathtochameleon + "female_dialog.sqf"]]],"1","1"],     ["DZE Piggd Banking System >>", [], "#USER:bankmenu", -5, [["expression", ""]], "1", "1"],            //    ["Weather/Time Menu (Local Only) >>", [], "#USER:WTMenu", -5, [["expression", ""]], "1", "1"],                ["", [], "", -5, [["expression", ""]], "1", "0"],     ["Main Menu", [20], "#USER:playermenustart", -5, [["expression", ""]], "1", "1"]        ]; to:
      playermenustart = [     ["",true],     ["Chameleon Male Skins Menu",[],"", -5,[["expression",format[_EXECscript1,_pathtochameleon + "male_dialog.sqf"]]],"1","1"],     ["Chameleon Female Skins Menu",[],"", -5,[["expression",format[_EXECscript1,_pathtochameleon + "female_dialog.sqf"]]],"1","1"],     ["DZE Piggd Banking System >>", [], "#USER:bankmenu", -5, [["expression", ""]], "1", "1"],            //    ["Weather/Time Menu (Local Only) >>", [], "#USER:WTMenu", -5, [["expression", ""]], "1", "1"],                ["", [], "", -5, [["expression", ""]], "1", "0"],     ["Main Menu", [20], "#USER:playermenustart", -5, [["expression", ""]], "1", "1"]        ]; 15.  Repack your mission pbo and upload to your sever.
       
       
      Email: [email protected]
      Website: Piggd Dayz Gaming
      Donate to piggd
    • By vbawol
      Open world survival mod set just two years after the mass extinction of billions of people. Those that remain are left with remnants of a once technological society. Try to survive, build, or explore your way through the harsh dynamic environment.
      Features
      Powerful persistence framework for Arma 3 with native Windows and Linux dedicated server support. Fully configurable script based security checks. Base Building re-envisioned for Arma 3 PhysX. Persistent secure and insecure storage devices. Upgradeable locking doors. Barter based economy and trading systems backed a single currency ¤ called "Krypto". Hostile Environment with several different types of antagonists, Air and Water temperature extremes, and Earthquakes. Hunting, Fishing, Tame Dogs, Explore & Loot: Wrecked ships, Abandoned vehicles and buildings, Perform task based missions and more! Open source APL-SA Epoch Survival MP gamemode. Open source APL-SA Modders resource configs and Class List. Assets can be used as a mod dependency on Steam workshop.
    • By McLovin
      NOTICE: Duplicate of another question posted in the wrong section.
       
      So I've been playing this server that has a number of mods installed. I've been playing it for quite a while with the only errors I've been getting are regarding a 45 round RPK mag being missing, but other than that I've had no errors or any issues loading. Upon trying to place a plot pole, nothing happens; absolutely nothing, like no preview shows up, no prompt saying "starting construction" or anything like that, just blankness. When I try to do it again it says "building already in progress" and I can't do anything, not even lock my vehicle. Is there anything that can be done, or that can explain this phenomenon? To further the understanding of how this came to be, I bought a plot pole from the trader in Trader City Stary and tried placing it near Stary, but not too near it (near a thicket of bushes in the distance). Upon right clicking and hitting the build option, that's when I face my issue.
    • By victorks
      my first work in editin :) https://uploaddeimagens.com.br/imagens/20180307202515_1-jpg https://uploaddeimagens.com.br/imagens/20180307202245_1-jpg DOWNLOAD: https://www.dropbox.com/s/oq97j7x59362kqe/CASTLEai.sqf?dl=0 AI M2 NEED WAI: https://pastebin.com/GJMnPvZP ON THE MAP: https://pastebin.com/cyqH9rNV  
       
      https://www.dropbox.com/s/oq97j7x59362kqe/CASTLEai.sqf?dl=0
       
       
       
       
       
       
       
       
       
    • By totis
      Hi
      This is a restriction to vehicle seat according to humanity.
      It may be handy to PVE servers out there.
      Special thanks to Juandayz with his fantastic skills and salival. Both sometimes working unseen for the benefit of this community.
      Step 1.
      Make a new file, Name it veh_hum.sqf with the below contents and put into dayz_epoch/addons folder. If you dont have addons just create one.
      In this example we have a hero superhero and agenthero traders with 20k/40k/60k humanity respectively. Adjust according to your needs.
       
      private ["_vehicle","_inVehicle","_driver","_humanity","_txt"]; while {true} do { _vehicle = vehicle player; _inVehicle = (_vehicle != player); if (_inVehicle) then { _driver = driver (vehicle player); if (({(isPlayer _driver) && (alive _driver)} count (crew _vehicle) > 0)) then { _humanity = _driver getVariable["humanity",0]; if (typeOf _vehicle in DZE_heroHumanity && _humanity <= 20000 || (typeOf _vehicle in DZE_superHeroHumanity && _humanity <= 40000) || (typeOf _vehicle in DZE_agentHumanity && _humanity <= 60000)) then { player action ["getOut", (vehicle player)]; titleText ["","WHITE IN"]; _txt = "<img image='addons\vehicon.paa' /><br/><t size='0.7' color='#ea2828' align='center'>prohibited vehicle</t>"; [_txt, [safezoneX, safezoneW], [0.20 * safezoneH + safezoneY, 0.3 * safezoneH], 2, 0.5] spawn BIS_fnc_dynamicText; }; }; }; sleep 3; };  Step 2: Download this file http://www.mediafire.com/file/bdpt5d96o5cttk3/vehicon.rar
      Unzip and put paa file into addons folder.
      Step 3: Edit your custom variables file    dayz_code/init/variables.sqf
      Put the vehicles you want to restrict below call dayz_resetselfactions; ike this:
      // Custom below s_givemoney_dialog = -1; s_bank_dialog = -1; s_player_checkWallet = -1; s_bank_dialog1 = -1; s_bank_dialog2 = -1; s_player_copyToKey = -1; s_player_claimVehicle = -1; s_collect_heli = -1; }; call dayz_resetSelfActions; DZE_heroHumanity = ["Mi17_rockets_RU","Mi24_D","UH1Y_DZE"]; DZE_superHeroHumanity = ["Mi24_V","Mi24_P","Ka52"]; DZE_agentHumanity = ["AV8B2","AV8B","A10","F35B"]; DZE_safeVehicle = DZE_heroHumanity + DZE_superHeroHumanity + DZE_agentHumanity +["ParachuteWest","ParachuteC"]; Step 4: Edit your init file to exec the script. Above the   (false,12)execVm.... like below
          [] execVM "addons\veh_hum.sqf";
          //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf";
      Thats it. Enjoy!
        Hide contents
  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...