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
      TWZ - The Walking Z Overpoch Server
      Server IP: 54.37.244.16:2302
      Discord: Discord
      Website: Website
      Top Server Features:
      PvE Only Server.
      Dedicated server for max performance.
      6 Hour Restarts.
      Full day/night cycle. (No Voting)
      Indestructible bases.
      Custom AI Missions.
      High loot spawns.
      Slow (Walking) Zombies.
      Custom Traders. (10k/50k/100k/500k humanity)
      Paychecks every hour. (Scales with humanity)
      Humanity Quests.
      Anit Stealing for all vehicles. (Prevents anyone from stealing your vehicles)
      Simi Militarised.
    • By THAC0_Gewch
      https://github.com/OlofTheBald/DayZ-Humanity-Loadout-Granter/tree/Epoch_1.0.5.1
       
      Updated for 1.0.6.x
    • By THAC0_Gewch
      Many years ago, I made a Humanity Loadout script for 1.0.5.x. The script is basic, it checks your players' humanity and grants a pre-set loadout when they spawn depending on their humanity level.
      I've now updated and optimized this script for 1.0.6.x:
      https://github.com/OlofTheBald/DayZ-Humanity-Loadout-Granter
       
       
    • By Vitor99
      Hi everyone, i would like to know if there is any torrent links for Epoch and Overpoch, if you know some send me the link here
  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...