Jump to content
  • 0

Random "No message Received" Looking/paying for help! No time wasters!


(TLS)

Question

Hey were having problems on all of our servers atm, all 3 crash with "no message received", and all three are using the same missionsfiles.

Now im hoping that we can find someone who will help us out here, and hopefully look at our files and say "yeah you noobs, this is why " :D, And im genuinely hoping you can do so!

 

Just give me a PM or Jump in teamspeak and we can sort out payment if you wish to be paid for your time, This shouldnt take long if you know what you are doing , so no timewasters!

 

If you do want paying for your time, you will be paid upon fixing the errors and random crashes we are having.

 

Please don't waste our time, as we are not here to mess about, this is a serious issue, for such a fast growing community, but we really need help right now.

 

Thank you.

 

TLS.

Link to comment
Share on other sites

Recommended Posts

  • 0

Ill try removing it,but its just a pain haha, would you know of anyone who has experience of all this and can look through my files on my dedi, and see if they can find something ive missed, whether they want paying or not?

 

Appreciate the help.

Link to comment
Share on other sites

  • 0

I have 3 servers, this is the errors before they all crash at the same time

 

Don't know if it has anything to do with it but every server before the crash, ran the cleanup.

 

Cherno RPT - Just before crash

 

 

12:31:41 "CLEANUP: Deleted 6 Loot Piles out of 128"
12:33:37 "TIME SYNC: Local Time set to [2013,8,3,15,33]"
12:33:41 "CLEANUP: Deleted 4 Loot Piles out of 140"
12:33:50 Server: Object 8:187 not found (message 91)
12:34:41 "CLEANUP: Deleted 11 Loot Piles out of 136"
12:37:40 "CLEANUP: Deleted 3 Loot Piles out of 125"
12:38:22 Server: Object 8:211 not found (message 91)
12:38:37 "TIME SYNC: Local Time set to [2013,8,3,15,38]"
12:38:41 "CLEANUP: Deleted 9 Loot Piles out of 145"
12:39:37 "EPOCH SERVERTRADE: Player: Kamil (238677126) sold a SUV_Blue in/at Stary for 5x ItemGoldBar"
12:39:37 "DELETE: B 1-1-D:1 (Kamil) REMOTE Deleted by ID: 1153"
12:39:43 "CLEANUP: Deleted 41 Loot Piles out of 167"
12:40:41 "CLEANUP: Deleted 5 Loot Piles out of 140"
12:41:41 "CLEANUP: Deleted 3 Loot Piles out of 135"
12:43:37 "TIME SYNC: Local Time set to [2013,8,3,15,43]"
12:44:41 "CLEANUP: Deleted 8 Loot Piles out of 132"
12:44:48 "get: STRING (238677126), sent: STRING (238677126)"
12:44:48 "DISCONNECT: Kamil (238677126) Object: B 1-1-D:1 (Kamil) REMOTE, _characterID: 171 at loc [4444.81,8845.98,0.00152588]"
12:44:48 Client: Remote object 8:7 not found
12:44:48 Client: Remote object 8:0 not found
12:44:48 Warning: Cleanup player - person 8:6 not found
12:44:49 Warning: Cleanup player - person 8:6 not found
12:45:31 "RUNNING EVENT: crash_spawner on [2014,5,10,15,45]"
12:46:41 "CLEANUP: Deleted 3 Loot Piles out of 125"
12:47:41 "CLEANUP: Deleted 2 Loot Piles out of 121"
12:48:37 "TIME SYNC: Local Time set to [2013,8,3,15,48]"
12:48:41 "CLEANUP: Deleted 16 Loot Piles out of 119"
12:52:41 "CLEANUP: Deleted 18 Loot Piles out of 116"
12:53:37 "TIME SYNC: Local Time set to [2013,8,3,15,53]"
12:55:01 "RUNNING EVENT: Treasure on [2014,5,10,15,55]"
12:56:31 Client: Object 6:314 (type Type_69) not found.
12:56:31 Client: Object 6:314 (type Type_70) not found.
12:58:28 Client: Object 6:313 (type Type_70) not found.
12:58:37 "TIME SYNC: Local Time set to [2013,8,3,15,58]"
12:58:41 "CLEANUP: Deleted 22 Loot Piles out of 99"
12:58:47 Client: Object 6:313 (type Type_70) not found.
12:58:47 Client: Object 6:313 (type Type_69) not found.
12:58:52 Client: Object 6:313 (type Type_70) not found.
12:59:09 Client: Object 6:313 (type Type_70) not found.
12:59:41 "CLEANUP: Deleted 31 Loot Piles out of 78"
13:00:40 "CLEANUP: Deleted 15 Loot Piles out of 48"
13:03:37 "TIME SYNC: Local Time set to [2013,8,3,16,3]"
13:08:37 "TIME SYNC: Local Time set to [2013,8,3,16,8]"
13:09:40 "CLEANUP: Deleted 13 Loot Piles out of 48"
13:10:01 "RUNNING EVENT: Construction on [2014,5,10,16,10]"
13:10:01 "Spawning loot event at [3177.5,8960.47]"
13:10:01 "Creating ammo box at [3214.55,8934.87]"
13:10:01 "Loot event setup, waiting for 2500 seconds"
13:11:12 Server: Object 6:423 not found (message 98)
13:11:12 Server: Object 6:424 not found (message 91)
 
 
Napf RPT -  just before crash
 
