Jump to content
Sign in to follow this  
totis

Vehicle driver seat restriction according to humanity. 1.0.6.1

Recommended Posts

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

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...
Sign in to follow this  

  • Similar Content

    • By Adam1911
      We are We are pleased to announce the launch of our arma 2 Overpoch DayZ server, we are a PvE with a PvP aspect, What we mean by this is our server supports both play styles we have a zone on our map that you are allowed to base raid and kill others as you would find on a normal pvp server. Doing this we have been growing a community and getting a foot hold in the arma 2 community, we also welcome all Suggestions you can do this by joining our discord or our website (Website Offline for now) 
      We can offer you a unique experience while playing on our servers with great peoples, Fair adult and mature staff.
      Experienced staff with experience and successful servers from Arma 2 to Arma 3, Enjoyable game experience with a lot to do. We will enforce the rules as strongly as we can to get rid of any peoples trying to break this great experience for us.
       
      Features: 
      Full Day / Night cycle (No Voting) Time Acceleration.  Build Limit is based on your humanity, the higher your humanity the more objects you can build.   Indestructible Bases with in the PvE Zone Only. Custom AI Missions. Custom Loot. Realistic Towing. Slow Zombies (still a threat and more of them.) Self Blood Bag. Air drops. Snap Building. Coin System.  Repair/Fuel Services. Deploy Bike. Bury Body. Take Clothes. Locate Vehicle. TAB Menu. Custom Traders for 10k / 50k / 100k / 500k humanity Change / Custom door codes. and much more
        Website: Website
      Discord: https://discord.gg/zubtHR9
      Server: overpoch.thewalkingzuk.co.uk
    • By FG_Trap
      Made this in my free time awhile ago thought id make it public.
      Right Alt is the key to open the menu.
      Install instructions are inside the download.
      https://github.com/NWDZ-Trapxxgods/traps-menu
       
       
      here is a picture of the server menu
       
    • 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 C4-timah
      I am enjoying Grahame's EpochZ immensely.  However, if you are infected by the z's, after 30min you will die (animation for the 30min infection period is excellent btw). Upon death you will be shown the option to re-spawn. At that time you are promptly kicked by BattlEye for setvariable restriction #0:
      04.10.2018 00:14:33: C4-timah (23.119.200.220:2304) 57f9a830eeb99412623ce1c3d14b7d50 - #0 "ryanzombiesinfected" = 0 2:2877 Epoch_Male_F  
      If you are killed by the z's (beaten to death), upon your death you will also be shown a re-spawn option and then promptly kicked again for a BattlEye setvariable restriction #0:
      05.10.2018 21:53:02: C4-timah (23.119.200.220:2304) 57f9a830eeb99412623ce1c3d14b7d50 - #0 "ryanzombiesimmunity" = false 2:17479 Epoch_Male_F Adding
      !"ryanzombiesinfected" = 0 or
      !"ryanzombiesimmunity" = false does not appear to stop the BE kick. All the other filters in the setvariable.txt all start with  !=  which would indicates the filter must match exactly which would lead me to believe the key word that I need is something entirely different. I am using BattlEye Filter Manager to add the exceptions to the setvariable.txt. As you'll see, all the exceptions have !=" instead of !" unlike the last two that I have placed.
      //new2 5 "" !=(traderName|Offer|Accept|BUILD_SLOT|TRADE_ACTIVE|last_targeter|epoch_(antagobj|antagBomb)) !="bis_fnc_objectvar_var" !="bis_fnc_selectrespawntemplate_respawned" !="#(rev_enabled|var)" !="cup_tow_towedveh" !"ryanzombiesimmunity\" = false" !"ryanzombiesinfected\" = 0"  
      My rpt file shows the following error when killed by an EpochZ Zombie:
      17:44:02 BE protection activated for player id=726964973, name='whitehorse', msgType=285 setvariable.log:
      11.10.2018 17:44:02: whitehorse (75.80.233.157:1024) c2568b411cbd25fa774021698eade7c5 - #0 "ryanzombiesinfected" = 0 2:15917 Epoch_Male_F Ideas? Getting kicked every time you get killed by a Z has to be annoying to theses guys and I'd rather not lose the few that are consistently playing on our server. Any help is greatly appreciated.
    • By tyrant50187
      Im looking for the ability to add Script allowing Eyescan (retina scan) For Safe's and lockboxes, ether or, its something i havent found any script for but have found mentions and seen, any suggestions, links, or scripts are welcome, please Let me know!
  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...