DayZ
59 ratings
Zens 1PP PVP Mod
   
Award
Favorite
Favorited
Unfavorite
Type: Mod
Mod Type: Mechanics
File Size
Posted
Updated
18.799 KB
Nov 11, 2022 @ 9:31pm
Nov 11, 2022 @ 9:31pm
2 Change Notes ( view )

Subscribe to download
Zens 1PP PVP Mod

Description
What Is This?

This mod is for 3PP servers who want to lock players into 1PP view when they are in PVP.

It's designed mainly for PVE and RP servers that want to allow 3rd person mode for adventurers, but don't want to allow players to exploit 3rd person in combat to look around corners or over fences etc.

There are two ways it works (either can be enabled/disabled in config):

- You can lock the view to 1PP based on what item the player has in their hands (guns, melee, grenades etc)
- You can lock the view to 1PP based on a proximity to a map location (military bases, contamination zones, certain POIs etc)

When either of these conditions are triggered, the player is locked into 1PP view and must wait X amount of seconds (60 secs by default) before the 3PP view hotkey will work again after leaving the area or putting their gun away.

To lock the player into 1PP mode when certain items are in their hands you can add the specific item class name or the item's parent class name to the ViewRestrictedItems list (eg. add "Hatchet" to restrict hatchets to 1PP, or add "ToolBase" to restrict all knives/hatchets/etc).

If you only want to disable 3PP mode in certain areas and allow 3PP mode with weapons in hand elsewhere on the map, just remove the values from ViewRestrictedItems so the config looks like: "ViewRestrictedItems": []

You can also disable the 1PP view lock while inside a vehicle if you prefer, in order to stop the player being locked into 1PP mode randomly when driving past a military base or other view-restricted area.

Installation Instructions:

Install this mod like any other mod - copy it into your server's root directory, add it to your launch parameters, and make sure to copy the .bikey into your server keys.

This mod must be installed on both the server & client.

Once the mod is installed, on the next server start a JSON config will be generated in your server profiles folder (usually root/profiles/Zenarchist/Zen3ppConfig.json)

The default config automatically generates 1PP zones across military bases and checkpoints for Chernarus, Livonia and Namalsk, but any modded maps will require you to create your own.

Just use a tool like izurvive to get the coordinates and radius.

Config Guide:

"ConfigVersion": "1", // Do not touch - will reset entire config if changed
"RestrictionTime": 60, // Restrictin time (in seconds) when 1PP mode lock is engaged
"ApplyToVehicles": 0, // Set to 1 to enable 1PP lock in restricted zones or when holding guns etc
"RestrictAreas": 1, // Set to 0 to disable restricted areas
"ViewRestrictedItems": [
"Firearm", // Restrict all firearms
"Grenade", // Restrict all grenades
"RemoteDetonatorTrigger" // Restrict individual items
],
"FirstPersonZones": [
{
"Name": "Contam: Pavlovo", // Location name (can be anything)
"X": 2099.0, // X coordinate
"Z": 3375.0, // Z coordinate (Y coordinate is not needed - mod will always use zero for Y)
"Radius": 250 // Radius in meters from the coordinates to begin locking player view
}

Repack & Source Code:

Unfortunately due to lack of time I can't maintain all of my mods all of the time. I do my best, but these mods are offered as-is. If there's a problem, you have the source code and my permission to fix it yourself and upload a fixed version to the workshop without any credit necessary. It's all free.

You can repack this mod if you like, and do anything else you want with it for that matter. The source code is on my GitHub at www.zenarchist.com

Buy Me A Coffee:

All my mods are free and open source, but it takes an enormous amount of time to put some of these mods together. If I've helped you out, please consider helping me buy my next coffee! I don't expect it, but I very much appreciate it.

https://buymeacoffee.com/zenarchist

Enjoy!
19 Comments
Dr. Berry Mar 12 @ 3:29pm 
How can I make ppl dont be in 3rd person if he has a melee weapon?
Mahipta Feb 6 @ 6:18pm 
Thank you for the mod and the content that you make. Plus keep up the good work. I have thumbed-up, favortied and subscribed to your content for permission to repack. I have also followed any other guidelines you have or have not specified. Please let me know should you revoke this permission to repack at any time and I will make the appropriate changes.
SilverOcircle Oct 4, 2024 @ 1:41am 
Hey Zen, Would it be possible for the player to automatically switch back to third person view?
Skara_666 Mar 18, 2024 @ 11:03am 
If you hold button V - you can move in restricted area in 3pp. Is it possible to fix?
Van Hohenheim Dec 29, 2023 @ 10:08pm 
This works well with PVEZ. Hopefully we can make an exemption if the person is inside vehicle.
DU11O_YT May 30, 2023 @ 7:55am 
thanks for u mods
Cowboy Pilot May 26, 2023 @ 2:00am 
PS. "ToolBase" doesn't seem to apply to crowbar, axe, sledgehammer, pipe, etc. Did that change at some point?
Cowboy Pilot May 25, 2023 @ 3:30pm 
Hey @Zen. As usual, great implementation. Is there a way of potentially adding another check, where if a gunshot (or bullet impact) or explosion is within X distance that it triggers 1PP? Thinking somewhat along the lines as what your combat logging already offers. If it helps with performance, maybe have a way that if combat log mod is use this script can piggy back off those checks? I mention the latter without claiming to be any expert or knowing if that makes sense or not.
Daxolion Feb 26, 2023 @ 4:46pm 
Hey Zen, can you do a PVEZ Compatibility Patch? So when people enter the PVP Zone, they switch von 3PP to 1PP
Violt Feb 20, 2023 @ 5:42am 
Hello Zen, maybe you can add a config option where u can add "Full Zoom While Sprinting" As an option in the config?