5:10:39 Client: Remote object 60:204 not found
15:10:39 Client: Remote object 60:203 not found
15:10:39 Client: Remote object 60:0 not found
15:10:40 Warning: Cleanup player - person 60:205 not found
15:10:41 NetServer::SendMsg: cannot find channel #395915403, users.card=16
15:10:41 NetServer: users.get failed when sending to 395915403
15:10:41 Message not sent - error 0, message ID = ffffffff, to 395915403 (dilector)
15:10:41 Warning: Cleanup player - person 60:205 not found
15:10:44 Server: Object 57:33 not found (message 94)
15:10:44 Server: Object 57:32 not found (message 70)
15:11:16 "get: STRING (125265862), sent: STRING (125265862)"
15:11:16 "DISCONNECT: [PidgeonBoyz]Dr.Tobaggan (125265862) Object: B 1-1-D:1 ([PidgeonBoyz]Dr.Tobaggan) REMOTE, _characterID: 6382 at loc [8168.76,14682.2,0.00156593]"
15:11:17 Client: Remote object 55:0 not found
15:11:17 Client: Remote object 55:6 not found
15:11:17 "get: STRING (115641222), sent: STRING (115641222)"
15:11:17 "DISCONNECT: BRAD (115641222) Object: B 1-2-E:1 (BRAD) REMOTE, _characterID: 5923 at loc [5156.38,4433.94,0.00145721]"
15:11:17 "Player is Null FAILED: Exiting, player sync: <NULL-object>"
15:11:17 Client: Remote object 61:4 not found
15:11:17 Client: Remote object 61:3 not found
15:11:17 Client: Remote object 61:0 not found
15:11:18 Warning: Cleanup player - person 55:5 not found
15:11:19 Server: Object 52:21 not found (message 94)
15:11:19 Server: Object 52:19 not found (message 94)
15:11:19 Server: Object 52:20 not found (message 94)
15:11:19 Warning: Cleanup player - person 61:5 not found
15:11:25 "nil player object attempting PV, :["146459718","Bill From I.T"]"
15:11:25 "get: STRING (), sent: STRING (146459718)"
15:11:25 "DISCONNECT: Bill From I.T (146459718) Object: B 1-2-F:1 REMOTE, _characterID: 5356 at loc [5140.25,4445.11,0.270126]"
15:11:25 Client: Remote object 57:0 not found
15:11:25 Client: Remote object 57:6 not found
15:11:27 Server: Object 52:24 not found (message 94)
15:11:30 "get: STRING (5151106), sent: STRING (5151106)"
15:11:30 "DISCONNECT: Mukki (5151106) Object: B 1-2-H:1 (Mukki) REMOTE, _characterID: 6258 at loc [8415.33,17147.9,3.70389]"
15:11:30 Client: Remote object 63:4 not found
15:11:30 Client: Remote object 63:3 not found
15:11:30 Client: Remote object 63:0 not found
15:11:31 Warning: Cleanup player - person 63:5 not found
15:11:35 Warning: Cleanup player - person 57:5 not found
15:11:36 "get: STRING (81712070), sent: STRING (81712070)"
15:11:36 "DISCONNECT: [PidgeonBoyz]GreenMan (81712070) Object: B 1-1-I:1 ([PidgeonBoyz]GreenMan) REMOTE, _characterID: 5797 at loc [8171.61,14451.4,0.00170898]"
15:11:36 Client: Remote object 48:0 not found
15:11:36 Client: Remote object 48:6 not found
15:11:38 "get: STRING (238335686), sent: STRING (238335686)"
15:11:38 "DISCONNECT: Alex (238335686) Object: B 1-2-G:1 (Alex) REMOTE, _characterID: 5924 at loc [9681,7765.61,0.000717163]"
15:11:38 Client: Remote object 53:15 not found
15:11:38 Client: Remote object 53:14 not found
15:11:38 Client: Remote object 53:0 not found
15:11:38 "Player is Null FAILED: Exiting, player sync: <NULL-object>"
15:11:39 "get: STRING (164613126), sent: STRING (164613126)"
15:11:39 "DISCONNECT: [MEOW]TheKarlMarx (164613126) Object: B 1-2-D:1 ([MEOW]TheKarlMarx) REMOTE, _characterID: 6167 at loc [14659.2,5256.5,0.00146484]"
15:11:39 Client: Remote object 64:0 not found
15:11:39 Client: Remote object 64:6 not found
15:11:40 "nil player object attempting PV, :["134513094","(TSC)ASweatynarwhal"]"
15:11:40 "get: STRING (), sent: STRING (134513094)"
15:11:40 "DISCONNECT: (TSC)ASweatynarwhal (134513094) Object: B 1-1-F:1 REMOTE, _characterID: 6396 at loc [9817.54,9942.72,1.09151]"
15:11:40 NetServer::SendMsg: cannot find channel #2138236609, users.card=11
15:11:40 NetServer: users.get failed when sending to 2138236609
15:11:40 Message not sent - error 0, message ID = ffffffff, to 2138236609 ([MEOW]TheKarlMarx)
15:11:40 Client: Remote object 52:0 not found
15:11:40 Client: Remote object 52:6 not found
15:11:40 Warning: Cleanup player - person 64:5 not found
15:11:41 "get: STRING (239971782), sent: STRING (239971782)"
15:11:41 "DISCONNECT: Chase (239971782) Object: B 1-1-C:1 (Chase) REMOTE, _characterID: 6399 at loc [9729.68,7764.87,0.000244141]"
15:11:41 Client: Remote object 46:36 not found
15:11:41 Client: Remote object 46:35 not found
15:11:41 Client: Remote object 46:38 not found
15:11:41 Warning: Cleanup player - person 52:5 not found
15:11:43 "CLEANUP: Deleted 15 Loot Piles out of 1379"
15:11:43 Warning: Cleanup player - person 48:5 not found
15:11:49 Warning: Cleanup player - person 53:16 not found
15:12:01 "get: STRING (230793926), sent: STRING (230793926)"
15:12:01 "DISCONNECT: (TSC)ASweatyTurtle (230793926) Object: B 1-1-E:1 ((TSC)ASweatyTurtle) REMOTE, _characterID: 6125 at loc [9823.72,9915.86,0.448959]"
15:12:01 Client: Remote object 50:4 not found
15:12:01 Client: Remote object 50:3 not found
15:12:01 Client: Remote object 50:0 not found
15:12:02 Server: Object 62:180 not found (message 70)
15:12:02 Server: Object 62:179 not found (message 70)
15:12:02 Server: Object 62:178 not found (message 94)
15:12:02 Server: Object 62:177 not found (message 94)
15:12:03 Warning: Cleanup player - person 50:5 not found
15:12:04 "get: STRING (91676614), sent: STRING (91676614)"
15:12:04 "DISCONNECT: [MEOW] Paul (91676614) Object: B 1-1-M:1 ([MEOW] Paul) REMOTE, _characterID: 6362 at loc [14677.9,5276.26,0.0012207]"
15:12:04 Client: Remote object 65:0 not found
15:12:04 Client: Remote object 65:6 not found
15:12:05 Warning: Cleanup player - person 65:5 not found
15:12:07 Warning: Cleanup player - person 58:5 not found
 
 
Panther - Just before Crash
 
