Jamrock Posted September 27, 2016 Report Share Posted September 27, 2016 Is it the humanity or that i am admin or is it the Namalsk map size? Link to comment Share on other sites More sharing options...
juandayz Posted September 27, 2016 Report Share Posted September 27, 2016 3 hours ago, Jamrock said: Is it the humanity or that i am admin or is it the Namalsk map size? if ure in _admin variable then most wanted script skip you as fugitive try put a double check,,,and get out your ID from Most wanted _admins variable also you will need your humanity amount less than 800. Spoiler PlayerHumanity = (player getVariable"humanity"); donn_fugitiveChoose = { _fugitive = objNull; _maxSumDist = -1; { _p = _x; _pP = position _x; _pPX = _pP select 0; _pPY = _pP select 1; if (_pPx > 0 && _pPY < _mapSize) then { if (damage _p < 0.2 && vehicle _p == _p) then { if (count (_p nearObjects ["Plastic_Pole_EP1_DZ",(DZE_PlotPole select 0)*1.25]) == 0) then { _pUID = getPlayerUID _p; if !(_pUID in _admins || _pUID in _lockedFugitives ) then { if (PlayerHumanity < 800) then { _sumDist = 0; {_sumDist = _sumDist + (_p distance _x);} forEach playableUnits; if (_sumDist > _maxSumDist) then {_fugitive = _p;_maxSumDist = _sumDist;}; }; }; }; }; }; } forEach playableUnits; _fugitive }; Link to comment Share on other sites More sharing options...
Jamrock Posted September 29, 2016 Report Share Posted September 29, 2016 On 27.09.2016 at 11:20 PM, juandayz said: if ure in _admin variable then most wanted script skip you as fugitive try put a double check,,,and get out your ID from Most wanted _admins variable also you will need your humanity amount less than 800. Hide contents PlayerHumanity = (player getVariable"humanity"); donn_fugitiveChoose = { _fugitive = objNull; _maxSumDist = -1; { _p = _x; _pP = position _x; _pPX = _pP select 0; _pPY = _pP select 1; if (_pPx > 0 && _pPY < _mapSize) then { if (damage _p < 0.2 && vehicle _p == _p) then { if (count (_p nearObjects ["Plastic_Pole_EP1_DZ",(DZE_PlotPole select 0)*1.25]) == 0) then { _pUID = getPlayerUID _p; if !(_pUID in _admins || _pUID in _lockedFugitives ) then { if (PlayerHumanity < 800) then { _sumDist = 0; {_sumDist = _sumDist + (_p distance _x);} forEach playableUnits; if (_sumDist > _maxSumDist) then {_fugitive = _p;_maxSumDist = _sumDist;}; }; }; }; }; }; } forEach playableUnits; _fugitive }; Ok ive changed it now to if !(_pUID in _admins || _pUID in _lockedFugitives ) then { if (PlayerHumanity < 800) then { _sumDist = 0; {_sumDist = _sumDist + (_p distance _x);} forEach playableUnits; if (_sumDist > _maxSumDist) then {_fugitive = _p;_maxSumDist = _sumDist;}; }; }; Im not in the adminlist : ["0"] My Humanity is around -40k juandayz 1 Link to comment Share on other sites More sharing options...
Jamrock Posted September 29, 2016 Report Share Posted September 29, 2016 So i get this error in arma2oa.rpt log: 2016/09/29, 11:46:00 Error in expression < _pUID in _lockedFugitives ) then { if (PlayerHumanity < 800) then { _sumDist = > 2016/09/29, 11:46:00 Error position: <PlayerHumanity < 800) then { _sumDist = > 2016/09/29, 11:46:00 Error Undefined variable in expression: playerhumanity 2016/09/29, 11:46:00 File z\addons\dayz_server\andre_most_wanted.sqf, line 78 2016/09/29, 11:46:00 Error in expression < _pUID in _lockedFugitives ) then { if (PlayerHumanity < 800) then { _sumDist = > 2016/09/29, 11:46:00 Error position: <PlayerHumanity < 800) then { _sumDist = > 2016/09/29, 11:46:00 Error Undefined variable in expression: playerhumanity 2016/09/29, 11:46:00 File z\addons\dayz_server\andre_most_wanted.sqf, line 78 2016/09/29, 11:46:00 "[MOSTWA] Cant find an elegible fugitive..." Link to comment Share on other sites More sharing options...
Jamrock Posted September 29, 2016 Report Share Posted September 29, 2016 So what about changing this: if !(_pUID in _admins || _pUID in _lockedFugitives ) then { if (PlayerHumanity < 800) then { _sumDist = 0; {_sumDist = _sumDist + (_p distance _x);} forEach playableUnits; if (_sumDist > _maxSumDist) then {_fugitive = _p;_maxSumDist = _sumDist;}; }; }; to _humanity = (player getVariable "humanity"); if (!(_pUID in _admins || _pUID in _lockedFugitives ) || (_humanity < 800)) then { _sumDist = 0; {_sumDist = _sumDist + (_p distance _x);} forEach playableUnits; if (_sumDist > _maxSumDist) then {_fugitive = _p;_maxSumDist = _sumDist;}; }; AND IT KEEPS saying 2016/09/29, 12:30:48 "[MOSTWA] Cant find an elegible fugitive..." Link to comment Share on other sites More sharing options...
juandayz Posted September 29, 2016 Report Share Posted September 29, 2016 1 hour ago, Jamrock said: So what about changing this: if !(_pUID in _admins || _pUID in _lockedFugitives ) then { if (PlayerHumanity < 800) then { _sumDist = 0; {_sumDist = _sumDist + (_p distance _x);} forEach playableUnits; if (_sumDist > _maxSumDist) then {_fugitive = _p;_maxSumDist = _sumDist;}; }; }; to _humanity = (player getVariable "humanity"); if (!(_pUID in _admins || _pUID in _lockedFugitives ) || (_humanity < 800)) then { _sumDist = 0; {_sumDist = _sumDist + (_p distance _x);} forEach playableUnits; if (_sumDist > _maxSumDist) then {_fugitive = _p;_maxSumDist = _sumDist;}; }; AND IT KEEPS saying 2016/09/29, 12:30:48 "[MOSTWA] Cant find an elegible fugitive..." this is not easy than i was think :D Spoiler donn_fugitiveChoose = { _fugitive = objNull; _maxSumDist = -1; { _p = _x; _pP = position _x; _pPX = _pP select 0; _pPY = _pP select 1; if (_pPx > 0 && _pPY < _mapSize) then { if (damage _p < 0.2 && vehicle _p == _p) then { if (count (_p nearObjects ["Plastic_Pole_EP1_DZ",(DZE_PlotPole select 0)*1.25]) == 0) then { _pUID = getPlayerUID _p; _Humanity = (_p getVariable"humanity"); if !(_pUID in _admins || _pUID in _lockedFugitives || (_Humanity > 800)) then { _sumDist = 0; {_sumDist = _sumDist + (_p distance _x);} forEach playableUnits; if (_sumDist > _maxSumDist) then {_fugitive = _p;_maxSumDist = _sumDist;}; }; }; }; }; } forEach playableUnits; _fugitive }; Link to comment Share on other sites More sharing options...
Jamrock Posted September 29, 2016 Report Share Posted September 29, 2016 2 hours ago, juandayz said: this is not easy than i was think :D Hide contents donn_fugitiveChoose = { _fugitive = objNull; _maxSumDist = -1; { _p = _x; _pP = position _x; _pPX = _pP select 0; _pPY = _pP select 1; if (_pPx > 0 && _pPY < _mapSize) then { if (damage _p < 0.2 && vehicle _p == _p) then { if (count (_p nearObjects ["Plastic_Pole_EP1_DZ",(DZE_PlotPole select 0)*1.25]) == 0) then { _pUID = getPlayerUID _p; _Humanity = (_p getVariable"humanity"); if !(_pUID in _admins || _pUID in _lockedFugitives || (_Humanity > 800)) then { _sumDist = 0; {_sumDist = _sumDist + (_p distance _x);} forEach playableUnits; if (_sumDist > _maxSumDist) then {_fugitive = _p;_maxSumDist = _sumDist;}; }; }; }; }; } forEach playableUnits; _fugitive }; So if i do it like this it works? Link to comment Share on other sites More sharing options...
juandayz Posted September 29, 2016 Report Share Posted September 29, 2016 @Jamrock i dont know if works or not since i cant test, sory :) any way scripting in some cases is about fail and try 1.000.000 times :D Link to comment Share on other sites More sharing options...
Jamrock Posted September 29, 2016 Report Share Posted September 29, 2016 3 minutes ago, juandayz said: @Jamrock i dont know if works or not since i cant test, sory :) any way scripting in some cases is about fail and try 1.000.000 times :D that doesnt help me though. Link to comment Share on other sites More sharing options...
juandayz Posted September 29, 2016 Report Share Posted September 29, 2016 9 minutes ago, Jamrock said: that doesnt help me though. just make the change and try,, its for you, not for me :) and i dnt have my test server at this time so cannot test it for you.. sory jamrock :) maybe @Donnovan can help you better than me, he is the designer of the mod. Link to comment Share on other sites More sharing options...
Jamrock Posted September 29, 2016 Report Share Posted September 29, 2016 2 hours ago, juandayz said: just make the change and try,, its for you, not for me :) and i dnt have my test server at this time so cannot test it for you.. sory jamrock :) maybe @Donnovan can help you better than me, he is the designer of the mod. maybe define sth with private ["_humanity"] on top ? Link to comment Share on other sites More sharing options...
Jamrock Posted October 4, 2016 Report Share Posted October 4, 2016 Any fixes 2016/10/04, 10:54:41 "CLEANUP: KILLING A HACKER Jam B 1-1-B:1 (Jam) REMOTE IN CSJ_GyroC" fixed it. nvm Link to comment Share on other sites More sharing options...
Saije Posted January 28, 2017 Report Share Posted January 28, 2017 @Jamrock hey what is the fix? i am having this issue when spawning vehicles with infistar =( On 2016-10-04 at 3:04 AM, Jamrock said: Any fixes 2016/10/04, 10:54:41 "CLEANUP: KILLING A HACKER Jam B 1-1-B:1 (Jam) REMOTE IN CSJ_GyroC" fixed it. nvm Link to comment Share on other sites More sharing options...
Jamrock Posted February 1, 2017 Report Share Posted February 1, 2017 On 28.1.2017 at 6:00 PM, Saije said: @Jamrock hey what is the fix? i am having this issue when spawning vehicles with infistar =( You need to unpack ur dayz_server.pbo Then you need to open up the server_cleanup.fsm, i recommend notepad++. search for: Check for hackers and the Code should look sth like this: "//Check for hackers" \n " {" \n " if(vehicle _x != _x && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"") then {" \n " diag_log (""CLEANUP: KILLING A HACKER "" + (name _x) + "" "" + str(_x) + "" IN "" + (typeOf vehicle _x));" \n " (vehicle _x) setDamage 1;" \n " _x setDamage 1;" \n " };" \n " } forEach allUnits;" \n "" \n "/*" \n If you cant find it search just for "hackers" Should find this: spawn server_checkHackers; If so, open up the server_funktions.sqf and search for: "server_checkHackers" Should find something like this: 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 (!((isNil "_x") || {(isNull _x)})) then { 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; } count allUnits; DZE_DYN_HackerCheck = nil; }; You can now try to comment the line in the server_cleanup.fsm or server_functions.sqf out. Gl and let me know if it worked. Link to comment Share on other sites More sharing options...
Saije Posted February 1, 2017 Report Share Posted February 1, 2017 @Jamrock I forget what I did, but I fixed it a while back. will look to see if It was the same as yours. Link to comment Share on other sites More sharing options...
Saije Posted February 1, 2017 Report Share Posted February 1, 2017 looks like that is the fix I did. Link to comment Share on other sites More sharing options...
Jamrock Posted February 1, 2017 Report Share Posted February 1, 2017 @Saije Alright man. That's awesome to hear! Link to comment Share on other sites More sharing options...
Jamrock Posted February 1, 2017 Report Share Posted February 1, 2017 Just now, Saije said: looks like that is the fix I did. @Saije See it is not that hard as expected :) Link to comment Share on other sites More sharing options...
Vendetta5555 Posted August 15, 2021 Report Share Posted August 15, 2021 Hello. Can anyone help with a solution?) Version 1.0.7 Error in expression <(_p nearObjects ["Plastic_Pole_EP1_DZ",(DZE_PlotPole select 0)*1.25]) == 0) then> 13:20:18 Error position: <DZE_PlotPole select 0)*1.25]) == 0) then> 13:20:18 Error Undefined variable in expression: dze_plotpole 13:20:18 File z\addons\dayz_server\modules\mostwanted.sqf, line 71 Error in expression <tive nearObjects ["Plastic_Pole_EP1_DZ",DZE_PlotPole select 0]; _inSafe = false;> 13:24:19 Error position: <DZE_PlotPole select 0]; _inSafe = false;> 13:24:19 Error Undefined variable in expression: dze_plotpole 13:24:19 File z\addons\dayz_server\modules\mostwanted.sqf, line 137 13:24:59 Error in expression <tive nearObjects ["Plastic_Pole_EP1_DZ",DZE_PlotPole select 0]; _inSafe = false;> 13:24:59 Error position: <DZE_PlotPole select 0]; _inSafe = false;> 13:24:59 Error Undefined variable in expression: dze_plotpole 13:24:59 File z\addons\dayz_server\modules\mostwanted.sqf, line 156 Link to comment Share on other sites More sharing options...
Reaper5150 Posted August 15, 2021 Report Share Posted August 15, 2021 3 hours ago, Vendetta5555 said: Hello. Can anyone help with a solution?) Version 1.0.7 Error in expression <(_p nearObjects ["Plastic_Pole_EP1_DZ",(DZE_PlotPole select 0)*1.25]) == 0) then> 13:20:18 Error position: <DZE_PlotPole select 0)*1.25]) == 0) then> 13:20:18 Error Undefined variable in expression: dze_plotpole 13:20:18 File z\addons\dayz_server\modules\mostwanted.sqf, line 71 Error in expression <tive nearObjects ["Plastic_Pole_EP1_DZ",DZE_PlotPole select 0]; _inSafe = false;> 13:24:19 Error position: <DZE_PlotPole select 0]; _inSafe = false;> 13:24:19 Error Undefined variable in expression: dze_plotpole 13:24:19 File z\addons\dayz_server\modules\mostwanted.sqf, line 137 13:24:59 Error in expression <tive nearObjects ["Plastic_Pole_EP1_DZ",DZE_PlotPole select 0]; _inSafe = false;> 13:24:59 Error position: <DZE_PlotPole select 0]; _inSafe = false;> 13:24:59 Error Undefined variable in expression: dze_plotpole 13:24:59 File z\addons\dayz_server\modules\mostwanted.sqf, line 156 Try this one! Tested and working :) //=============================== // ANDRE MOST WANTED SCRIPT ===== //=============================== // By Donnovan ================== //=============================== //==================== // CONFIGURATION ===== //==================== //MAP SIZE TO PREVENT THE LOGING IN PLAYERS TO BE SELECTED AS FUGITIVE _mapSize = 15360; //READY FOR CHERNARUS //THE TIME THE FUGITIVE NEED TO RESIST ALIVE TO WIN *IN MINUTES* _aliveTimeToWin = 20; //THE TIME CYCLE THE FUGITIVE MARK WILL BE UPDATED *IN SECONDS* _updateMark = 100; //MAXIMUN TIME THE FUGITIVE IS ALLOWED TO BE IN A PLOT OR SAFEZONE RADIUS TO RECEIVE HIS REWARD IN CASE OF WIN (a percentage of _aliveTimeToWin) _maxTimeNearPlot = 0.15; //TIME CYCLE *IN SECONDS* TO CHECK FOR PLOTS NEAR THE FUGITIVE AND SAFEZONES _onPlotCheckFrequency = 20; //THE RADIUS OF THE POSITION HINT (FUGITIVE WILL BE SOMEWHERE INSIDE THE CIRCLE) *IN METERS* _circleSize = 150; //MINIMUM NUMBER OF PLAYERS TO RUN _minPlayersToRun = 10; //TIME TO WAIT BEFORE TRY TO RUN AGAIN *IN MINUTES* _runTimeInter = 50; //FIRST RUN DELAY *IN MINUTES* _firstRunDelay = 30; //FUGITIVE TIME REWARDS: [time in minutes to exec reward (in sequence),reward message,reward code where _this is the fugitive] _fugitiveRewards = [ [4,"The Fugitive received a DMR and Ammo.",{_posF = position _this;_posFGround = [_posF select 0,_posF select 1,0];_holder = createVehicle ['Weaponholder',_posFGround,[],0,'NONE'];_holder addWeaponCargoGlobal ['DMR_DZ',1];_holder addMagazineCargoGlobal ['20Rnd_762x51_DMR',5];_this reveal [_holder,4];}], [4,"The fugitive received a motorbike.",{_posF = position _this;_posFGround = [_posF select 0,_posF select 1,0];_veh = createVehicle ['TT650_Ins',_posFGround,[],8,'NONE'];_veh setVariable ['ObjectID','0',true];_veh setVariable ['ObjectUID',str round random 9999999,true];_this reveal [_veh,4];}], [4,"The fugitive received medical items.",{_posF = position _this;_posFGround = [_posF select 0,_posF select 1,0];_holder = createVehicle ['Weaponholder',_posFGround,[],0,'NONE'];_holder addMagazineCargoGlobal ['ItemBloodBag',1];_holder addMagazineCargoGlobal ['ItemBandage',2];_holder addMagazineCargoGlobal ['ItemSeaBassCooked',1];_holder addMagazineCargoGlobal ['ItemWaterbottle',1];_holder addMagazineCargoGlobal ['ItemPainkiller',1];_holder addMagazineCargoGlobal ['ItemORP',1];_holder addMagazineCargoGlobal ['ItemMorphine',1];_this reveal [_holder,4];}], [4,"The fugitive sees the enemy.",{donn_seeSmoke = [];{if (_this distance _x < 300 && !((vehicle _x) isKindOf 'Air')) then {_posK = position _x;for '_i' from 1 to 4 do {_smoke = createVehicle [['SmokeShell','SmokeShellYellow','SmokeShellRed','SmokeShellGreen','SmokeShellPurple','SmokeShellBlue','SmokeShellOrange'] call BIS_fnc_selectRandom,[_posK select 0,_posK select 1,40+_i*10],[],0,'CAN_COLLIDE'];donn_seeSmoke = donn_seeSmoke + [_smoke];};};} forEach (playableUnits-[_this]);}], [1/12,"",{{deleteVehicle _x;} forEach donn_seeSmoke;}] ]; //SAFE ZONES (READY FOR CHERNARUS) _safezones = [ [6325,7807,0], [4063,11664,0], [11447,11364,0], [1606,7803,0], [12944,12766,0], [12060,12640,0] ]; _safezonesRad = 160; //ADMINS STEAM ID (TO PREVENT THE SCRIPT FROM SELECTING ADMINS AS FUGITIVE) _admins = ["0","0"]; //===================== // FUNCTIONS ========== //===================== _lockedFugitives = []; //THE TWO LINES BELLOW ARE EPOCH SPECIFIC waitUntil {!isNil "DZE_safeVehicle"}; DZE_safeVehicle = DZE_safeVehicle + ["TT650_Ins"]; donn_fugitiveChoose = { _fugitive = objNull; _maxSumDist = -1; { _p = _x; _pP = position _x; _pPX = _pP select 0; _pPY = _pP select 1; if (_pPx > 0 && _pPY < _mapSize) then { if (damage _p < 0.2 && vehicle _p == _p) then { if (count (_p nearObjects ["Plastic_Pole_EP1_DZ",(DZE_PlotPole select 0)*1.25]) == 0) then { _pUID = getPlayerUID _p; if !(_pUID in _admins || _pUID in _lockedFugitives) then { _sumDist = 0; {_sumDist = _sumDist + (_p distance _x);} forEach playableUnits; if (_sumDist > _maxSumDist) then {_fugitive = _p;_maxSumDist = _sumDist;}; }; }; }; }; } forEach playableUnits; _fugitive }; //===================== // THE SCRIPT ========= //===================== _aliveTimeToWin = round (_aliveTimeToWin*60); _runTimeInter = round (_runTimeInter*60); _firstRunDelay = round (_firstRunDelay*60); _lastTimeConclude = time-_runTimeInter+_firstRunDelay; while {true} do { waitUntil {uiSleep 15;count playableUnits >= _minPlayersToRun && (time-_lastTimeConclude) >= _runTimeInter}; _fugitive = call donn_fugitiveChoose; if (!isNull _fugitive) then { diag_log "[MOSTWANTED] Begin!"; _fugitiveName = name _fugitive; _fugitiveID = getPlayerUID _fugitive; _aliveTimeStart = time; _aliveTimePassed = 0; _timeCell = 2; _sleepAMark = round(_updateMark/_timeCell); _slepBIndex = 0; _sleepBMark = -1; if !(_slepBIndex == count _fugitiveRewards) then { _sleepBMark = round(((_fugitiveRewards select _slepBIndex select 0)*60)/_timeCell); }; _sleepCMark = round(_onPlotCheckFrequency/_timeCell); _sleepDMark = round (10/_timeCell); //_sleepA = _sleepAMark; _sleepA = 0; _sleepB = 0; _sleepC = 0; _sleepD = 0; _txt = ((name _fugitive)+" has a price on his head, kill him to receive a reward.\n"+(name _fugitive)+", stay alive " +(str(round(_aliveTimeToWin/60)))+" minutes to receive the prize.\n\n"); _timeInPlot = 0; while {alive _fugitive && !isNull _fugitive && _aliveTimePassed < _aliveTimeToWin && _timeInPlot <= _aliveTimeToWin*_maxTimeNearPlot} do { if (_sleepA >= _sleepAMark) then { _txt = _txt + ((name _fugitive)+" mark updated on map.\n"+(str (round(((_aliveTimeToWin-_aliveTimePassed)/60)*10)/10))+" minutes to stop the hunt.\n\n"); _sleepA = 0; _fPos = position _fugitive; _error = (_circleSize*2)/sqrt(2); _fPosBlur = [(_fPos select 0)-_error/2+(random _error),(_fPos select 1)-_error/2+(random _error),0]; if (_aliveTimePassed > 0) then {deleteMarker "DONN_FUGITIVE";deleteMarker "DONN_FUGITIVE_DOT";}; createMarker ["DONN_FUGITIVE",_fPosBlur]; "DONN_FUGITIVE" setMarkerColor "ColorYellow"; "DONN_FUGITIVE" setMarkerShape "ELLIPSE"; "DONN_FUGITIVE" setMarkerBrush "SolidBorder"; "DONN_FUGITIVE" setMarkerSize [_circleSize,_circleSize]; createMarker ["DONN_FUGITIVE_DOT",_fPosBlur]; "DONN_FUGITIVE_DOT" setMarkerColor "ColorBlack"; "DONN_FUGITIVE_DOT" setMarkerType "Vehicle"; "DONN_FUGITIVE_DOT" setMarkerText "Fugitive!"; }; if (_sleepB == _sleepBMark) then { _nearPlotPole = _fugitive nearObjects ["Plastic_Pole_EP1_DZ",DZE_PlotPole select 0]; _inSafe = false; {if (_fugitive distance _x < _safezonesRad) exitWith {_inSafe = true;};} forEach _safezones; _isFlying = ((getPosATL _fugitive) select 2) > 45; if (count _nearPlotPole == 0 && !_inSafe && !_isFlying) then { _txt = _txt + "Time Reward! " + (_fugitiveRewards select _slepBIndex select 1); _code = _fugitiveRewards select _slepBIndex select 2; _fugitive call _code; } else { _txt = _txt + "Time Reward!? In safe, on plot or flying. No reward..."; }; _sleepB = 0; _slepBIndex = _slepBIndex + 1; _sleepBMark = -1; if !(_slepBIndex == count _fugitiveRewards) then { _sleepBMark = round(((_fugitiveRewards select _slepBIndex select 0)*60)/_timeCell); }; }; if (_sleepC == _sleepCMark) then { _nearPlotPole = _fugitive nearObjects ["Plastic_Pole_EP1_DZ",DZE_PlotPole select 0]; _inSafe = false; _isHigh = ((getPosATL _fugitive) select 2) > 300; {if (_fugitive distance _x < _safezonesRad) exitWith {_inSafe = true;};} forEach _safezones; if (count _nearPlotPole > 0 || _inSafe || _isHigh) then {_timeInPlot = _timeInPlot+_sleepCMark*_timeCell}; _sleepC = 0; }; if (_sleepD == _sleepDMark) then { if (vehicle _fugitive == _fugitive) then { _sleepAMark = round(_updateMark/_timeCell); } else { if (vehicle _fugitive isKindOf "Air") then { _sleepAMark = round ((_updateMark/_timeCell)*0.25); } else { _sleepAMark = round ((_updateMark/_timeCell)*0.5); }; }; _sleepD = 0; }; if (_txt != "" && _txt != "Time Reward! ") then {[nil,nil,rTitleText,_txt,"PLAIN",7.5] call RE;}; uiSleep _timeCell; _txt = ""; _sleepA = _sleepA + 1; _sleepB = _sleepB + 1; _sleepC = _sleepC + 1; _sleepD = _sleepD + 1; _aliveTimePassed = (time - _aliveTimeStart); }; deleteMarker "DONN_FUGITIVE"; deleteMarker "DONN_FUGITIVE_DOT"; if (!isNull _fugitive) then { _lockedFugitives = _lockedFugitives + [_fugitiveID]; if (alive _fugitive) then { if (_timeInPlot <= _aliveTimeToWin*_maxTimeNearPlot) then { [nil,nil,rTitleText,(_fugitiveName+", time over! The prize is yours!\nColect your reward near you."),"PLAIN",7.5] call RE; _posToHolder = position _fugitive;_posToHolder set [2,0]; _veh = createVehicle ["CSJ_GyroC",_posToHolder,[],2,'NONE']; _veh setVariable ["ObjectID","0",true]; _veh setVariable ["ObjectUID",str round random 9999999,true]; _fugitive reveal _veh; _posToHolder = position _fugitive;_posToHolder set [2,0]; _holder = createVehicle ["WeaponHolder",_posToHolder,[],0,"CAN_COLLIDE"]; _holder addMagazineCargoGlobal ["ItemBriefCase100oz",4]; _fugitive reveal _holder; diag_log "[MOSTWANTED] Ending! The Fugitive Wins!"; _lastTimeConclude = time; } else { [nil,nil,rTitleText,("Hunt time is over! "+(name _fugitive)+", you where to close to plot poles or safezones\n or high in the sky. No pain no gain. No reward."),"PLAIN",10] call RE; diag_log "[MOSTWANTED] Ending! Fugitive not Fair..."; _lastTimeConclude = time-_runTimeInter*0.75; }; } else { [nil,nil,rTitleText,((name _fugitive)+", perished! Collect the prize on his body!\nMark is on map fo 45 seconds..."),"PLAIN",10] call RE; createMarker ["DONN_FUGITIVE",position _fugitive]; "DONN_FUGITIVE" setMarkerColor "ColorRed"; "DONN_FUGITIVE" setMarkerShape "ELLIPSE"; "DONN_FUGITIVE" setMarkerBrush "SolidBorder"; "DONN_FUGITIVE" setMarkerSize [100,100]; createMarker ["DONN_FUGITIVE_DOT",position _fugitive]; "DONN_FUGITIVE_DOT" setMarkerColor "ColorBlack"; "DONN_FUGITIVE_DOT" setMarkerType "Vehicle"; "DONN_FUGITIVE_DOT" setMarkerText "Fugitive Body..."; _posToHolder = position _fugitive;_posToHolder set [2,0]; _holder = createVehicle ["WeaponHolder",_posToHolder,[],0,"CAN_COLLIDE"]; _holder addMagazineCargoGlobal ["ItemBriefCase100oz",4]; diag_log "[MOSTWANTED] Ending! Fugitive perished."; uiSleep 240; deleteMarker "DONN_FUGITIVE"; deleteMarker "DONN_FUGITIVE_DOT"; _lastTimeConclude = time-240; }; } else { [nil,nil,rTitleText,("The hunt for "+_fugitiveName+" head is over... "+_fugitiveName+" disconnected."),"PLAIN",5] call RE; diag_log "[MOSTWANTED] Fugitive disconnected..."; _lastTimeConclude = time-_runTimeInter*0.75; }; } else { diag_log "[MOSTWANTED] Cant find an elegible fugitive..."; _lastTimeConclude = time-_runTimeInter*0.75; }; }; Link to comment Share on other sites More sharing options...
Vendetta5555 Posted August 20, 2021 Report Share Posted August 20, 2021 On 8/15/2021 at 5:28 PM, Reaper5150 said: Try this one! Tested and working :) //=============================== // ANDRE MOST WANTED SCRIPT ===== //=============================== // By Donnovan ================== //=============================== //==================== // CONFIGURATION ===== //==================== //MAP SIZE TO PREVENT THE LOGING IN PLAYERS TO BE SELECTED AS FUGITIVE _mapSize = 15360; //READY FOR CHERNARUS //THE TIME THE FUGITIVE NEED TO RESIST ALIVE TO WIN *IN MINUTES* _aliveTimeToWin = 20; //THE TIME CYCLE THE FUGITIVE MARK WILL BE UPDATED *IN SECONDS* _updateMark = 100; //MAXIMUN TIME THE FUGITIVE IS ALLOWED TO BE IN A PLOT OR SAFEZONE RADIUS TO RECEIVE HIS REWARD IN CASE OF WIN (a percentage of _aliveTimeToWin) _maxTimeNearPlot = 0.15; //TIME CYCLE *IN SECONDS* TO CHECK FOR PLOTS NEAR THE FUGITIVE AND SAFEZONES _onPlotCheckFrequency = 20; //THE RADIUS OF THE POSITION HINT (FUGITIVE WILL BE SOMEWHERE INSIDE THE CIRCLE) *IN METERS* _circleSize = 150; //MINIMUM NUMBER OF PLAYERS TO RUN _minPlayersToRun = 10; //TIME TO WAIT BEFORE TRY TO RUN AGAIN *IN MINUTES* _runTimeInter = 50; //FIRST RUN DELAY *IN MINUTES* _firstRunDelay = 30; //FUGITIVE TIME REWARDS: [time in minutes to exec reward (in sequence),reward message,reward code where _this is the fugitive] _fugitiveRewards = [ [4,"The Fugitive received a DMR and Ammo.",{_posF = position _this;_posFGround = [_posF select 0,_posF select 1,0];_holder = createVehicle ['Weaponholder',_posFGround,[],0,'NONE'];_holder addWeaponCargoGlobal ['DMR_DZ',1];_holder addMagazineCargoGlobal ['20Rnd_762x51_DMR',5];_this reveal [_holder,4];}], [4,"The fugitive received a motorbike.",{_posF = position _this;_posFGround = [_posF select 0,_posF select 1,0];_veh = createVehicle ['TT650_Ins',_posFGround,[],8,'NONE'];_veh setVariable ['ObjectID','0',true];_veh setVariable ['ObjectUID',str round random 9999999,true];_this reveal [_veh,4];}], [4,"The fugitive received medical items.",{_posF = position _this;_posFGround = [_posF select 0,_posF select 1,0];_holder = createVehicle ['Weaponholder',_posFGround,[],0,'NONE'];_holder addMagazineCargoGlobal ['ItemBloodBag',1];_holder addMagazineCargoGlobal ['ItemBandage',2];_holder addMagazineCargoGlobal ['ItemSeaBassCooked',1];_holder addMagazineCargoGlobal ['ItemWaterbottle',1];_holder addMagazineCargoGlobal ['ItemPainkiller',1];_holder addMagazineCargoGlobal ['ItemORP',1];_holder addMagazineCargoGlobal ['ItemMorphine',1];_this reveal [_holder,4];}], [4,"The fugitive sees the enemy.",{donn_seeSmoke = [];{if (_this distance _x < 300 && !((vehicle _x) isKindOf 'Air')) then {_posK = position _x;for '_i' from 1 to 4 do {_smoke = createVehicle [['SmokeShell','SmokeShellYellow','SmokeShellRed','SmokeShellGreen','SmokeShellPurple','SmokeShellBlue','SmokeShellOrange'] call BIS_fnc_selectRandom,[_posK select 0,_posK select 1,40+_i*10],[],0,'CAN_COLLIDE'];donn_seeSmoke = donn_seeSmoke + [_smoke];};};} forEach (playableUnits-[_this]);}], [1/12,"",{{deleteVehicle _x;} forEach donn_seeSmoke;}] ]; //SAFE ZONES (READY FOR CHERNARUS) _safezones = [ [6325,7807,0], [4063,11664,0], [11447,11364,0], [1606,7803,0], [12944,12766,0], [12060,12640,0] ]; _safezonesRad = 160; //ADMINS STEAM ID (TO PREVENT THE SCRIPT FROM SELECTING ADMINS AS FUGITIVE) _admins = ["0","0"]; //===================== // FUNCTIONS ========== //===================== _lockedFugitives = []; //THE TWO LINES BELLOW ARE EPOCH SPECIFIC waitUntil {!isNil "DZE_safeVehicle"}; DZE_safeVehicle = DZE_safeVehicle + ["TT650_Ins"]; donn_fugitiveChoose = { _fugitive = objNull; _maxSumDist = -1; { _p = _x; _pP = position _x; _pPX = _pP select 0; _pPY = _pP select 1; if (_pPx > 0 && _pPY < _mapSize) then { if (damage _p < 0.2 && vehicle _p == _p) then { if (count (_p nearObjects ["Plastic_Pole_EP1_DZ",(DZE_PlotPole select 0)*1.25]) == 0) then { _pUID = getPlayerUID _p; if !(_pUID in _admins || _pUID in _lockedFugitives) then { _sumDist = 0; {_sumDist = _sumDist + (_p distance _x);} forEach playableUnits; if (_sumDist > _maxSumDist) then {_fugitive = _p;_maxSumDist = _sumDist;}; }; }; }; }; } forEach playableUnits; _fugitive }; //===================== // THE SCRIPT ========= //===================== _aliveTimeToWin = round (_aliveTimeToWin*60); _runTimeInter = round (_runTimeInter*60); _firstRunDelay = round (_firstRunDelay*60); _lastTimeConclude = time-_runTimeInter+_firstRunDelay; while {true} do { waitUntil {uiSleep 15;count playableUnits >= _minPlayersToRun && (time-_lastTimeConclude) >= _runTimeInter}; _fugitive = call donn_fugitiveChoose; if (!isNull _fugitive) then { diag_log "[MOSTWANTED] Begin!"; _fugitiveName = name _fugitive; _fugitiveID = getPlayerUID _fugitive; _aliveTimeStart = time; _aliveTimePassed = 0; _timeCell = 2; _sleepAMark = round(_updateMark/_timeCell); _slepBIndex = 0; _sleepBMark = -1; if !(_slepBIndex == count _fugitiveRewards) then { _sleepBMark = round(((_fugitiveRewards select _slepBIndex select 0)*60)/_timeCell); }; _sleepCMark = round(_onPlotCheckFrequency/_timeCell); _sleepDMark = round (10/_timeCell); //_sleepA = _sleepAMark; _sleepA = 0; _sleepB = 0; _sleepC = 0; _sleepD = 0; _txt = ((name _fugitive)+" has a price on his head, kill him to receive a reward.\n"+(name _fugitive)+", stay alive " +(str(round(_aliveTimeToWin/60)))+" minutes to receive the prize.\n\n"); _timeInPlot = 0; while {alive _fugitive && !isNull _fugitive && _aliveTimePassed < _aliveTimeToWin && _timeInPlot <= _aliveTimeToWin*_maxTimeNearPlot} do { if (_sleepA >= _sleepAMark) then { _txt = _txt + ((name _fugitive)+" mark updated on map.\n"+(str (round(((_aliveTimeToWin-_aliveTimePassed)/60)*10)/10))+" minutes to stop the hunt.\n\n"); _sleepA = 0; _fPos = position _fugitive; _error = (_circleSize*2)/sqrt(2); _fPosBlur = [(_fPos select 0)-_error/2+(random _error),(_fPos select 1)-_error/2+(random _error),0]; if (_aliveTimePassed > 0) then {deleteMarker "DONN_FUGITIVE";deleteMarker "DONN_FUGITIVE_DOT";}; createMarker ["DONN_FUGITIVE",_fPosBlur]; "DONN_FUGITIVE" setMarkerColor "ColorYellow"; "DONN_FUGITIVE" setMarkerShape "ELLIPSE"; "DONN_FUGITIVE" setMarkerBrush "SolidBorder"; "DONN_FUGITIVE" setMarkerSize [_circleSize,_circleSize]; createMarker ["DONN_FUGITIVE_DOT",_fPosBlur]; "DONN_FUGITIVE_DOT" setMarkerColor "ColorBlack"; "DONN_FUGITIVE_DOT" setMarkerType "Vehicle"; "DONN_FUGITIVE_DOT" setMarkerText "Fugitive!"; }; if (_sleepB == _sleepBMark) then { _nearPlotPole = _fugitive nearObjects ["Plastic_Pole_EP1_DZ",DZE_PlotPole select 0]; _inSafe = false; {if (_fugitive distance _x < _safezonesRad) exitWith {_inSafe = true;};} forEach _safezones; _isFlying = ((getPosATL _fugitive) select 2) > 45; if (count _nearPlotPole == 0 && !_inSafe && !_isFlying) then { _txt = _txt + "Time Reward! " + (_fugitiveRewards select _slepBIndex select 1); _code = _fugitiveRewards select _slepBIndex select 2; _fugitive call _code; } else { _txt = _txt + "Time Reward!? In safe, on plot or flying. No reward..."; }; _sleepB = 0; _slepBIndex = _slepBIndex + 1; _sleepBMark = -1; if !(_slepBIndex == count _fugitiveRewards) then { _sleepBMark = round(((_fugitiveRewards select _slepBIndex select 0)*60)/_timeCell); }; }; if (_sleepC == _sleepCMark) then { _nearPlotPole = _fugitive nearObjects ["Plastic_Pole_EP1_DZ",DZE_PlotPole select 0]; _inSafe = false; _isHigh = ((getPosATL _fugitive) select 2) > 300; {if (_fugitive distance _x < _safezonesRad) exitWith {_inSafe = true;};} forEach _safezones; if (count _nearPlotPole > 0 || _inSafe || _isHigh) then {_timeInPlot = _timeInPlot+_sleepCMark*_timeCell}; _sleepC = 0; }; if (_sleepD == _sleepDMark) then { if (vehicle _fugitive == _fugitive) then { _sleepAMark = round(_updateMark/_timeCell); } else { if (vehicle _fugitive isKindOf "Air") then { _sleepAMark = round ((_updateMark/_timeCell)*0.25); } else { _sleepAMark = round ((_updateMark/_timeCell)*0.5); }; }; _sleepD = 0; }; if (_txt != "" && _txt != "Time Reward! ") then {[nil,nil,rTitleText,_txt,"PLAIN",7.5] call RE;}; uiSleep _timeCell; _txt = ""; _sleepA = _sleepA + 1; _sleepB = _sleepB + 1; _sleepC = _sleepC + 1; _sleepD = _sleepD + 1; _aliveTimePassed = (time - _aliveTimeStart); }; deleteMarker "DONN_FUGITIVE"; deleteMarker "DONN_FUGITIVE_DOT"; if (!isNull _fugitive) then { _lockedFugitives = _lockedFugitives + [_fugitiveID]; if (alive _fugitive) then { if (_timeInPlot <= _aliveTimeToWin*_maxTimeNearPlot) then { [nil,nil,rTitleText,(_fugitiveName+", time over! The prize is yours!\nColect your reward near you."),"PLAIN",7.5] call RE; _posToHolder = position _fugitive;_posToHolder set [2,0]; _veh = createVehicle ["CSJ_GyroC",_posToHolder,[],2,'NONE']; _veh setVariable ["ObjectID","0",true]; _veh setVariable ["ObjectUID",str round random 9999999,true]; _fugitive reveal _veh; _posToHolder = position _fugitive;_posToHolder set [2,0]; _holder = createVehicle ["WeaponHolder",_posToHolder,[],0,"CAN_COLLIDE"]; _holder addMagazineCargoGlobal ["ItemBriefCase100oz",4]; _fugitive reveal _holder; diag_log "[MOSTWANTED] Ending! The Fugitive Wins!"; _lastTimeConclude = time; } else { [nil,nil,rTitleText,("Hunt time is over! "+(name _fugitive)+", you where to close to plot poles or safezones\n or high in the sky. No pain no gain. No reward."),"PLAIN",10] call RE; diag_log "[MOSTWANTED] Ending! Fugitive not Fair..."; _lastTimeConclude = time-_runTimeInter*0.75; }; } else { [nil,nil,rTitleText,((name _fugitive)+", perished! Collect the prize on his body!\nMark is on map fo 45 seconds..."),"PLAIN",10] call RE; createMarker ["DONN_FUGITIVE",position _fugitive]; "DONN_FUGITIVE" setMarkerColor "ColorRed"; "DONN_FUGITIVE" setMarkerShape "ELLIPSE"; "DONN_FUGITIVE" setMarkerBrush "SolidBorder"; "DONN_FUGITIVE" setMarkerSize [100,100]; createMarker ["DONN_FUGITIVE_DOT",position _fugitive]; "DONN_FUGITIVE_DOT" setMarkerColor "ColorBlack"; "DONN_FUGITIVE_DOT" setMarkerType "Vehicle"; "DONN_FUGITIVE_DOT" setMarkerText "Fugitive Body..."; _posToHolder = position _fugitive;_posToHolder set [2,0]; _holder = createVehicle ["WeaponHolder",_posToHolder,[],0,"CAN_COLLIDE"]; _holder addMagazineCargoGlobal ["ItemBriefCase100oz",4]; diag_log "[MOSTWANTED] Ending! Fugitive perished."; uiSleep 240; deleteMarker "DONN_FUGITIVE"; deleteMarker "DONN_FUGITIVE_DOT"; _lastTimeConclude = time-240; }; } else { [nil,nil,rTitleText,("The hunt for "+_fugitiveName+" head is over... "+_fugitiveName+" disconnected."),"PLAIN",5] call RE; diag_log "[MOSTWANTED] Fugitive disconnected..."; _lastTimeConclude = time-_runTimeInter*0.75; }; } else { diag_log "[MOSTWANTED] Cant find an elegible fugitive..."; _lastTimeConclude = time-_runTimeInter*0.75; }; }; I have an identical code))) How to fix the error?) Link to comment Share on other sites More sharing options...
Reaper5150 Posted August 21, 2021 Report Share Posted August 21, 2021 10 hours ago, Vendetta5555 said: I have an identical code))) How to fix the error?) I apologize for that as it was tested on an earlier version not the updated 1.0.7. With that said there is a problem with the variable as I have now tried loading it to my test server and getting the same error. This script is very outdated and will need some fixes in order to run with Epoch 1.0.7. I have no idea if the original author @Donnovan is still active and if not someone might be able to take a wack at it? Vendetta5555 1 Link to comment Share on other sites More sharing options...
Vendetta5555 Posted August 21, 2021 Report Share Posted August 21, 2021 3 hours ago, Reaper5150 said: Прошу прощения за это, так как он был протестирован на более ранней версии, а не на обновленной версии 1.0.7. При этом существует проблема с переменной, поскольку я теперь попытался загрузить ее на свой тестовый сервер и получил ту же ошибку. Этот сценарий очень устарел и потребует некоторых исправлений для работы с Epoch 1.0.7. Я понятия не имею, активен ли первоначальный автор @Donnovan , и если нет, кто-то может над ним подшутить? I heard you, so this error does not particularly affect the gameplay, although I have not tested with a large number of players yet) Link to comment Share on other sites More sharing options...
Reaper5150 Posted August 21, 2021 Report Share Posted August 21, 2021 11 hours ago, Vendetta5555 said: I heard you, so this error does not particularly affect the gameplay, although I have not tested with a large number of players yet) Unless you can get it to pick up on when a player is near a safezone or players plot, it won't work! Link to comment Share on other sites More sharing options...
Vendetta5555 Posted August 22, 2021 Report Share Posted August 22, 2021 2 hours ago, Reaper5150 said: Unless you can get it to pick up on when a player is near a safezone or players plot, it won't work! The script simply completes its work after the fugitive enters the safe zone, it's not so scary)) But errors in the logs haunt))) Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now