Jump to content
  • 0

Restrict areas


NellyST24

Question

Hi guys, im new to running, adding scripts to our server. Probably a bit of a noob question, but how do i restrict/block a certain area to stop players building there? This is what i have in my description.ext:
 

Spoiler

 

class CfgEpochClient
{
    epochVersion = "0.3.6.0";

    sapperRngChance = 100; // increase number to reduce chances and reduce to increase. Default 100 = 1% - 55% if soiled (+ 2% if in city) chance to spawn sapper
    droneRngChance = 100; // increase number to reduce chances and reduce to increase. Default 100 = // 2% chance (+ 4% chance if in city) (1% - 2% Half if using silencer) to spawn drone if shot fired

    buildingNearbyMilitary = 0; //1 to allow building nearby
    buildingNearbyMilitaryRange = 300; //Define radius of blocked area

    buildingRequireJammer = 0; // 1 = to allow building without a jammer
    buildingCountLimit = 500; // how many objects can be built within range of a jammer
    buildingJammerRange = 100; // jammer range in meters

 

and the further down i have tis list of blocked areas which are already there by default i believe.

Spoiler

    class Chernarus
    {
        blockedArea[] = {
                { { 10203, 1886, 0 }, 430 }, //South Electro
                { { 6822, 2498, 0 }, 600 }, //Cherno
                { { 4612, 9670, 0 }, 140 }, //NWAF south barack
                { { 4907, 10117, 0 }, 250 }, //NWAF NE hangas
                { { 4707, 10384, 0 }, 200 }, //NWAF north barack
                { { 4069, 10778, 0 }, 75 }, //NWAF west hangas
                { { 4553, 10722, 0 }, 150 }, //NWAF NW hangas
                { { 12279, 9505, 0 }, 350 }, //Berenzino Mid
                { { 12816, 9816, 0 }, 400 }, //Berenzino SE
                { { 12991, 10147, 0 }, 375 }, //Berenzino Docs
                { { 2693, 5138, 0 }, 200 }, //Zeleno
                { { 11467, 7508, 0 }, 150 }, //Polana Factory
                { { 13092, 7096, 0 }, 140 }, //Solnichniy Factory
                { { 11670, 3199, 0 }, 450 }, //Otmel
        };

I am trying to add Otmel to the blocked list, but i can still build there so im guessing its not working. I have also jumped around the map to the other listed locations and the only one the prevents me from building is //Cherno.

Any help in the right direction is greaty appreciated. Probably simple to a scripter, but as i say, im just starting out and this is a problem i have come too.

cheers guys

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

You need to do a few things to change these.

1) unpack your mission.pbo (epoch.Altis.pbo or whatever).

2) inside the unpacked mission create a folder, something like cfg

3) copy CfgEpochClient.hpp from @Epoc\Configs to cfg in your mission.pbo

4) copy any map-specific files (e.g., altis.h) from @Epoch\configs\CfgEpochClient folder to your cfg folder.

5) modify the blocked areas table to suite your needs.

6) comment out any included *.h files in CfgEpochClient.hpp that are not needed and correct the path given for their location. Because I place these files in the same directory as CfgEpochClient.hpp, I have the following:

#include "Altis.hpp".

7) Assuming you named the folders with these files, cfg, add the following at the bottom of your description.ext "

#include "cfg\CfgEpochClient.hpp"

8) for maps for which there is not already an *.h file, I would simply copy one of the others, rename the file and class accordingly. For example, for Otmel, change the file name to otmel.h. and the class name to class Otmel.

You may need to redefine the trees, rocks, and other objects depending on what is in the map.

I hope this is helpful

 

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