15:05:57 Server: Object 6:520 not found (message 89)
15:06:04 "CLEANUP: Deleted 10 Loot Piles out of 355"
15:06:06 Server: Object 20:153 not found (message 91)
15:06:06 Server: Object 20:155 not found (message 91)
15:06:06 Server: Object 20:157 not found (message 91)
15:06:06 Server: Object 20:156 not found (message 99)
15:06:06 Server: Object 20:159 not found (message 91)
15:06:06 Server: Object 20:161 not found (message 91)
15:06:06 Server: Object 20:160 not found (message 99)
15:06:06 Server: Object 20:165 not found (message 91)
15:06:06 Server: Object 20:167 not found (message 91)
15:06:06 Server: Object 20:166 not found (message 99)
15:06:06 Server: Object 20:169 not found (message 91)
15:06:06 Server: Object 20:168 not found (message 99)
15:06:27 Server: Object 16:6 not found (message 89)
15:06:27 Server: Object 6:520 not found (message 89)
15:06:57 Server: Object 16:6 not found (message 89)
15:06:57 Server: Object 6:520 not found (message 89)
15:07:27 Server: Object 16:6 not found (message 89)
15:07:27 Server: Object 6:520 not found (message 89)
15:07:56 "TIME SYNC: Local Time set to [2013,8,3,16,7]"
15:07:57 Server: Object 16:6 not found (message 89)
15:07:57 Server: Object 6:520 not found (message 89)
15:08:11 "CLEANUP: Deleted 182 Loot Piles out of 351"
15:08:17 "get: STRING (52142854), sent: STRING (52142854)"
15:08:17 "DISCONNECT: Sgt. Splits (52142854) Object: B 1-1-D:1 (Sgt. Splits) REMOTE, _characterID: 63 at loc [7709.73,2513.29,0.835014]"
15:08:17 Client: Remote object 25:0 not found
15:08:17 Client: Remote object 25:6 not found
15:08:17 Server: Object 23:147 not found (message 99)
15:08:17 Server: Object 23:148 not found (message 91)
15:08:19 Warning: Cleanup player - person 25:5 not found
15:08:27 Server: Object 16:6 not found (message 89)
15:08:27 Server: Object 6:520 not found (message 89)
15:08:57 Server: Object 16:6 not found (message 89)
15:08:57 Server: Object 6:520 not found (message 89)
15:09:02 "CLEANUP: Deleted 47 Loot Piles out of 169"
15:09:27 Server: Object 16:6 not found (message 89)
15:09:27 Server: Object 6:520 not found (message 89)
15:09:57 Server: Object 16:6 not found (message 89)
15:09:57 Server: Object 6:520 not found (message 89)
15:10:01 "RUNNING EVENT: Construction on [2014,5,10,16,10]"
15:10:01 "Spawning loot event at [8048.64,6093.71]"
15:10:01 "Creating ammo box at [7905.79,6190.22]"
15:10:01 "Loot event setup, waiting for 2500 seconds"
15:10:01 "CLEANUP: Deleted 18 Loot Piles out of 152"
15:10:19 "get: STRING (26046662), sent: STRING (26046662)"
15:10:19 "DISCONNECT: xFrEaKx (26046662) Object: B 1-1-B:1 (xFrEaKx) REMOTE, _characterID: 76 at loc [7161.17,3171.28,0.281963]"
15:10:19 Client: Remote object 21:4 not found
15:10:19 Client: Remote object 21:3 not found
15:10:19 Client: Remote object 21:0 not found
15:10:20 Warning: Cleanup player - person 21:5 not found
15:10:27 Server: Object 16:6 not found (message 89)
15:10:27 Server: Object 6:520 not found (message 89)
Link to comment
Share on other sites

  • 0

Alot of this to

 

To me it seems like the cleanup?

 

The server_functions.sqf is a stock sqf, only thing ive added is the call for infistar tools , Right at the top of it.

 

 

 

