Jump to content
  • 0

Dogs being deleted


Hey. I am using this script to have a loyal dog and it works great but I have had to delete the animal cleanup to have it work. This is not ideal. Does anyone know how to disable animal cleanup just for the spawned dogs?


Dog mod


This is the code which needs editing rather than switching off:

server_spawnCleanAnimals = {
	private ["_pos","_delQtyAnimal","_qty","_missonAnimals","_nearby"];
	_missonAnimals = entities "CAAnimalBase";
	_delQtyAnimal = 0;
		if (local _x) then {
			_x call dayz_perform_purge;
			sleep 0.05;
			_delQtyAnimal = _delQtyAnimal + 1;
		} else {
			if (!alive _x) then {
				_pos = getPosATL _x;
				if (count _pos > 0) then {
					_nearby = {(isPlayer _x) && (alive _x)} count (_pos nearEntities [["CAManBase","AllVehicles"], 130]);
					if (_nearby==0) then {
						_x call dayz_perform_purge;
						sleep 0.05;
						_delQtyAnimal = _delQtyAnimal + 1;
		sleep 0.001;
	} count _missonAnimals;
	if (_delQtyAnimal > 0) then {
		_qty = count _missonAnimals;
		diag_log (format["CLEANUP: Deleted %1 Animals out of %2",_delQtyAnimal,_qty]);

Thanks in advance.

Share this post

Link to post
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Answer this question...

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


  • Similar Content

    • By MessiGamer
      Hello. I was trying for a dog to spawn with hero player. I searched a lot and found nothing on the internet for dayz epoch. i don't know much about scripting, so anyone can help me? I think this is not too complicated
      like you spawn on server and a trained dog appears or spawn in your plot pole.
    • By SryImAnooB
      Hey guys, i need some help/answers.
      I have no clue about cleanup the server from loot when no one is around for a specific amount of time.
      I noticed that this was uncommented in server_function.sqf:
      server_systemCleanup = compile preprocessFileLineNumbers "\z\addons\dayz_server\system\server_cleanup.sqf"; so i removed the // and checked what happend...nothing :D
      Then i checked out the server_cleanup.sqf.
      In line 23 it says:
      if (_age > 20) then { changed to:
      if (_age > 2) then { cause i thought 20 = 20min ?! so 2 = 2min. Was a try nothing happend.
      I googled around and noticed that in the server_cleanup was .fsm and not .sqf. Does this matter?
      And does anyone have a tip how to cleanup loot when for ex. a player is not in range from 500m for 5 mins?!
    • By Birgitte
      Hi Guys,
      I have a working server. When my guys or I place a fuel pump, fire barrel, generator, etc. the server deletes it after a week or so. Is there a setting I'm missing to stop this from happening?
    • By i3lackoutHD
      Anyone got the same problem? :
      I have hundreds of zombies around the map.
      Even if theres no player nearby.
    • By Kimzer
      Hi Guys!
      I forgot to backup my cleanup.sql when transferring to a new server.
      Soo, i was hoping someone would do me a solid and share some good cleanup to be ran each time the server reboots.
  • Advertisement
  • Supporters
  • Discord

  • Create New...