Jump to content

epoch 1.0.3 killing a hacker


kiel367

Recommended Posts

usine bluepheonix to spawn a vehicle in, it dissapears, and kills the occupants, which as of past patches has always been the killed a hacker script, i have looked into changing it, but everything tells me to search for a line of code i do not have, so thought i would post it in here to see if one of u guys could look into it an help me, so heres my code for the killing a hacker

 

class group_cleanup
    {
      name = "group_cleanup";
      init = /*%FSM<STATEINIT""">*/"//Check for hackers" \n
       " {" \n
       epoch 1.0.3 if(vehicle _x != _x && !(vehicle _x in PVDZE_serverObjectMonitor) && (isPlayer _x)  && !((typeOf vehicle _x) in DZE_safeVehicle)) 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;"/*%FSM</STATEINIT""">*/;
      precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
      class Links
      {
        /*%FSM<LINK "true">*/

 

 

 

 

any smarter than me person care to have a look at this for me?

 

someone mentioned i could just edit all the lines like this with the double // but it opens up doors for hackers

 "//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
      "//Let's move this into the body removal sequence so uncontrolled flies are removed only if corpses are cleaned" \n
      "//Check Flies" \n
Link to comment
Share on other sites

It only allows hackers to spawn in vehicles that aren't supposed to be there really. And if you're using anti-hacks, you should be pretty protected from them anyway. And battleye still gives you a certain level of protection against hackers too (although not a lot)

 

If you've had problems with hackers before and often get them, I'd maybe avoid using that feature on your server. Other wise, if you've never had a hacker or very rarely get hackers, just comment it out.

Link to comment
Share on other sites

You have to insert (vehicle _x getVariable [""Sarge"",0] != 1) in the if statement so that you check if the vehicle was spawned by Blue Phoenix.

I think this is described in the description for BP..

So in Dayz Epoch 1.3.0 it should look like this in the file server_cleanup.fsm when you have inserted the row in the code:

 class group_cleanup
    {
      name = "group_cleanup";
      init = /*%FSM<STATEINIT""">*/"//Check for hackers" \n
       " {" \n
       " if(vehicle _x != _x && !(vehicle _x in PVDZE_serverObjectMonitor) && (isPlayer _x)  && !((typeOf vehicle _x) in DZE_safeVehicle) && (vehicle _x getVariable [""Sarge"",0] != 1)) 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;"/*%FSM</STATEINIT""">*/;
Link to comment
Share on other sites

have just commented it out for now, seems to have sorted it, managed to get both my antihacks working as well, using bluepheonix and dayzah aparantly bohemia interactive told vilayer to remove the option for dayzah, i managed to get it going still even tho the option is removed from the site, cant spawn vehicles using bluepheonix but dayzah spawns them fine as they dissapear with bluepheonix

Link to comment
Share on other sites

fixed

" if(vehicle x != _x && !(vehicle _x in PVDZEserverObjectMonitor) && (isPlayer x) && (typeOf vehicle _x) != ""ParachuteWest"" && (vehicle _x getVariable [""Sarge"",0] != 1) && (vehicle _x getVariable [""DZAI"",0] != 1) && (vehicle _x getVariable [""Mission"",0] != 1) && !((typeOf vehicle _x) in DZEsafeVehicle)) then {" \n
Link to comment
Share on other sites

if(vehicle x != _x && !(vehicle _x in PVDZEserverOb>
 0:26:25   Error position: <x != _x && !(vehicle _x in PVDZEserverOb>
 0:26:25   Error Undefined variable in expression: x
 0:26:25 Error in expression <
rpt error
i am getting this error  i am using admin tools and i need a cust cleanup does anyone have the code i would need?
Link to comment
Share on other sites

  • 1 month later...

open the file called "server_updateObject.sqf" which is located in the compile folder:

Around line 22 look for this

{
diag_log(format["Non-string Object: ID %1 UID %2", _objectID, _uid]);
//force fail 
_objectID = "0"; 
_uid = "0"; 
};

Just after the }; 

 

Place this 

if (_object getVariable "Sarge" == 1) exitWith {};

Around Line 31 Find this 

if (_objectID == "0" && _uid == "0") then

and replace it with this

if (_objectID == "0" && _uid == "0" && (vehicle _object getVariable ["Sarge",0] != 1)) then

Then In your server_cleanup.fsp Look for this 

if(vehicle x != _x && !(vehicle _x in PVDZEserverObjectMonitor) && (isPlayer x) && !((typeOf vehicle _x) in DZEsafeVehicle)) then {" \n

and replace it with this 

if(vehicle x != _x && !(vehicle _x in PVDZEserverObjectMonitor) && (isPlayer x) && (vehicle _x getVariable [""Sarge"",0] != 1) && !((typeOf vehicle _x) in DZEsafeVehicle)) then {" \n

Remember and backup the files before hand! 

 

And I also believe you Will need SARGE for it to work without problems!

This works on my server

:)

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