16:53:35 Server: Object 47:52 not found (message 91)
16:53:40 "DELETE: B 1-4-I:1 (SomeGuy) REMOTE Deleted by ID: 11855"
16:53:43 "CLEANUP: Deleted 311 Loot Piles out of 1061"
16:53:58 Error in expression <x getVariable ["permaLoot",false];
if (!_keep) then {
_created = _x getVariable >
16:53:58   Error position: <_keep) then {
_created = _x getVariable >
16:53:58   Error Undefined variable in expression: _keep
16:53:58 File z\addons\dayz_server\init\server_functions.sqf, line 837
16:53:59 Error in expression <x getVariable ["permaLoot",false];
if (!_keep) then {
_created = _x getVariable >
16:53:59   Error position: <_keep) then {
_created = _x getVariable >
16:53:59   Error Undefined variable in expression: _keep
16:53:59 File z\addons\dayz_server\init\server_functions.sqf, line 837
16:54:09 "infiSTAR.de PlayerConnected: _uid: 121912710   _name: weston"
16:54:09 "infiSTAR.de Player-Log: weston(121912710) - 1h 40min"
16:54:13 Error in expression <x getVariable ["permaLoot",false];
if (!_keep) then {
_created = _x getVariable >
16:54:13   Error position: <_keep) then {
_created = _x getVariable >
16:54:13   Error Undefined variable in expression: _keep
16:54:13 File z\addons\dayz_server\init\server_functions.sqf, line 837
16:54:24 "SAFE UNLOCKED: ID:0 UID:8416417145837156 BY Mukki(5151106)"
16:54:26 Error in expression <x getVariable ["permaLoot",false];
if (!_keep) then {
_created = _x getVariable >
16:54:26   Error position: <_keep) then {
_created = _x getVariable >
16:54:26   Error Undefined variable in expression: _keep
16:54:26 File z\addons\dayz_server\init\server_functions.sqf, line 837
16:54:29 Server: Object 23:797 not found (message 91)
16:54:29 Server: Object 23:796 not found (message 99)
16:54:30 Server: Object 23:798 not found (message 99)
Link to comment
Share on other sites

  • 0

you have definitely forgot to add a closing bracket or a comma or something like that BEFORE that error....could be at the top of the file..or in the antihack config file...but for sure you are missing that.

I would suggest you get Ultracompare or any comparing folder program and compare the vanilla dayz_server files and yours...eventually you'll find the mistake.

Link to comment
Share on other sites

  • 0

Well this is it server_functions.sqf

 

But i will do what you said above and cross check, thanks for all the help, appreciate it!

 

[] spawn {[] execVM "\z\addons\dayz_server\init\AH.sqf";};
waituntil {!isnil "bis_fnc_init"};
 
BIS_MPF_remoteExecutionServer = {
if ((_this select 1) select 2 == "JIPrequest") then {
[nil,(_this select 1) select 0,"loc",rJIPEXEC,[any,any,"per","execVM","ca\Modules\Functions\init.sqf"]] call RE;
};
};
/* Skaronator - secured better remoteExecServer
BIS_MPF_remoteExecutionServer = {
if ((_this select 1) select 2 == "JIPrequest") then {
_playerObj = (_this select 1) select 0;
remExField = [nil, nil, format ["";if !(isServer) then {[] execVM "ca\Modules\Functions\init.sqf";};""]];
(owner _playerObj) publicVariableClient "remExField";
};
};*/
 
BIS_Effects_Burn = {};
server_playerLogin = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerLogin.sqf";
server_playerSetup = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerSetup.sqf";
server_onPlayerDisconnect = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_onPlayerDisconnect.sqf";
server_updateObject = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_updateObject.sqf";
server_playerDied = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerDied.sqf";
server_publishObj = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_publishObject.sqf";
server_deleteObj = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_deleteObj.sqf";
server_swapObject = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_swapObject.sqf"; 
server_publishVeh = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_publishVehicle.sqf";
server_publishVeh2 = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_publishVehicle2.sqf";
server_publishVeh3 = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_publishVehicle3.sqf";
server_tradeObj = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_tradeObject.sqf";
server_traders = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_traders.sqf";
server_playerSync = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerSync.sqf";
server_spawnCrashSite  =     compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_spawnCrashSite.sqf";
server_spawnEvents = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_spawnEvent.sqf";
//server_weather = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_weather.sqf";
fnc_plyrHit   = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\fnc_plyrHit.sqf";
server_deaths = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerDeaths.sqf";
server_maintainArea = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_maintainArea.sqf";
 
/* PVS/PVC - Skaronator */
server_sendToClient = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_sendToClient.sqf";
 
//onPlayerConnected {[_uid,_name] call server_onPlayerConnect;};
onPlayerDisconnected {[_uid,_name] call server_onPlayerDisconnect;};
 
server_updateNearbyObjects = {
private["_pos"];
_pos = _this select 0;
{
[_x, "gear"] call server_updateObject;
} forEach nearestObjects [_pos, dayz_updateObjects, 10];
};
 
server_handleZedSpawn = {
private["_zed"];
_zed = _this select 0;
_zed enableSimulation false;
};
 
zombie_findOwner = {
private["_unit"];
_unit = _this select 0;
#ifdef DZE_SERVER_DEBUG
diag_log ("CLEANUP: DELETE UNCONTROLLED ZOMBIE: " + (typeOf _unit) + " OF: " + str(_unit) );
#endif
deleteVehicle _unit;
};
 
vehicle_handleInteract = {
private["_object"];
_object = _this select 0;
needUpdate_objects = needUpdate_objects - [_object];
[_object, "all"] call server_updateObject;
};
 
array_reduceSizeReverse = {
private["_array","_count","_num","_newarray","_startnum","_index"];
_array = _this select 0;
_newarray = [];
_count = _this select 1;
_num = count _array;
if (_num > _count) then {
_startnum = _num - 1;
_index = _count - 1;
for "_i" from 0 to _index do {
_newarray set [(_index-_i),_array select (_startnum - _i)];
};
_array = _newarray;
}; 
_array
};
 
array_reduceSize = {
private ["_array1","_array","_count","_num"];
_array1 = _this select 0;
_array = _array1 - ["Hatchet_Swing","Machete_Swing","Fishing_Swing","sledge_swing","crowbar_swing","CSGAS"];
_count = _this select 1;
_num = count _array;
if (_num > _count) then {
_array resize _count;
};
_array
};
 
object_handleServerKilled = {
private["_unit","_objectID","_objectUID","_killer"];
_unit = _this select 0;
_killer = _this select 1;
 
_objectID = _unit getVariable ["ObjectID","0"];
_objectUID = _unit getVariable ["ObjectUID","0"];
 
[_objectID,_objectUID,_killer] call server_deleteObj;
 
_unit removeAllMPEventHandlers "MPKilled";
_unit removeAllEventHandlers "Killed";
_unit removeAllEventHandlers "HandleDamage";
_unit removeAllEventHandlers "GetIn";
_unit removeAllEventHandlers "GetOut";
};
 
check_publishobject = {
private["_allowed","_object","_playername"];
 
_object = _this select 0;
_playername = _this select 1;
_allowed = false;
 
if ((typeOf _object) in dayz_allowedObjects) then {
//diag_log format ["DEBUG: Object: %1 published by %2 is Safe",_object, _playername];
_allowed = true;
};
    _allowed
};
 
//event Handlers
eh_localCleanup = {
private ["_object"];
_object = _this select 0;
_object addEventHandler ["local", {
if(_this select 1) then {
private["_type","_unit"];
_unit = _this select 0;
_type = typeOf _unit;
_myGroupUnit = group _unit;
  _unit removeAllMPEventHandlers "mpkilled";
  _unit removeAllMPEventHandlers "mphit";
  _unit removeAllMPEventHandlers "mprespawn";
  _unit removeAllEventHandlers "FiredNear";
_unit removeAllEventHandlers "HandleDamage";
_unit removeAllEventHandlers "Killed";
_unit removeAllEventHandlers "Fired";
_unit removeAllEventHandlers "GetOut";
_unit removeAllEventHandlers "GetIn";
_unit removeAllEventHandlers "Local";
clearVehicleInit _unit;
deleteVehicle _unit;
deleteGroup _myGroupUnit;
//_unit = nil;
diag_log ("CLEANUP: DELETED A " + str(_type) );
};
}];
};
 
server_hiveWrite = {
private["_data"];
_data = "HiveExt" callExtension _this;
};
 
server_hiveReadWrite = {
private["_key","_resultArray","_data"];
_key = _this;
_data = "HiveExt" callExtension _key;
_resultArray = call compile format ["%1",_data];
_resultArray
};
 
server_hiveReadWriteLarge = {
private["_key","_resultArray","_data"];
_key = _this;
_data = "HiveExt" callExtension _key;
_resultArray = call compile _data;
_resultArray
};
 
server_checkIfTowed = {
private ["_vehicle","_player","_attached"];
if (DZE_HeliLift) then {
_vehicle = _this select 0;
_player = _this select 2;
_attached = _vehicle getVariable["attached",false];
if ((typeName _attached == "OBJECT")) then {
_player action ["eject", _vehicle];
detach _vehicle;
_vehicle setVariable["attached",false,true];
_attached setVariable["hasAttached",false,true];
};
};
};
 
server_characterSync = {
private ["_characterID","_playerPos","_playerGear","_playerBackp","_medical","_currentState","_currentModel","_key"];
_characterID = _this select 0;
_playerPos = _this select 1;
_playerGear = _this select 2;
_playerBackp = _this select 3;
_medical = _this select 4;
_currentState = _this select 5;
_currentModel = _this select 6;
 
_key = format["CHILD:201:%1:%2:%3:%4:%5:%6:%7:%8:%9:%10:%11:%12:%13:%14:%15:%16:",_characterID,_playerPos,_playerGear,_playerBackp,_medical,false,false,0,0,0,0,_currentState,0,0,_currentModel,0];
_key call server_hiveWrite;
};
 
if(isnil "dayz_MapArea") then {
dayz_MapArea = 10000;
};
if(isnil "DynamicVehicleArea") then {
DynamicVehicleArea = dayz_MapArea / 2;
};
 
// Get all buildings and roads only once TODO: set variables to nil after done if nessicary 
MarkerPosition = getMarkerPos "center";
RoadList = MarkerPosition nearRoads DynamicVehicleArea;
 
// Very taxing !!! but only on first startup
BuildingList = [];
{
if (DZE_MissionLootTable) then {
if (isClass (missionConfigFile >> "CfgBuildingLoot" >> (typeOf _x))) then
{
BuildingList set [count BuildingList,_x];
};
} else {
if (isClass (configFile >> "CfgBuildingLoot" >> (typeOf _x))) then
{
BuildingList set [count BuildingList,_x];
};
};
 
 
} forEach (MarkerPosition nearObjects ["building",DynamicVehicleArea]);
 
spawn_vehicles = {
private ["_random","_lastIndex","_weights","_index","_vehicle","_velimit","_qty","_isAir","_isShip","_position","_dir","_istoomany","_veh","_objPosition","_marker","_iClass","_itemTypes","_cntWeights","_itemType","_num","_allCfgLoots"];
 
if (!isDedicated) exitWith { }; //Be sure the run this
 
while {count AllowedVehiclesList > 0} do {
// BIS_fnc_selectRandom replaced because the index may be needed to remove the element
_index = floor random count AllowedVehiclesList;
_random = AllowedVehiclesList select _index;
 
_vehicle = _random select 0;
_velimit = _random select 1;
 
_qty = {_x == _vehicle} count serverVehicleCounter;
 
// If under limit allow to proceed
if (_qty <= _velimit) exitWith {};
 
// vehicle limit reached, remove vehicle from list
// since elements cannot be removed from an array, overwrite it with the last element and cut the last element of (as long as order is not important)
_lastIndex = (count AllowedVehiclesList) - 1;
if (_lastIndex != _index) then {
AllowedVehiclesList set [_index, AllowedVehiclesList select _lastIndex];
};
AllowedVehiclesList resize _lastIndex;
};
 
if (count AllowedVehiclesList == 0) then {
diag_log("DEBUG: unable to find suitable vehicle to spawn");
} else {
 
// add vehicle to counter for next pass
serverVehicleCounter set [count serverVehicleCounter,_vehicle];
 
// Find Vehicle Type to better control spawns
_isAir = _vehicle isKindOf "Air";
_isShip = _vehicle isKindOf "Ship";
 
if(_isShip || _isAir) then {
if(_isShip) then {
// Spawn anywhere on coast on water
waitUntil{!isNil "BIS_fnc_findSafePos"};
_position = [MarkerPosition,0,DynamicVehicleArea,10,1,2000,1] call BIS_fnc_findSafePos;
//diag_log("DEBUG: spawning boat near coast " + str(_position));
} else {
// Spawn air anywhere that is flat
waitUntil{!isNil "BIS_fnc_findSafePos"};
_position = [MarkerPosition,0,DynamicVehicleArea,10,0,2000,0] call BIS_fnc_findSafePos;
//diag_log("DEBUG: spawning air anywhere flat " + str(_position));
};
 
 
} else {
// Spawn around buildings and 50% near roads
if((random 1) > 0.5) then {
 
waitUntil{!isNil "BIS_fnc_selectRandom"};
_position = RoadList call BIS_fnc_selectRandom;
 
_position = _position modelToWorld [0,0,0];
 
waitUntil{!isNil "BIS_fnc_findSafePos"};
_position = [_position,0,10,10,0,2000,0] call BIS_fnc_findSafePos;
 
//diag_log("DEBUG: spawning near road " + str(_position));
 
} else {
 
waitUntil{!isNil "BIS_fnc_selectRandom"};
_position = BuildingList call BIS_fnc_selectRandom;
 
_position = _position modelToWorld [0,0,0];
 
waitUntil{!isNil "BIS_fnc_findSafePos"};
_position = [_position,0,40,5,0,2000,0] call BIS_fnc_findSafePos;
 
//diag_log("DEBUG: spawning around buildings " + str(_position));
 
};
};
// only proceed if two params otherwise BIS_fnc_findSafePos failed and may spawn in air
if ((count _position) == 2) then { 
 
_dir = round(random 180);
 
_istoomany = _position nearObjects ["AllVehicles",50];
if((count _istoomany) > 0) exitWith { diag_log("DEBUG: Too many vehicles at " + str(_position)); };
 
//place vehicle 
_veh = createVehicle [_vehicle, _position, [], 0, "CAN_COLLIDE"];
_veh setdir _dir;
_veh setpos _position;
 
if(DZEdebug) then {
_marker = createMarker [str(_position) , _position];
_marker setMarkerShape "ICON";
_marker setMarkerType "DOT";
_marker setMarkerText _vehicle;
};
 
// Get position with ground
_objPosition = getPosATL _veh;
 
clearWeaponCargoGlobal  _veh;
clearMagazineCargoGlobal  _veh;
// _veh setVehicleAmmo DZE_vehicleAmmo;
 
// Add 0-3 loots to vehicle using random cfgloots 
_num = floor(random 4);
_allCfgLoots = ["trash","civilian","food","generic","medical","military","policeman","hunter","worker","clothes","militaryclothes","specialclothes","trash"];
 
for "_x" from 1 to _num do {
_iClass = _allCfgLoots call BIS_fnc_selectRandom;
 
_itemTypes = [];
if (DZE_MissionLootTable) then {
_itemTypes = ((getArray (missionConfigFile >> "cfgLoot" >> _iClass)) select 0);
} else {
_itemTypes = ((getArray (configFile >> "cfgLoot" >> _iClass)) select 0);
};
 
_index = dayz_CLBase find _iClass;
_weights = dayz_CLChances select _index;
_cntWeights = count _weights;
 
_index = floor(random _cntWeights);
_index = _weights select _index;
_itemType = _itemTypes select _index;
_veh addMagazineCargoGlobal [_itemType,1];
//diag_log("DEBUG: spawed loot inside vehicle " + str(_itemType));
};
 
[_veh,[_dir,_objPosition],_vehicle,true,"0"] call server_publishVeh;
};
};
};
 
spawn_ammosupply = {
private ["_position","_veh","_istoomany","_marker","_spawnveh","_WreckList"];
if (isDedicated) then {
_WreckList = ["Supply_Crate_DZE"];
waitUntil{!isNil "BIS_fnc_selectRandom"};
_position = RoadList call BIS_fnc_selectRandom;
_position = _position modelToWorld [0,0,0];
waitUntil{!isNil "BIS_fnc_findSafePos"};
_position = [_position,5,20,5,0,2000,0] call BIS_fnc_findSafePos;
if ((count _position) == 2) then {
 
_istoomany = _position nearObjects ["All",5];
 
if((count _istoomany) > 0) exitWith { diag_log("DEBUG VEIN: Too many at " + str(_position)); };
 
_spawnveh = _WreckList call BIS_fnc_selectRandom;
 
if(DZEdebug) then {
_marker = createMarker [str(_position) , _position];
_marker setMarkerShape "ICON";
_marker setMarkerType "DOT";
_marker setMarkerText str(_spawnveh);
};
 
_veh = createVehicle [_spawnveh,_position, [], 0, "CAN_COLLIDE"];
_veh enableSimulation false;
_veh setDir round(random 360);
_veh setpos _position;
_veh setVariable ["ObjectID","1",true];
};
};
};
 
DZE_LocalRoadBlocks = [];
 
spawn_roadblocks = {
private ["_position","_veh","_istoomany","_marker","_spawnveh","_WreckList"];
_WreckList = ["SKODAWreck","HMMWVWreck","UralWreck","datsun01Wreck","hiluxWreck","datsun02Wreck","UAZWreck","Land_Misc_Garb_Heap_EP1","Fort_Barricade_EP1","Rubbish2"];
 
waitUntil{!isNil "BIS_fnc_selectRandom"};
if (isDedicated) then {
 
_position = RoadList call BIS_fnc_selectRandom;
 
_position = _position modelToWorld [0,0,0];
 
waitUntil{!isNil "BIS_fnc_findSafePos"};
_position = [_position,0,10,5,0,2000,0] call BIS_fnc_findSafePos;
 
if ((count _position) == 2) then {
// Get position with ground
 
_istoomany = _position nearObjects ["All",5];
 
if((count _istoomany) > 0) exitWith { diag_log("DEBUG: Too many at " + str(_position)); };
 
waitUntil{!isNil "BIS_fnc_selectRandom"};
_spawnveh = _WreckList call BIS_fnc_selectRandom;
 
if(DZEdebug) then {
_marker = createMarker [str(_position) , _position];
_marker setMarkerShape "ICON";
_marker setMarkerType "DOT";
_marker setMarkerText str(_spawnveh);
};
 
_veh = createVehicle [_spawnveh,_position, [], 0, "CAN_COLLIDE"];
_veh enableSimulation false;
 
_veh setDir round(random 360); // Randomize placement a bit
_veh setpos _position;
 
_veh setVariable ["ObjectID","1",true];
};
 
};
 
};
 
spawn_mineveins = {
private ["_position","_veh","_istoomany","_marker","_spawnveh","_positions"];
 
if (isDedicated) then {
 
_position = [getMarkerPos "center",0,(HeliCrashArea*0.75),10,0,2000,0] call BIS_fnc_findSafePos;
 
if ((count _position) == 2) then {
 
_positions = selectBestPlaces [_position, 500, "(1 + forest) * (1 + hills) * (1 - houses) * (1 - sea)", 10, 5];
 
_position = (_positions call BIS_fnc_selectRandom) select 0;
 
// Get position with ground
_istoomany = _position nearObjects ["All",10];
 
if((count _istoomany) > 0) exitWith { diag_log("DEBUG VEIN: Too many objects at " + str(_position)); };
 
if(isOnRoad _position) exitWith { diag_log("DEBUG VEIN: on road " + str(_position)); };
 
_spawnveh = ["Iron_Vein_DZE","Iron_Vein_DZE","Iron_Vein_DZE","Iron_Vein_DZE","Iron_Vein_DZE","Silver_Vein_DZE","Silver_Vein_DZE","Silver_Vein_DZE","Gold_Vein_DZE","Gold_Vein_DZE"] call BIS_fnc_selectRandom;
 
if(DZEdebug) then {
_marker = createMarker [str(_position) , _position];
_marker setMarkerShape "ICON";
_marker setMarkerType "DOT";
_marker setMarkerText str(_spawnveh);
};
 
//diag_log("DEBUG: Spawning a crashed " + _spawnveh + " with " + _spawnloot + " at " + str(_position));
_veh = createVehicle [_spawnveh,_position, [], 0, "CAN_COLLIDE"];
_veh enableSimulation false;
 
// Randomize placement a bit
_veh setDir round(random 360);
_veh setpos _position;
 
_veh setVariable ["ObjectID","1",true];
 
 
};
};
};
 
if(isnil "DynamicVehicleDamageLow") then {
DynamicVehicleDamageLow = 0;
};
if(isnil "DynamicVehicleDamageHigh") then {
DynamicVehicleDamageHigh = 100;
};
 
if(isnil "DynamicVehicleFuelLow") then {
DynamicVehicleFuelLow = 0;
};
if(isnil "DynamicVehicleFuelHigh") then {
DynamicVehicleFuelHigh = 100;
};
 
if(isnil "DZE_DiagFpsSlow") then {
DZE_DiagFpsSlow = false;
};
if(isnil "DZE_DiagFpsFast") then {
DZE_DiagFpsFast = false;
};
if(isnil "DZE_DiagVerbose") then {
DZE_DiagVerbose = false;
};
 
dze_diag_fps = {
if(DZE_DiagVerbose) then {
diag_log format["DEBUG FPS : %1 OBJECTS: %2 : PLAYERS: %3", diag_fps,(count (allMissionObjects "")),(playersNumber west)];
} else {
diag_log format["DEBUG FPS : %1", diag_fps];
};
};
 
// Damage generator function
generate_new_damage = {
private ["_damage"];
    _damage = ((random(DynamicVehicleDamageHigh-DynamicVehicleDamageLow))+DynamicVehicleDamageLow) / 100;
_damage;
};
 
// Damage generator fuction
generate_exp_damage = {
private ["_damage"];
    _damage = ((random(DynamicVehicleDamageHigh-DynamicVehicleDamageLow))+DynamicVehicleDamageLow) / 100;
 
// limit this to 85% since vehicle would blow up otherwise.
//if(_damage >= 0.85) then {
// _damage = 0.85;
//};
_damage;
};
 
server_getDiff = {
private["_variable","_object","_vNew","_vOld","_result"];
_variable = _this select 0;
_object = _this select 1;
_vNew = _object getVariable[_variable,0];
_vOld = _object getVariable[(_variable + "_CHK"),_vNew];
_result = 0;
if (_vNew < _vOld) then {
//JIP issues
_vNew = _vNew + _vOld;
_object getVariable[(_variable + "_CHK"),_vNew];
} else {
_result = _vNew - _vOld;
_object setVariable[(_variable + "_CHK"),_vNew];
};
_result
};
 
server_getDiff2 = {
private["_variable","_object","_vNew","_vOld","_result"];
_variable = _this select 0;
_object = _this select 1;
_vNew = _object getVariable[_variable,0];
_vOld = _object getVariable[(_variable + "_CHK"),_vNew];
_result = _vNew - _vOld;
_object setVariable[(_variable + "_CHK"),_vNew];
_result
};
 
dayz_objectUID = {
private["_position","_dir","_key","_object"];
_object = _this;
_position = getPosATL _object;
_dir = direction _object;
_key = [_dir,_position] call dayz_objectUID2;
    _key
};
 
dayz_objectUID2 = {
private["_position","_dir","_key"];
_dir = _this select 0;
_key = "";
_position = _this select 1;
{
_x = _x * 10;
if ( _x < 0 ) then { _x = _x * -10 };
_key = _key + str(round(_x));
} forEach _position;
_key = _key + str(round(_dir));
_key
};
 
dayz_objectUID3 = {
private["_position","_dir","_key"];
_dir = _this select 0;
_key = "";
_position = _this select 1;
{
_x = _x * 10;
if ( _x < 0 ) then { _x = _x * -10 };
_key = _key + str(round(_x));
} forEach _position;
_key = _key + str(round(_dir + time));
_key
};
 
dayz_recordLogin = {
private["_key"];
_key = format["CHILD:103:%1:%2:%3:",_this select 0,_this select 1,_this select 2];
_key call server_hiveWrite;
};
 
dayz_perform_purge = {
if(!isNull(_this)) then {
_this removeAllMPEventHandlers "mpkilled";
_this removeAllMPEventHandlers "mphit";
_this removeAllMPEventHandlers "mprespawn";
_this removeAllEventHandlers "FiredNear";
_this removeAllEventHandlers "HandleDamage";
_this removeAllEventHandlers "Killed";
_this removeAllEventHandlers "Fired";
_this removeAllEventHandlers "GetOut";
_this removeAllEventHandlers "GetIn";
_this removeAllEventHandlers "Local";
clearVehicleInit _this;
deleteVehicle _this;
deleteGroup (group _this);
};
};
 
dayz_perform_purge_player = {
 
private ["_countr","_backpack","_backpackType","_backpackWpn","_backpackMag","_objWpnTypes","_objWpnQty","_location","_dir","_holder","_weapons","_magazines"];
    diag_log ("Purging player: " + str(_this));
 
if(!isNull(_this)) then {
 
_location = getPosATL _this;
_dir = getDir _this;
 
_holder = createVehicle ["GraveDZE", _location, [], 0, "CAN_COLLIDE"];
_holder setDir _dir;
_holder setPosATL _location;
 
_holder enableSimulation false;
 
_weapons = weapons _this;
_magazines = magazines _this;
 
// find backpack
if(!(isNull unitBackpack _this)) then {
_backpack = unitBackpack _this;
_backpackType = typeOf _backpack;
_backpackWpn = getWeaponCargo _backpack;
_backpackMag = getMagazineCargo _backpack;
 
_holder addBackpackCargoGlobal [_backpackType,1];
 
// add items from backpack 
_objWpnTypes = _backpackWpn select 0;
_objWpnQty = _backpackWpn select 1;
_countr = 0;
{
_holder addWeaponCargoGlobal [_x,(_objWpnQty select _countr)];
_countr = _countr + 1;
} forEach _objWpnTypes;
 
// add backpack magazine items
_objWpnTypes = _backpackMag select 0;
_objWpnQty = _backpackMag select 1;
_countr = 0;
{
_holder addMagazineCargoGlobal [_x,(_objWpnQty select _countr)];
_countr = _countr + 1;
} forEach _objWpnTypes;
};
};
 
// add weapons
_holder addWeaponCargoGlobal [_x, 1];
} forEach _weapons;
 
// add mags
_holder addMagazineCargoGlobal [_x, 1];
} forEach _magazines;
 
_this removeAllMPEventHandlers "mpkilled";
_this removeAllMPEventHandlers "mphit";
_this removeAllMPEventHandlers "mprespawn";
_this removeAllEventHandlers "FiredNear";
_this removeAllEventHandlers "HandleDamage";
_this removeAllEventHandlers "Killed";
_this removeAllEventHandlers "Fired";
_this removeAllEventHandlers "GetOut";
_this removeAllEventHandlers "GetIn";
_this removeAllEventHandlers "Local";
clearVehicleInit _this;
deleteVehicle _this;
deleteGroup (group _this);
//  _this = nil;
};
 
 
dayz_removePlayerOnDisconnect = {
if(!isNull(_this)) then {
_this removeAllMPEventHandlers "mphit";
deleteVehicle _this;
deleteGroup (group _this);
};
};
 
server_timeSync = {
//Send request
private ["_hour","_minute","_date","_key","_result","_outcome"];
    _key = "CHILD:307:";
_result = _key call server_hiveReadWrite;
_outcome = _result select 0;
if(_outcome == "PASS") then {
_date = _result select 1; 
 
if(dayz_fullMoonNights) then {
_hour = _date select 3;
_minute = _date select 4;
//Force full moon nights
_date = [2013,8,3,_hour,_minute];
};
 
setDate _date;
PVDZE_plr_SetDate = _date;
publicVariable "PVDZE_plr_SetDate";
diag_log ("TIME SYNC: Local Time set to " + str(_date));
};
};
 
// must spawn these 
server_spawncleanDead = {
private ["_deathTime","_delQtyZ","_delQtyP","_qty","_allDead"];
_allDead = allDead;
_delQtyZ = 0;
_delQtyP = 0;
{
if (local _x) then {
if (_x isKindOf "zZombie_Base") then
{
_x call dayz_perform_purge;
sleep 0.05;
_delQtyZ = _delQtyZ + 1;
} else {
if (_x isKindOf "CAManBase") then {
_deathTime = _x getVariable ["processedDeath", diag_tickTime];
if (diag_tickTime - _deathTime > 1800) then {
_x call dayz_perform_purge_player;
sleep 0.025;
_delQtyP = _delQtyP + 1;
};
};
};
};
sleep 0.025;
} forEach _allDead;
if (_delQtyZ > 0 or _delQtyP > 0) then {
_qty = count _allDead;
diag_log (format["CLEANUP: Deleted %1 players and %2 zombies out of %3 dead",_delQtyP,_delQtyZ,_qty]);
};
};
server_cleanupGroups = {
if (DZE_DYN_AntiStuck3rd > 3) then { DZE_DYN_GroupCleanup = nil; DZE_DYN_AntiStuck3rd = 0; };
if(!isNil "DZE_DYN_GroupCleanup") exitWith {  DZE_DYN_AntiStuck3rd = DZE_DYN_AntiStuck3rd + 1;};
DZE_DYN_GroupCleanup = true;
{
if (count units _x == 0) then {
deleteGroup _x;
};
sleep 0.001;
} forEach allGroups;
DZE_DYN_GroupCleanup = nil;
};
 
server_checkHackers = {
if (DZE_DYN_AntiStuck2nd > 3) then { DZE_DYN_HackerCheck = nil; DZE_DYN_AntiStuck2nd = 0; };
if(!isNil "DZE_DYN_HackerCheck") exitWith {  DZE_DYN_AntiStuck2nd = DZE_DYN_AntiStuck2nd + 1;};
DZE_DYN_HackerCheck = true;
{
if(vehicle _x != _x && !(vehicle _x in PVDZE_serverObjectMonitor) && (isPlayer _x)  && !((typeOf vehicle _x) in DZE_safeVehicle)) then {
diag_log ("CLEANUP: KILLING A HACKER " + (name _x) + " " + str(_x) + " IN " + (typeOf vehicle _x));
(vehicle _x) setDamage 1;
_x setDamage 1;
sleep 0.25;
};
sleep 0.001;
} forEach allUnits;
DZE_DYN_HackerCheck = nil;
};
 
server_spawnCleanFire = {
private ["_delQtyFP","_qty","_delQtyNull","_missionFires"];
_missionFires = allMissionObjects "Land_Fire_DZ";
_delQtyFP = 0;
{
if (local _x) then {
deleteVehicle _x;
sleep 0.025;
_delQtyFP = _delQtyFP + 1;
};
sleep 0.001;
} forEach _missionFires;
if (_delQtyFP > 0) then {
_qty = count _missionFires;
diag_log (format["CLEANUP: Deleted %1 fireplaces out of %2",_delQtyNull,_qty]);
};
};
server_spawnCleanLoot = {
private ["_created","_delQty","_nearby","_age","_keep","_qty","_missionObjs","_dateNow"];
if (DZE_DYN_AntiStuck > 3) then { DZE_DYN_cleanLoot = nil; DZE_DYN_AntiStuck = 0; };
if(!isNil "DZE_DYN_cleanLoot") exitWith {  DZE_DYN_AntiStuck = DZE_DYN_AntiStuck + 1;};
DZE_DYN_cleanLoot = true;
 
_missionObjs =  allMissionObjects "ReammoBox";
_delQty = 0;
_dateNow = (DateToNumber date);
{
_keep = _x getVariable ["permaLoot",false];
if (!_keep) then {
_created = _x getVariable ["created",-0.1];
if (_created == -0.1) then {
_x setVariable ["created",_dateNow,false];
_created = _dateNow;
} else {
_age = (_dateNow - _created) * 525948;
if (_age > 20) then {
_nearby = {(isPlayer _x) and (alive _x)} count (_x nearEntities [["CAManBase","AllVehicles"], 130]);
if (_nearby==0) then {
deleteVehicle _x;
sleep 0.025;
_delQty = _delQty + 1;
};
};
};
};
sleep 0.001;
} forEach _missionObjs;
if (_delQty > 0) then {
_qty = count _missionObjs;
diag_log (format["CLEANUP: Deleted %1 Loot Piles out of %2",_delQty,_qty]);
};
DZE_DYN_cleanLoot = nil;
};
 
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) and (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;
} forEach _missonAnimals;
if (_delQtyAnimal > 0) then {
_qty = count _missonAnimals;
diag_log (format["CLEANUP: Deleted %1 Animals out of %2",_delQtyAnimal,_qty]);
};
};
 
