Jump to content
  • 0

Zombieshield from plotpoles


FragZ

Question

I am currently using this script to make Zombies moved out of the plot pole radius (zombie free bases) and it takes some times (I believe cus of the sleep 10;)

while {true} do {
  sleep 10;


  // No Zeds near Plot Poles
  _playerPos = getPos player;
  _nearPole = nearestObject [_playerPos, "Plastic_Pole_EP1_DZ"];
  if (!isNull _nearPole) then {
    _pos2 = getPos _nearPole;
    _zombies2 = _pos2 nearEntities ["zZombie_Base", dayz_poleSafeArea];
    _count2 = count _zombies2;
    for "_i" from 0 to (_count2 -1) do
    {
      _zombie2 = _zombies2 select _i;
      _zombie2 setpos [-3367.739,-120.84577,-8247.0625];
    };
  };
};

However, there is a zombieshield script in most hack menus and admin menus that goes as following:

while {zoombiieshieldd} do
        {
            {
                if (!isNull _x) then {
                    if !(isPlayer _x) then {
                        deletevehicle _x;
                    };
                };
            } forEach (vehicle player nearEntities ["zZombie_Base",50]);
            sleep 1;
        };

The second version, instead of TPing zombies out, DELETES them. So I was wondering 3 things:

1- Which one is the best method /performance and efficacity wise?
2- Would the zombieshield script be used into the first one (matching it to a plotpole)?

3- Would removing the *sleep 10;* portion of the first script affect it by any means the performance or the efficacity of the script? If not, would it make it faster?

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Try this instead

while {zoombiieshieldd} do
        {
            {
no_zombies_loop = true;
_pos = getPos (vehicle player);
_zombies = _pos nearEntities ["zZombie_Base",50];
{deletevehicle _x;} forEach _zombies;
sleep 1;
}
};

Something similar to this might work.

Causes less lag, as it will only delete the zombie if a player is 50m by the plot pole, you can increase or decrease if you like.

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