server_getLocalObjVars = {
private ["_player","_obj","_objectID","_objectUID","_weapons","_magazines","_backpacks"];
 
_player = _this select 0;
_obj = _this select 1;
 
_objectID = _obj getVariable["ObjectID","0"];
_objectUID = _obj getVariable["ObjectUID","0"];
 
_weapons = _obj getVariable ["WeaponCargo", false];
_magazines = _obj getVariable ["MagazineCargo", false];
_backpacks = _obj getVariable ["BackpackCargo", false];
 
PVDZE_localVarsResult = [_weapons,_magazines,_backpacks];
(owner _player) publicVariableClient "PVDZE_localVarsResult";
 
diag_log format["SAFE UNLOCKED: ID:%1 UID:%2 BY %3(%4)", _objectID, _objectUID, (name _player), (getPlayerUID _player)];
};
 
server_setLocalObjVars = {
private ["_obj","_holder","_weapons","_magazines","_backpacks","_player","_objectID","_objectUID"];
 
_obj = _this select 0;
_holder = _this select 1;
_player = _this select 2;
 
_objectID = _obj getVariable["ObjectID","0"];
_objectUID = _obj getVariable["ObjectUID","0"];
 
_weapons = getWeaponCargo _obj;
_magazines = getMagazineCargo _obj;
_backpacks = getBackpackCargo _obj;
 
deleteVehicle _obj;
 
_holder setVariable ["WeaponCargo", _weapons];
_holder setVariable ["MagazineCargo", _magazines];
_holder setVariable ["BackpackCargo", _backpacks];
 
diag_log format["SAFE LOCKED: ID:%1 UID:%2 BY %3(%4)", _objectID, _objectUID, (name _player), (getPlayerUID _player)];
};
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...